From owner-freebsd-fs@FreeBSD.ORG Wed Apr 17 06:33:22 2013 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 1516C91E for ; Wed, 17 Apr 2013 06:33:22 +0000 (UTC) (envelope-from slovichon@gmail.com) Received: from mail-ve0-f170.google.com (mail-ve0-f170.google.com [209.85.128.170]) by mx1.freebsd.org (Postfix) with ESMTP id CC8A7E18 for ; Wed, 17 Apr 2013 06:33:21 +0000 (UTC) Received: by mail-ve0-f170.google.com with SMTP id 14so1153423vea.1 for ; Tue, 16 Apr 2013 23:33:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:date:from:to:subject:message-id:mime-version :content-type:content-disposition; bh=SA/ZOtFQysbww8IwLBrR80YRkt083yYyFTCjkqMks3U=; b=Q1hNDSshWyVOOI2xfJNL+efbD+weWbnY7TCTqKIm43bCBsw+hjhwAKe9ZiMRy+xBWz BedF2dqb8m8f7wqvhtjN4p5SQHtYkWb2GuUp7nUNLctjAyLSEiYH0nduucBhKQhUP7az 79pwO345B+RL5r1WAt4TqlUN1KaWEZEzUdZbGXfl1xCJwowsHCt0bEEhEHum8PaCPeXJ aazGJtp4QgYDy/r1LCeOO+5KpKbBUXNOPZaXRARnBMxd113TgZbDMQY1xByeGZsg0l/y M8ftlkht2iLKgd12NuZ0fuOxV65e8xr7FcyST1D1PXWQ1NxCJOR+bLzyCa2xArBF4FCY mQIQ== X-Received: by 10.58.224.101 with SMTP id rb5mr3941730vec.17.1366180401166; Tue, 16 Apr 2013 23:33:21 -0700 (PDT) Received: from localhost (c-24-131-65-84.hsd1.pa.comcast.net. [24.131.65.84]) by mx.google.com with ESMTPS id j5sm4645802vdv.13.2013.04.16.23.33.19 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 16 Apr 2013 23:33:20 -0700 (PDT) Date: Wed, 17 Apr 2013 02:33:18 -0400 From: Jared Yanovich To: freebsd-fs@freebsd.org Subject: nfs client readdir eofflag Message-ID: <20130417063318.GK14599@nightderanger.bender.mtx> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="W2ydbIOJmkm74tJ2" Content-Disposition: inline X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Apr 2013 06:33:22 -0000 --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--