git: f37dc50d9f08 - main - nfscl: Do not do a Lookup+Open for pNFS mounts
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 17 Mar 2022 14:49:00 UTC
The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=f37dc50d9f082cb9ce427847aa7227b6d4d44465 commit f37dc50d9f082cb9ce427847aa7227b6d4d44465 Author: Rick Macklem <rmacklem@FreeBSD.org> AuthorDate: 2022-03-17 14:48:06 +0000 Commit: Rick Macklem <rmacklem@FreeBSD.org> CommitDate: 2022-03-17 14:48:06 +0000 nfscl: Do not do a Lookup+Open for pNFS mounts A NFSv4.1/4.2 pNFS mount needs to do a separate Open+LayoutGet RPC, so do not do a Lookup+Open RPC for these mounts. The Lookup+Open RPCs are still disabled, until further testing is done, so this patch has no effect at this time. --- sys/fs/nfsclient/nfs_clvnops.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c index ba2ba27b8fb6..528095078729 100644 --- a/sys/fs/nfsclient/nfs_clvnops.c +++ b/sys/fs/nfsclient/nfs_clvnops.c @@ -1333,9 +1333,11 @@ nfs_lookup(struct vop_lookup_args *ap) * option, it is possible to do the Open operation in the same * compound as Lookup, so long as delegations are not being * issued. This saves doing a separate RPC for Open. + * For pnfs, do not do this, since the Open+LayoutGet will + * be needed as a separate RPC. */ NFSLOCKMNT(nmp); - if (NFSHASNFSV4N(nmp) && NFSHASONEOPENOWN(nmp) && + if (NFSHASNFSV4N(nmp) && NFSHASONEOPENOWN(nmp) && !NFSHASPNFS(nmp) && (nmp->nm_privflag & NFSMNTP_DELEGISSUED) == 0 && (!NFSMNT_RDONLY(mp) || (flags & OPENWRITE) == 0) && (flags & (ISLASTCN | ISOPEN)) == (ISLASTCN | ISOPEN)) {