Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Apr 2013 02:33:18 -0400
From:      Jared Yanovich <slovichon@gmail.com>
To:        freebsd-fs@freebsd.org
Subject:   nfs client readdir eofflag
Message-ID:  <20130417063318.GK14599@nightderanger.bender.mtx>

next in thread | raw e-mail | index | archive | help

--W2ydbIOJmkm74tJ2
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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

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

/sys/fs/nfsclient

Index: nfs_clvnops.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- 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 =3D 1;
 				return (0);
 			} else
 				mtx_unlock(&np->n_mtx);
@@ -2233,8 +2234,10 @@
 	tresid =3D uio->uio_resid;
 	error =3D ncl_bioread(vp, uio, 0, ap->a_cred);
=20
-	if (!error && uio->uio_resid =3D=3D tresid)
+	if (!error && uio->uio_resid =3D=3D tresid) {
 		NFSINCRGLOBAL(newnfsstats.direofcache_misses);
+	    	*ap->a_eofflag =3D 1;
+	}
 	return (error);
 }
=20

--W2ydbIOJmkm74tJ2
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.13 (OpenBSD)

iQEcBAEBAgAGBQJRbkIuAAoJEPT+vgUENeYM0VMH+gI9DO9ReGDzWMA0gnC9clq8
NSy7rTvGCZ+0/BqAJ1e+COZLfrxX70GarigQNMkLKG1mrGv/lXzSFbE/KgXXZYNJ
lCPl/Cw2WyIobfNgXlbq4tFVZFmz3Lg1VRT8RezxyGeFruxI1aEtGP5ox+moImEu
+Qf2UdVP3R6sHbvT/ktxp98kwGH7r8rD3eg3J5H27SVSsQTa3QPNytaPliY4boI9
PtnS7iZ8s8MN5d9PXuXHAciWOyztMQqcniUzJ+EtbhcjS/68MuB1mj+UqwDHnPXL
LSBlcUPg7rUAk/oxQ0PeeRBnyxFUP/QwqDa3/LGMDursuVm45Zmt/bTh7r+YQlc=
=QQUV
-----END PGP SIGNATURE-----

--W2ydbIOJmkm74tJ2--



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