svn commit: r229830 - stable/8/sys/fs/nfsserver
Rick Macklem
rmacklem at FreeBSD.org
Sun Jan 8 23:30:23 UTC 2012
Author: rmacklem
Date: Sun Jan 8 23:30:23 2012
New Revision: 229830
URL: http://svn.freebsd.org/changeset/base/229830
Log:
MFC: r228560
Patch the new NFS server in a manner analagous to r228520 for the
old NFS server, so that it correctly handles a count == 0 argument
for Commit.
Modified:
stable/8/sys/fs/nfsserver/nfs_nfsdport.c
Directory Properties:
stable/8/sys/ (props changed)
stable/8/sys/amd64/include/xen/ (props changed)
stable/8/sys/cddl/contrib/opensolaris/ (props changed)
stable/8/sys/contrib/dev/acpica/ (props changed)
stable/8/sys/contrib/pf/ (props changed)
Modified: stable/8/sys/fs/nfsserver/nfs_nfsdport.c
==============================================================================
--- stable/8/sys/fs/nfsserver/nfs_nfsdport.c Sun Jan 8 23:11:03 2012 (r229829)
+++ stable/8/sys/fs/nfsserver/nfs_nfsdport.c Sun Jan 8 23:30:23 2012 (r229830)
@@ -1249,7 +1249,13 @@ nfsvno_fsync(struct vnode *vp, u_int64_t
{
int error = 0;
- if (cnt > MAX_COMMIT_COUNT) {
+ /*
+ * RFC 1813 3.3.21: if count is 0, a flush from offset to the end of
+ * file is done. At this time VOP_FSYNC does not accept offset and
+ * byte count parameters so call VOP_FSYNC the whole file for now.
+ * The same is true for NFSv4: RFC 3530 Sec. 14.2.3.
+ */
+ if (cnt == 0 || cnt > MAX_COMMIT_COUNT) {
/*
* Give up and do the whole thing
*/
More information about the svn-src-all
mailing list