Date: Mon, 19 May 2014 16:15:28 +0000 (UTC) From: Rick Macklem <rmacklem@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r266447 - stable/9/sys/fs/nfsserver Message-ID: <201405191615.s4JGFS9c050027@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rmacklem Date: Mon May 19 16:15:27 2014 New Revision: 266447 URL: http://svnweb.freebsd.org/changeset/base/266447 Log: MFC: r227809 This patch enables the new/default NFS server's use of shared vnode locking for read, readdir, readlink, getattr and access. It is hoped that this will improve server performance for these operations, since they will no longer be serialized for a given file/vnode. PR: 167048 Modified: stable/9/sys/fs/nfsserver/nfs_nfsdport.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- stable/9/sys/fs/nfsserver/nfs_nfsdport.c Mon May 19 16:13:40 2014 (r266446) +++ stable/9/sys/fs/nfsserver/nfs_nfsdport.c Mon May 19 16:15:27 2014 (r266447) @@ -2693,7 +2693,7 @@ nfsvno_fhtovp(struct mount *mp, fhandle_ if (VFS_NEEDSGIANT(mp)) error = ESTALE; else - error = VFS_FHTOVP(mp, &fhp->fh_fid, LK_EXCLUSIVE, vpp); + error = VFS_FHTOVP(mp, &fhp->fh_fid, lktype, vpp); if (error != 0) /* Make sure the server replies ESTALE to the client. */ error = ESTALE; @@ -2714,14 +2714,6 @@ nfsvno_fhtovp(struct mount *mp, fhandle_ exp->nes_secflavors[i] = secflavors[i]; } } - if (error == 0 && lktype == LK_SHARED) - /* - * It would be much better to pass lktype to VFS_FHTOVP(), - * but this will have to do until VFS_FHTOVP() has a lock - * type argument like VFS_VGET(). - */ - NFSVOPLOCK(*vpp, LK_DOWNGRADE | LK_RETRY); - NFSEXITCODE(error); return (error); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405191615.s4JGFS9c050027>