kern/118126: commit references a PR

dfilter service dfilter at FreeBSD.ORG
Fri Dec 16 01:00:30 UTC 2011


The following reply was made to PR kern/118126; it has been noted by GNATS.

From: dfilter at FreeBSD.ORG (dfilter service)
To: bug-followup at FreeBSD.org
Cc:  
Subject: Re: kern/118126: commit references a PR
Date: Fri, 16 Dec 2011 00:58:55 +0000 (UTC)

 Author: rmacklem
 Date: Fri Dec 16 00:58:41 2011
 New Revision: 228560
 URL: http://svn.freebsd.org/changeset/base/228560
 
 Log:
   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.
   
   PR:		kern/118126
   MFC after:	2 weeks
 
 Modified:
   head/sys/fs/nfsserver/nfs_nfsdport.c
 
 Modified: head/sys/fs/nfsserver/nfs_nfsdport.c
 ==============================================================================
 --- head/sys/fs/nfsserver/nfs_nfsdport.c	Fri Dec 16 00:48:53 2011	(r228559)
 +++ head/sys/fs/nfsserver/nfs_nfsdport.c	Fri Dec 16 00:58:41 2011	(r228560)
 @@ -1254,7 +1254,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
  		 */
 _______________________________________________
 svn-src-all at freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe at freebsd.org"
 


More information about the freebsd-fs mailing list