nfs client readdir eofflag

Rick Macklem rmacklem at uoguelph.ca
Wed Apr 17 21:38:12 UTC 2013


Jared Yanovich wrote:
> Hi, is there a reason why eofflag isn't set in nfsclient readdir()?
> 
> This now allows union mounts to work for NFS above NFS.
> 
This patch looks ok to me. (I don't know, but my guess is that, since
only the NFS server used eofflag for a long time, the code just didn't
bother setting it.)

If you aren't a src committer (I don't recognize your name), I will
put testing/committing this patch on my "to do" list. (If you are a
src committer, feel free to commit it.)

Thanks for reporting this, rick

> /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);
> }


More information about the freebsd-fs mailing list