Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Apr 2013 17:37:59 -0400 (EDT)
From:      Rick Macklem <rmacklem@uoguelph.ca>
To:        Jared Yanovich <slovichon@gmail.com>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: nfs client readdir eofflag
Message-ID:  <1761576953.936301.1366234679793.JavaMail.root@erie.cs.uoguelph.ca>
In-Reply-To: <20130417063318.GK14599@nightderanger.bender.mtx>

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



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