Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 May 2021 01:40:49 GMT
From:      Rick Macklem <rmacklem@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: d80a903a1c2a - main - nfsd: Add support for CLAIM_DELEG_PREV_FH to the NFSv4.1/4.2 Open
Message-ID:  <202105210140.14L1enks052802@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by rmacklem:

URL: https://cgit.FreeBSD.org/src/commit/?id=d80a903a1c2acd73afbf06598955a0887433f8c6

commit d80a903a1c2acd73afbf06598955a0887433f8c6
Author:     Rick Macklem <rmacklem@FreeBSD.org>
AuthorDate: 2021-05-21 01:37:40 +0000
Commit:     Rick Macklem <rmacklem@FreeBSD.org>
CommitDate: 2021-05-21 01:37:40 +0000

    nfsd: Add support for CLAIM_DELEG_PREV_FH to the NFSv4.1/4.2 Open
    
    Commit b3d4c70dc60f added support for CLAIM_DELEG_CUR_FH to Open.
    While doing this, I noticed that CLAIM_DELEG_PREV_FH support
    could be added the same way.  Although I am not aware of any extant
    NFSv4.1/4.2 client that uses this claim type, it seems prudent to add
    support for this variant of Open to the NFSv4.1/4.2 server.
    
    This patch does not affect mounts from extant NFSv4.1/4.2 clients,
    as far as I know.
    
    MFC after:      2 weeks
---
 sys/fs/nfsserver/nfs_nfsdserv.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/sys/fs/nfsserver/nfs_nfsdserv.c b/sys/fs/nfsserver/nfs_nfsdserv.c
index 5d6cac23b722..ef78f90fabfc 100644
--- a/sys/fs/nfsserver/nfs_nfsdserv.c
+++ b/sys/fs/nfsserver/nfs_nfsdserv.c
@@ -2987,7 +2987,8 @@ nfsrvd_open(struct nfsrv_descript *nd, __unused int isdgram,
 		stateid.seqid = fxdr_unsigned(u_int32_t, *tl++);
 		NFSBCOPY((caddr_t)tl,(caddr_t)stateid.other,NFSX_STATEIDOTHER);
 		stp->ls_flags |= NFSLCK_DELEGCUR;
-	} else if (claim == NFSV4OPEN_CLAIMDELEGATEPREV) {
+	} else if (claim == NFSV4OPEN_CLAIMDELEGATEPREV || claim ==
+	    NFSV4OPEN_CLAIMDELEGATEPREVFH) {
 		stp->ls_flags |= NFSLCK_DELEGPREV;
 	}
 	if (claim == NFSV4OPEN_CLAIMNULL || claim == NFSV4OPEN_CLAIMDELEGATECUR
@@ -3057,7 +3058,8 @@ nfsrvd_open(struct nfsrv_descript *nd, __unused int isdgram,
 		    &exclusive_flag, &nva, cverf, create, aclp, &attrbits,
 		    nd->nd_cred, exp, &vp);
 	} else if (claim == NFSV4OPEN_CLAIMPREVIOUS || claim ==
-	    NFSV4OPEN_CLAIMFH || claim == NFSV4OPEN_CLAIMDELEGATECURFH) {
+	    NFSV4OPEN_CLAIMFH || claim == NFSV4OPEN_CLAIMDELEGATECURFH ||
+	    claim == NFSV4OPEN_CLAIMDELEGATEPREVFH) {
 		if (claim == NFSV4OPEN_CLAIMPREVIOUS) {
 			NFSM_DISSECT(tl, u_int32_t *, NFSX_UNSIGNED);
 			i = fxdr_unsigned(int, *tl);



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