Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

nfsd: rename NFS4_SHARE_WANT_* constants to OPEN4_SHARE_ACCESS_WANT_*

Add the OPEN4_SHARE_ACCESS_WANT constants from the nfs4.1 and delstid
draft into the nfs4_1.x file, and regenerate the headers and source
files. Do a mass renaming of NFS4_SHARE_WANT_* to
OPEN4_SHARE_ACCESS_WANT_* in the nfsd directory.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>

authored by

Jeff Layton and committed by
Chuck Lever
c9c99a33 8dfbea8b

+51 -20
+14 -1
Documentation/sunrpc/xdr/nfs4_1.x
··· 138 138 const FATTR4_OPEN_ARGUMENTS = 86; 139 139 140 140 141 - const OPEN4_SHARE_ACCESS_WANT_OPEN_XOR_DELEGATION = 0x200000; 142 141 143 142 144 143 const OPEN4_RESULT_NO_OPEN_STATEID = 0x00000010; ··· 160 161 const FATTR4_TIME_DELEG_ACCESS = 84; 161 162 const FATTR4_TIME_DELEG_MODIFY = 85; 162 163 164 + 165 + 166 + /* new flags for share_access field of OPEN4args */ 167 + const OPEN4_SHARE_ACCESS_WANT_DELEG_MASK = 0xFF00; 168 + const OPEN4_SHARE_ACCESS_WANT_NO_PREFERENCE = 0x0000; 169 + const OPEN4_SHARE_ACCESS_WANT_READ_DELEG = 0x0100; 170 + const OPEN4_SHARE_ACCESS_WANT_WRITE_DELEG = 0x0200; 171 + const OPEN4_SHARE_ACCESS_WANT_ANY_DELEG = 0x0300; 172 + const OPEN4_SHARE_ACCESS_WANT_NO_DELEG = 0x0400; 173 + const OPEN4_SHARE_ACCESS_WANT_CANCEL = 0x0500; 174 + 175 + const OPEN4_SHARE_ACCESS_WANT_SIGNAL_DELEG_WHEN_RESRC_AVAIL = 0x10000; 176 + const OPEN4_SHARE_ACCESS_WANT_PUSH_DELEG_WHEN_UNCONTENDED = 0x20000; 163 177 const OPEN4_SHARE_ACCESS_WANT_DELEG_TIMESTAMPS = 0x100000; 178 + const OPEN4_SHARE_ACCESS_WANT_OPEN_XOR_DELEGATION = 0x200000; 164 179 165 180 enum open_delegation_type4 { 166 181 OPEN_DELEGATE_NONE = 0,
+8 -8
fs/nfsd/nfs4state.c
··· 6073 6073 else { 6074 6074 open->op_why_no_deleg = WND4_RESOURCE; 6075 6075 switch (open->op_deleg_want) { 6076 - case NFS4_SHARE_WANT_READ_DELEG: 6077 - case NFS4_SHARE_WANT_WRITE_DELEG: 6078 - case NFS4_SHARE_WANT_ANY_DELEG: 6076 + case OPEN4_SHARE_ACCESS_WANT_READ_DELEG: 6077 + case OPEN4_SHARE_ACCESS_WANT_WRITE_DELEG: 6078 + case OPEN4_SHARE_ACCESS_WANT_ANY_DELEG: 6079 6079 break; 6080 - case NFS4_SHARE_WANT_CANCEL: 6080 + case OPEN4_SHARE_ACCESS_WANT_CANCEL: 6081 6081 open->op_why_no_deleg = WND4_CANCELLED; 6082 6082 break; 6083 - case NFS4_SHARE_WANT_NO_DELEG: 6083 + case OPEN4_SHARE_ACCESS_WANT_NO_DELEG: 6084 6084 WARN_ON_ONCE(1); 6085 6085 } 6086 6086 } ··· 6210 6210 static void nfsd4_deleg_xgrade_none_ext(struct nfsd4_open *open, 6211 6211 struct nfs4_delegation *dp) 6212 6212 { 6213 - if (open->op_deleg_want == NFS4_SHARE_WANT_READ_DELEG && 6213 + if (open->op_deleg_want == OPEN4_SHARE_ACCESS_WANT_READ_DELEG && 6214 6214 dp->dl_type == OPEN_DELEGATE_WRITE) { 6215 6215 open->op_delegate_type = OPEN_DELEGATE_NONE_EXT; 6216 6216 open->op_why_no_deleg = WND4_NOT_SUPP_DOWNGRADE; 6217 - } else if (open->op_deleg_want == NFS4_SHARE_WANT_WRITE_DELEG && 6217 + } else if (open->op_deleg_want == OPEN4_SHARE_ACCESS_WANT_WRITE_DELEG && 6218 6218 dp->dl_type == OPEN_DELEGATE_WRITE) { 6219 6219 open->op_delegate_type = OPEN_DELEGATE_NONE_EXT; 6220 6220 open->op_why_no_deleg = WND4_NOT_SUPP_UPGRADE; ··· 6310 6310 mutex_unlock(&stp->st_mutex); 6311 6311 6312 6312 if (nfsd4_has_session(&resp->cstate)) { 6313 - if (open->op_deleg_want & NFS4_SHARE_WANT_NO_DELEG) { 6313 + if (open->op_deleg_want & OPEN4_SHARE_ACCESS_WANT_NO_DELEG) { 6314 6314 open->op_delegate_type = OPEN_DELEGATE_NONE_EXT; 6315 6315 open->op_why_no_deleg = WND4_NOT_WANTED; 6316 6316 goto nodeleg;
+6 -6
fs/nfsd/nfs4xdr.c
··· 1067 1067 if (!argp->minorversion) 1068 1068 return nfserr_bad_xdr; 1069 1069 switch (w & NFS4_SHARE_WANT_MASK) { 1070 - case NFS4_SHARE_WANT_NO_PREFERENCE: 1071 - case NFS4_SHARE_WANT_READ_DELEG: 1072 - case NFS4_SHARE_WANT_WRITE_DELEG: 1073 - case NFS4_SHARE_WANT_ANY_DELEG: 1074 - case NFS4_SHARE_WANT_NO_DELEG: 1075 - case NFS4_SHARE_WANT_CANCEL: 1070 + case OPEN4_SHARE_ACCESS_WANT_NO_PREFERENCE: 1071 + case OPEN4_SHARE_ACCESS_WANT_READ_DELEG: 1072 + case OPEN4_SHARE_ACCESS_WANT_WRITE_DELEG: 1073 + case OPEN4_SHARE_ACCESS_WANT_ANY_DELEG: 1074 + case OPEN4_SHARE_ACCESS_WANT_NO_DELEG: 1075 + case OPEN4_SHARE_ACCESS_WANT_CANCEL: 1076 1076 break; 1077 1077 default: 1078 1078 return nfserr_bad_xdr;
+1 -1
fs/nfsd/nfs4xdr_gen.c
··· 1 1 // SPDX-License-Identifier: GPL-2.0 2 2 // Generated by xdrgen. Manual edits will be lost. 3 3 // XDR specification file: ../../Documentation/sunrpc/xdr/nfs4_1.x 4 - // XDR specification modification time: Sat Oct 12 08:10:54 2024 4 + // XDR specification modification time: Mon Oct 14 09:10:13 2024 5 5 6 6 #include <linux/sunrpc/svc.h> 7 7
+1 -1
fs/nfsd/nfs4xdr_gen.h
··· 1 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 2 /* Generated by xdrgen. Manual edits will be lost. */ 3 3 /* XDR specification file: ../../Documentation/sunrpc/xdr/nfs4_1.x */ 4 - /* XDR specification modification time: Sat Oct 12 08:10:54 2024 */ 4 + /* XDR specification modification time: Mon Oct 14 09:10:13 2024 */ 5 5 6 6 #ifndef _LINUX_XDRGEN_NFS4_1_DECL_H 7 7 #define _LINUX_XDRGEN_NFS4_1_DECL_H
+21 -3
include/linux/sunrpc/xdrgen/nfs4_1.h
··· 1 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 2 /* Generated by xdrgen. Manual edits will be lost. */ 3 3 /* XDR specification file: ../../Documentation/sunrpc/xdr/nfs4_1.x */ 4 - /* XDR specification modification time: Sat Oct 12 08:10:54 2024 */ 4 + /* XDR specification modification time: Mon Oct 14 09:10:13 2024 */ 5 5 6 6 #ifndef _LINUX_XDRGEN_NFS4_1_DEF_H 7 7 #define _LINUX_XDRGEN_NFS4_1_DEF_H ··· 84 84 85 85 enum { FATTR4_OPEN_ARGUMENTS = 86 }; 86 86 87 - enum { OPEN4_SHARE_ACCESS_WANT_OPEN_XOR_DELEGATION = 0x200000 }; 88 - 89 87 enum { OPEN4_RESULT_NO_OPEN_STATEID = 0x00000010 }; 90 88 91 89 typedef struct nfstime4 fattr4_time_deleg_access; ··· 94 96 95 97 enum { FATTR4_TIME_DELEG_MODIFY = 85 }; 96 98 99 + enum { OPEN4_SHARE_ACCESS_WANT_DELEG_MASK = 0xFF00 }; 100 + 101 + enum { OPEN4_SHARE_ACCESS_WANT_NO_PREFERENCE = 0x0000 }; 102 + 103 + enum { OPEN4_SHARE_ACCESS_WANT_READ_DELEG = 0x0100 }; 104 + 105 + enum { OPEN4_SHARE_ACCESS_WANT_WRITE_DELEG = 0x0200 }; 106 + 107 + enum { OPEN4_SHARE_ACCESS_WANT_ANY_DELEG = 0x0300 }; 108 + 109 + enum { OPEN4_SHARE_ACCESS_WANT_NO_DELEG = 0x0400 }; 110 + 111 + enum { OPEN4_SHARE_ACCESS_WANT_CANCEL = 0x0500 }; 112 + 113 + enum { OPEN4_SHARE_ACCESS_WANT_SIGNAL_DELEG_WHEN_RESRC_AVAIL = 0x10000 }; 114 + 115 + enum { OPEN4_SHARE_ACCESS_WANT_PUSH_DELEG_WHEN_UNCONTENDED = 0x20000 }; 116 + 97 117 enum { OPEN4_SHARE_ACCESS_WANT_DELEG_TIMESTAMPS = 0x100000 }; 118 + 119 + enum { OPEN4_SHARE_ACCESS_WANT_OPEN_XOR_DELEGATION = 0x200000 }; 98 120 99 121 enum open_delegation_type4 { 100 122 OPEN_DELEGATE_NONE = 0,