[Midnightbsd-cvs] src [9428] trunk/sys/fs/nfsclient/nfs_clvnops.c: Add support for the eofflag to nfs_readdir() in the new NFS
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sun Mar 5 09:22:43 EST 2017
Revision: 9428
http://svnweb.midnightbsd.org/src/?rev=9428
Author: laffer1
Date: 2017-03-05 09:22:43 -0500 (Sun, 05 Mar 2017)
Log Message:
-----------
Add support for the eofflag to nfs_readdir() in the new NFS
client so that it works under a unionfs mount.
Modified Paths:
--------------
trunk/sys/fs/nfsclient/nfs_clvnops.c
Modified: trunk/sys/fs/nfsclient/nfs_clvnops.c
===================================================================
--- trunk/sys/fs/nfsclient/nfs_clvnops.c 2017-03-04 23:23:39 UTC (rev 9427)
+++ trunk/sys/fs/nfsclient/nfs_clvnops.c 2017-03-05 14:22:43 UTC (rev 9428)
@@ -2207,6 +2207,8 @@
int error = 0;
struct vattr vattr;
+ if (ap->a_eofflag != NULL)
+ *ap->a_eofflag = 0;
if (vp->v_type != VDIR)
return(EPERM);
@@ -2221,6 +2223,8 @@
!NFS_TIMESPEC_COMPARE(&np->n_mtime, &vattr.va_mtime)) {
mtx_unlock(&np->n_mtx);
NFSINCRGLOBAL(newnfsstats.direofcache_hits);
+ if (ap->a_eofflag != NULL)
+ *ap->a_eofflag = 1;
return (0);
} else
mtx_unlock(&np->n_mtx);
@@ -2233,8 +2237,11 @@
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);
+ if (ap->a_eofflag != NULL)
+ *ap->a_eofflag = 1;
+ }
return (error);
}
More information about the Midnightbsd-cvs
mailing list