nfs client readdir eofflag

Jared Yanovich slovichon at gmail.com
Wed Apr 17 06:33:22 UTC 2013


Hi, is there a reason why eofflag isn't set in nfsclient readdir()?

This now allows union mounts to work for NFS above NFS.  

/sys/fs/nfsclient

Index: nfs_clvnops.c
===================================================================
--- nfs_clvnops.c	(revision 249568)
+++ nfs_clvnops.c	(working copy)
@@ -2221,6 +2221,7 @@
 			    !NFS_TIMESPEC_COMPARE(&np->n_mtime, &vattr.va_mtime)) {
 				mtx_unlock(&np->n_mtx);
 				NFSINCRGLOBAL(newnfsstats.direofcache_hits);
+	    			*ap->a_eofflag = 1;
 				return (0);
 			} else
 				mtx_unlock(&np->n_mtx);
@@ -2233,8 +2234,10 @@
 	tresid = uio->uio_resid;
 	error = ncl_bioread(vp, uio, 0, ap->a_cred);
 
-	if (!error && uio->uio_resid == tresid)
+	if (!error && uio->uio_resid == tresid) {
 		NFSINCRGLOBAL(newnfsstats.direofcache_misses);
+	    	*ap->a_eofflag = 1;
+	}
 	return (error);
 }
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20130417/4fffc028/attachment.sig>


More information about the freebsd-fs mailing list