[Midnightbsd-cvs] src [9488] trunk/sys/fs/nfsclient/nfs_clport.c: Post-r248567, there were times when the client would return a

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Sun Mar 5 15:07:14 EST 2017


Revision: 9488
          http://svnweb.midnightbsd.org/src/?rev=9488
Author:   laffer1
Date:     2017-03-05 15:07:14 -0500 (Sun, 05 Mar 2017)
Log Message:
-----------
Post-r248567, there were times when the client would return a
truncated directory for some NFS servers. This turned out to
be because the size of a directory reported by an NFS server
can be smaller that the ufs-like directory created from the
RPC XDR in the client. This patch fixes the problem by changing
r248567 so that vnode_pager_setsize() is only done for regular files.

Revision Links:
--------------
    http://svnweb.midnightbsd.org/src/?rev=248567
    http://svnweb.midnightbsd.org/src/?rev=248567

Modified Paths:
--------------
    trunk/sys/fs/nfsclient/nfs_clport.c

Modified: trunk/sys/fs/nfsclient/nfs_clport.c
===================================================================
--- trunk/sys/fs/nfsclient/nfs_clport.c	2017-03-05 20:06:45 UTC (rev 9487)
+++ trunk/sys/fs/nfsclient/nfs_clport.c	2017-03-05 20:07:14 UTC (rev 9488)
@@ -454,13 +454,11 @@
 				np->n_size = vap->va_size;
 				np->n_flag |= NSIZECHANGED;
 			}
+			setnsize = 1;
+			nsize = vap->va_size;
 		} else {
 			np->n_size = vap->va_size;
 		}
-		if (vap->va_type == VREG || vap->va_type == VDIR) {
-			setnsize = 1;
-			nsize = vap->va_size;
-		}
 	}
 	/*
 	 * The following checks are added to prevent a race between (say)



More information about the Midnightbsd-cvs mailing list