Date: Wed, 29 Jul 2009 14:50:31 +0000 (UTC) From: Rick Macklem <rmacklem@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r195943 - head/sys/fs/nfsclient Message-ID: <200907291450.n6TEoVK7074390@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rmacklem Date: Wed Jul 29 14:50:31 2009 New Revision: 195943 URL: http://svn.freebsd.org/changeset/base/195943 Log: Fix the experimental nfs client so that it only calls ncl_vinvalbuf() for NFSv2 and not NFSv4 when nfscl_mustflush() returns 0. Since nfscl_mustflush() only returns 0 when there is a valid write delegation issued to the client, it only affects the case of an NFSv4 mount with callbacks/delegations enabled. Approved by: re (kensmith), kib (mentor) Modified: head/sys/fs/nfsclient/nfs_clvnops.c Modified: head/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvnops.c Wed Jul 29 14:44:09 2009 (r195942) +++ head/sys/fs/nfsclient/nfs_clvnops.c Wed Jul 29 14:50:31 2009 (r195943) @@ -687,11 +687,17 @@ nfs_close(struct vop_close_args *ap) int cm = newnfs_commit_on_close ? 1 : 0; error = ncl_flush(vp, MNT_WAIT, cred, ap->a_td, cm); /* np->n_flag &= ~NMODIFIED; */ - } else if (NFS_ISV4(vp) && nfscl_mustflush(vp)) { - int cm = newnfs_commit_on_close ? 1 : 0; - error = ncl_flush(vp, MNT_WAIT, cred, ap->a_td, cm); - /* as above w.r.t. races when clearing NMODIFIED */ - /* np->n_flag &= ~NMODIFIED; */ + } else if (NFS_ISV4(vp)) { + if (nfscl_mustflush(vp)) { + int cm = newnfs_commit_on_close ? 1 : 0; + error = ncl_flush(vp, MNT_WAIT, cred, ap->a_td, + cm); + /* + * as above w.r.t races when clearing + * NMODIFIED. + * np->n_flag &= ~NMODIFIED; + */ + } } else error = ncl_vinvalbuf(vp, V_SAVE, ap->a_td, 1); mtx_lock(&np->n_mtx);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200907291450.n6TEoVK7074390>