svn commit: r251395 - stable/9/sys/fs/nfsclient
Rick Macklem
rmacklem at FreeBSD.org
Tue Jun 4 22:29:20 UTC 2013
Author: rmacklem
Date: Tue Jun 4 22:29:19 2013
New Revision: 251395
URL: http://svnweb.freebsd.org/changeset/base/251395
Log:
MFC: r251079
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.
Modified:
stable/9/sys/fs/nfsclient/nfs_clport.c
Directory Properties:
stable/9/sys/ (props changed)
stable/9/sys/fs/ (props changed)
Modified: stable/9/sys/fs/nfsclient/nfs_clport.c
==============================================================================
--- stable/9/sys/fs/nfsclient/nfs_clport.c Tue Jun 4 20:49:17 2013 (r251394)
+++ stable/9/sys/fs/nfsclient/nfs_clport.c Tue Jun 4 22:29:19 2013 (r251395)
@@ -454,12 +454,10 @@ nfscl_loadattrcache(struct vnode **vpp,
np->n_size = vap->va_size;
np->n_flag |= NSIZECHANGED;
}
- } else {
- np->n_size = vap->va_size;
- }
- if (vap->va_type == VREG || vap->va_type == VDIR) {
setnsize = 1;
nsize = vap->va_size;
+ } else {
+ np->n_size = vap->va_size;
}
}
/*
More information about the svn-src-stable-9
mailing list