Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Jun 2013 22:29:20 +0000 (UTC)
From:      Rick Macklem <rmacklem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r251395 - stable/9/sys/fs/nfsclient
Message-ID:  <201306042229.r54MTKSK001825@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;
 		}
 	}
 	/*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201306042229.r54MTKSK001825>