From owner-svn-src-head@freebsd.org Tue Apr 11 08:29:14 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2F207D38F6C; Tue, 11 Apr 2017 08:29:14 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 015CE7A6; Tue, 11 Apr 2017 08:29:13 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3B8TDfb027806; Tue, 11 Apr 2017 08:29:13 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3B8TDge027805; Tue, 11 Apr 2017 08:29:13 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201704110829.v3B8TDge027805@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 11 Apr 2017 08:29:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r316698 - head/sys/fs/nfsclient X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Apr 2017 08:29:14 -0000 Author: kib Date: Tue Apr 11 08:29:12 2017 New Revision: 316698 URL: https://svnweb.freebsd.org/changeset/base/316698 Log: Remove debugging printf. Instead, issue a diagnostic and return appropriate error if ncl_flush() was unable to clean buffer queue after the specified number or retries. Reviewed by: rmacklem Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clvnops.c Modified: head/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvnops.c Tue Apr 11 07:40:43 2017 (r316697) +++ head/sys/fs/nfsclient/nfs_clvnops.c Tue Apr 11 08:29:12 2017 (r316698) @@ -2971,14 +2971,17 @@ done: free(bvec, M_TEMP); if (error == 0 && commit != 0 && waitfor == MNT_WAIT && (bo->bo_dirty.bv_cnt != 0 || bo->bo_numoutput != 0 || - np->n_directio_asyncwr != 0) && trycnt++ < 5) { - /* try, try again... */ - passone = 1; - wcred = NULL; - bvec = NULL; - bvecsize = 0; -printf("try%d\n", trycnt); - goto again; + np->n_directio_asyncwr != 0)) { + if (trycnt++ < 5) { + /* try, try again... */ + passone = 1; + wcred = NULL; + bvec = NULL; + bvecsize = 0; + goto again; + } + vn_printf(vp, "ncl_flush failed"); + error = called_from_renewthread != 0 ? EIO : EBUSY; } return (error); }