Skip to content

Commit 586a7a8

Browse files
committed
Merge tag 'nfsd-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux
Pull nfsd updates from Chuck Lever: "This is a light release containing optimizations, code clean-ups, and minor bug fixes. This development cycle focused on work outside of upstream kernel development: - Continuing to build upstream CI for NFSD based on kdevops - Continuing to focus on the quality of NFSD in LTS kernels - Participation in IETF nfsv4 WG discussions about NFSv4 ACLs, directory delegation, and NFSv4.2 COPY offload Notable features for v6.11 that do not come through the NFSD tree include NFS server-side support for the new pNFS NVMe layout type [RFC9561]. Functional testing for pNFS block layouts like this one has been introduced to our kdevops CI harness. Work on improving the resolution of file attribute time stamps in local filesystems is also ongoing tree-wide. As always I am grateful to NFSD contributors, reviewers, testers, and bug reporters who participated during this cycle" * tag 'nfsd-6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux: nfsd: nfsd_file_lease_notifier_call gets a file_lease as an argument gss_krb5: Fix the error handling path for crypto_sync_skcipher_setkey MAINTAINERS: Add a bugzilla link for NFSD nfsd: new netlink ops to get/set server pool_mode sunrpc: refactor pool_mode setting code nfsd: allow passing in array of thread counts via netlink nfsd: make nfsd_svc take an array of thread counts sunrpc: fix up the special handling of sv_nrpools == 1 SUNRPC: Add a trace point in svc_xprt_deferred_close NFSD: Support write delegations in LAYOUTGET lockd: Use *-y instead of *-objs in Makefile NFSD: Fix nfsdcld warning svcrdma: Handle ADDR_CHANGE CM event properly svcrdma: Refactor the creation of listener CMA ID NFSD: remove unused structs 'nfsd3_voidargs' NFSD: harden svcxdr_dupstr() and svcxdr_tmpalloc() against integer overflows
2 parents 48f8bfd + 769d200 commit 586a7a8

File tree

21 files changed

+337
-127
lines changed

21 files changed

+337
-127
lines changed

Documentation/netlink/specs/nfsd.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,15 @@ attribute-sets:
115115
type: nest
116116
nested-attributes: sock
117117
multi-attr: true
118+
-
119+
name: pool-mode
120+
attributes:
121+
-
122+
name: mode
123+
type: string
124+
-
125+
name: npools
126+
type: u32
118127

119128
operations:
120129
list:
@@ -195,3 +204,21 @@ operations:
195204
reply:
196205
attributes:
197206
- addr
207+
-
208+
name: pool-mode-set
209+
doc: set the current server pool-mode
210+
attribute-set: pool-mode
211+
flags: [ admin-perm ]
212+
do:
213+
request:
214+
attributes:
215+
- mode
216+
-
217+
name: pool-mode-get
218+
doc: get info about server pool-mode
219+
attribute-set: pool-mode
220+
do:
221+
reply:
222+
attributes:
223+
- mode
224+
- npools

MAINTAINERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12065,7 +12065,7 @@ R: Dai Ngo <[email protected]>
1206512065
R: Tom Talpey <[email protected]>
1206612066
1206712067
S: Supported
12068-
W: http://nfs.sourceforge.net/
12068+
B: https://bugzilla.kernel.org
1206912069
T: git git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux.git
1207012070
F: Documentation/filesystems/nfs/
1207112071
F: fs/lockd/

fs/lockd/Makefile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ ccflags-y += -I$(src) # needed for trace events
77

88
obj-$(CONFIG_LOCKD) += lockd.o
99

10-
lockd-objs-y += clntlock.o clntproc.o clntxdr.o host.o svc.o svclock.o \
11-
svcshare.o svcproc.o svcsubs.o mon.o trace.o xdr.o
12-
lockd-objs-$(CONFIG_LOCKD_V4) += clnt4xdr.o xdr4.o svc4proc.o
13-
lockd-objs-$(CONFIG_PROC_FS) += procfs.o
14-
lockd-objs := $(lockd-objs-y)
10+
lockd-y := clntlock.o clntproc.o clntxdr.o host.o svc.o svclock.o \
11+
svcshare.o svcproc.o svcsubs.o mon.o trace.o xdr.o
12+
lockd-$(CONFIG_LOCKD_V4) += clnt4xdr.o xdr4.o svc4proc.o
13+
lockd-$(CONFIG_PROC_FS) += procfs.o

fs/nfsd/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ config NFSD_V4_SECURITY_LABEL
162162
config NFSD_LEGACY_CLIENT_TRACKING
163163
bool "Support legacy NFSv4 client tracking methods (DEPRECATED)"
164164
depends on NFSD_V4
165-
default n
165+
default y
166166
help
167167
The NFSv4 server needs to store a small amount of information on
168168
stable storage in order to handle state recovery after reboot. Most

fs/nfsd/filecache.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,7 @@ static int
664664
nfsd_file_lease_notifier_call(struct notifier_block *nb, unsigned long arg,
665665
void *data)
666666
{
667-
struct file_lock *fl = data;
667+
struct file_lease *fl = data;
668668

669669
/* Only close files for F_SETLEASE leases */
670670
if (fl->c.flc_flags & FL_LEASE)

fs/nfsd/netlink.c

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ static const struct nla_policy nfsd_listener_set_nl_policy[NFSD_A_SERVER_SOCK_AD
4040
[NFSD_A_SERVER_SOCK_ADDR] = NLA_POLICY_NESTED(nfsd_sock_nl_policy),
4141
};
4242

43+
/* NFSD_CMD_POOL_MODE_SET - do */
44+
static const struct nla_policy nfsd_pool_mode_set_nl_policy[NFSD_A_POOL_MODE_MODE + 1] = {
45+
[NFSD_A_POOL_MODE_MODE] = { .type = NLA_NUL_STRING, },
46+
};
47+
4348
/* Ops table for nfsd */
4449
static const struct genl_split_ops nfsd_nl_ops[] = {
4550
{
@@ -83,6 +88,18 @@ static const struct genl_split_ops nfsd_nl_ops[] = {
8388
.doit = nfsd_nl_listener_get_doit,
8489
.flags = GENL_CMD_CAP_DO,
8590
},
91+
{
92+
.cmd = NFSD_CMD_POOL_MODE_SET,
93+
.doit = nfsd_nl_pool_mode_set_doit,
94+
.policy = nfsd_pool_mode_set_nl_policy,
95+
.maxattr = NFSD_A_POOL_MODE_MODE,
96+
.flags = GENL_ADMIN_PERM | GENL_CMD_CAP_DO,
97+
},
98+
{
99+
.cmd = NFSD_CMD_POOL_MODE_GET,
100+
.doit = nfsd_nl_pool_mode_get_doit,
101+
.flags = GENL_CMD_CAP_DO,
102+
},
86103
};
87104

88105
struct genl_family nfsd_nl_family __ro_after_init = {

fs/nfsd/netlink.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ int nfsd_nl_version_set_doit(struct sk_buff *skb, struct genl_info *info);
2323
int nfsd_nl_version_get_doit(struct sk_buff *skb, struct genl_info *info);
2424
int nfsd_nl_listener_set_doit(struct sk_buff *skb, struct genl_info *info);
2525
int nfsd_nl_listener_get_doit(struct sk_buff *skb, struct genl_info *info);
26+
int nfsd_nl_pool_mode_set_doit(struct sk_buff *skb, struct genl_info *info);
27+
int nfsd_nl_pool_mode_get_doit(struct sk_buff *skb, struct genl_info *info);
2628

2729
extern struct genl_family nfsd_nl_family;
2830

fs/nfsd/nfs2acl.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,8 +308,6 @@ static void nfsaclsvc_release_access(struct svc_rqst *rqstp)
308308
fh_put(&resp->fh);
309309
}
310310

311-
struct nfsd3_voidargs { int dummy; };
312-
313311
#define ST 1 /* status*/
314312
#define AT 21 /* attributes */
315313
#define pAT (1+AT) /* post attributes - conditional */

fs/nfsd/nfs3acl.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,6 @@ static void nfs3svc_release_getacl(struct svc_rqst *rqstp)
221221
posix_acl_release(resp->acl_default);
222222
}
223223

224-
struct nfsd3_voidargs { int dummy; };
225-
226224
#define ST 1 /* status*/
227225
#define AT 21 /* attributes */
228226
#define pAT (1+AT) /* post attributes - conditional */

fs/nfsd/nfs4proc.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2269,7 +2269,7 @@ nfsd4_layoutget(struct svc_rqst *rqstp,
22692269
const struct nfsd4_layout_ops *ops;
22702270
struct nfs4_layout_stateid *ls;
22712271
__be32 nfserr;
2272-
int accmode = NFSD_MAY_READ_IF_EXEC;
2272+
int accmode = NFSD_MAY_READ_IF_EXEC | NFSD_MAY_OWNER_OVERRIDE;
22732273

22742274
switch (lgp->lg_seg.iomode) {
22752275
case IOMODE_READ:
@@ -2359,7 +2359,8 @@ nfsd4_layoutcommit(struct svc_rqst *rqstp,
23592359
struct nfs4_layout_stateid *ls;
23602360
__be32 nfserr;
23612361

2362-
nfserr = fh_verify(rqstp, current_fh, 0, NFSD_MAY_WRITE);
2362+
nfserr = fh_verify(rqstp, current_fh, 0,
2363+
NFSD_MAY_WRITE | NFSD_MAY_OWNER_OVERRIDE);
23632364
if (nfserr)
23642365
goto out;
23652366

0 commit comments

Comments
 (0)