From owner-svn-src-all@FreeBSD.ORG Sun May 26 12:36:57 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 0D94A92C; Sun, 26 May 2013 12:36:57 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id F393B6A0; Sun, 26 May 2013 12:36:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r4QCauEK009644; Sun, 26 May 2013 12:36:56 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r4QCaufA009642; Sun, 26 May 2013 12:36:56 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201305261236.r4QCaufA009642@svn.freebsd.org> From: Rick Macklem Date: Sun, 26 May 2013 12:36:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r250996 - stable/9/sys/fs/nfsclient X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 May 2013 12:36:57 -0000 Author: rmacklem Date: Sun May 26 12:36:56 2013 New Revision: 250996 URL: http://svnweb.freebsd.org/changeset/base/250996 Log: MFC: r250580 Add support for the eofflag to nfs_readdir() in the new NFS client so that it works under a unionfs mount. Modified: stable/9/sys/fs/nfsclient/nfs_clvnops.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- stable/9/sys/fs/nfsclient/nfs_clvnops.c Sun May 26 09:25:14 2013 (r250995) +++ stable/9/sys/fs/nfsclient/nfs_clvnops.c Sun May 26 12:36:56 2013 (r250996) @@ -2207,6 +2207,8 @@ nfs_readdir(struct vop_readdir_args *ap) 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_readdir(struct vop_readdir_args *ap) !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 @@ nfs_readdir(struct vop_readdir_args *ap) 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); }