Skip to content

Commit f7976a6

Browse files
committed
Merge tag 'nfsd-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux
Pull nfsd updates from Chuck Lever: - Clean-ups in the READ path in anticipation of MSG_SPLICE_PAGES - Better NUMA awareness when allocating pages and other objects - A number of minor clean-ups to XDR encoding - Elimination of a race when accepting a TCP socket - Numerous observability enhancements * tag 'nfsd-6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux: (46 commits) nfsd: remove redundant assignments to variable len svcrdma: Fix stale comment NFSD: Distinguish per-net namespace initialization nfsd: move init of percpu reply_cache_stats counters back to nfsd_init_net SUNRPC: Address RCU warning in net/sunrpc/svc.c SUNRPC: Use sysfs_emit in place of strlcpy/sprintf SUNRPC: Remove transport class dprintk call sites SUNRPC: Fix comments for transport class registration svcrdma: Remove an unused argument from __svc_rdma_put_rw_ctxt() svcrdma: trace cc_release calls svcrdma: Convert "might sleep" comment into a code annotation NFSD: Add an nfsd4_encode_nfstime4() helper SUNRPC: Move initialization of rq_stime SUNRPC: Optimize page release in svc_rdma_sendto() svcrdma: Prevent page release when nothing was received svcrdma: Revert 2a1e4f2 ("svcrdma: Normalize Send page handling") SUNRPC: Revert 5799006 ("svcrdma: Remove unused sc_pages field") SUNRPC: Revert cc93ce9 ("svcrdma: Retain the page backing rq_res.head[0].iov_base") NFSD: add encoding of op_recall flag for write delegation NFSD: Add "official" reviewers for this subsystem ...
2 parents c0a572d + 75bfb70 commit f7976a6

31 files changed

+801
-434
lines changed

.mailmap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,8 @@ Henrik Rydberg <rydberg@bitmath.org>
183183
Herbert Xu <herbert@gondor.apana.org.au>
184184
Huacai Chen <chenhuacai@kernel.org> <chenhc@lemote.com>
185185
Huacai Chen <chenhuacai@kernel.org> <chenhuacai@loongson.cn>
186+
J. Bruce Fields <bfields@fieldses.org> <bfields@redhat.com>
187+
J. Bruce Fields <bfields@fieldses.org> <bfields@citi.umich.edu>
186188
Jacob Shin <Jacob.Shin@amd.com>
187189
Jaegeuk Kim <jaegeuk@kernel.org> <jaegeuk@google.com>
188190
Jaegeuk Kim <jaegeuk@kernel.org> <jaegeuk.kim@samsung.com>

MAINTAINERS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11275,6 +11275,10 @@ W: http://kernelnewbies.org/KernelJanitors
1127511275
KERNEL NFSD, SUNRPC, AND LOCKD SERVERS
1127611276
M: Chuck Lever <chuck.lever@oracle.com>
1127711277
M: Jeff Layton <jlayton@kernel.org>
11278+
R: Neil Brown <neilb@suse.de>
11279+
R: Olga Kornievskaia <kolga@netapp.com>
11280+
R: Dai Ngo <Dai.Ngo@oracle.com>
11281+
R: Tom Talpey <tom@talpey.com>
1127811282
L: linux-nfs@vger.kernel.org
1127911283
S: Supported
1128011284
W: http://nfs.sourceforge.net/

fs/lockd/svc.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,6 @@ static int lockd_get(void)
355355
int error;
356356

357357
if (nlmsvc_serv) {
358-
svc_get(nlmsvc_serv);
359358
nlmsvc_users++;
360359
return 0;
361360
}

fs/nfsd/cache.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ enum {
8080

8181
int nfsd_drc_slab_create(void);
8282
void nfsd_drc_slab_free(void);
83+
int nfsd_net_reply_cache_init(struct nfsd_net *nn);
84+
void nfsd_net_reply_cache_destroy(struct nfsd_net *nn);
8385
int nfsd_reply_cache_init(struct nfsd_net *);
8486
void nfsd_reply_cache_shutdown(struct nfsd_net *);
8587
int nfsd_cache_lookup(struct svc_rqst *);

fs/nfsd/export.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ static int expkey_parse(struct cache_detail *cd, char *mesg, int mlen)
9797
goto out;
9898

9999
err = -EINVAL;
100-
if ((len=qword_get(&mesg, buf, PAGE_SIZE)) <= 0)
100+
if (qword_get(&mesg, buf, PAGE_SIZE) <= 0)
101101
goto out;
102102

103103
err = -ENOENT;
@@ -107,7 +107,7 @@ static int expkey_parse(struct cache_detail *cd, char *mesg, int mlen)
107107
dprintk("found domain %s\n", buf);
108108

109109
err = -EINVAL;
110-
if ((len=qword_get(&mesg, buf, PAGE_SIZE)) <= 0)
110+
if (qword_get(&mesg, buf, PAGE_SIZE) <= 0)
111111
goto out;
112112
fsidtype = simple_strtoul(buf, &ep, 10);
113113
if (*ep)
@@ -593,7 +593,6 @@ static int svc_export_parse(struct cache_detail *cd, char *mesg, int mlen)
593593
{
594594
/* client path expiry [flags anonuid anongid fsid] */
595595
char *buf;
596-
int len;
597596
int err;
598597
struct auth_domain *dom = NULL;
599598
struct svc_export exp = {}, *expp;
@@ -609,8 +608,7 @@ static int svc_export_parse(struct cache_detail *cd, char *mesg, int mlen)
609608

610609
/* client */
611610
err = -EINVAL;
612-
len = qword_get(&mesg, buf, PAGE_SIZE);
613-
if (len <= 0)
611+
if (qword_get(&mesg, buf, PAGE_SIZE) <= 0)
614612
goto out;
615613

616614
err = -ENOENT;
@@ -620,7 +618,7 @@ static int svc_export_parse(struct cache_detail *cd, char *mesg, int mlen)
620618

621619
/* path */
622620
err = -EINVAL;
623-
if ((len = qword_get(&mesg, buf, PAGE_SIZE)) <= 0)
621+
if (qword_get(&mesg, buf, PAGE_SIZE) <= 0)
624622
goto out1;
625623

626624
err = kern_path(buf, 0, &exp.ex_path);
@@ -665,7 +663,7 @@ static int svc_export_parse(struct cache_detail *cd, char *mesg, int mlen)
665663
goto out3;
666664
exp.ex_fsid = an_int;
667665

668-
while ((len = qword_get(&mesg, buf, PAGE_SIZE)) > 0) {
666+
while (qword_get(&mesg, buf, PAGE_SIZE) > 0) {
669667
if (strcmp(buf, "fsloc") == 0)
670668
err = fsloc_parse(&mesg, buf, &exp.ex_fslocs);
671669
else if (strcmp(buf, "uuid") == 0)

fs/nfsd/nfs3proc.c

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,6 @@ nfsd3_proc_read(struct svc_rqst *rqstp)
151151
{
152152
struct nfsd3_readargs *argp = rqstp->rq_argp;
153153
struct nfsd3_readres *resp = rqstp->rq_resp;
154-
unsigned int len;
155-
int v;
156154

157155
dprintk("nfsd: READ(3) %s %lu bytes at %Lu\n",
158156
SVCFH_fmt(&argp->fh),
@@ -166,17 +164,7 @@ nfsd3_proc_read(struct svc_rqst *rqstp)
166164
if (argp->offset + argp->count > (u64)OFFSET_MAX)
167165
argp->count = (u64)OFFSET_MAX - argp->offset;
168166

169-
v = 0;
170-
len = argp->count;
171167
resp->pages = rqstp->rq_next_page;
172-
while (len > 0) {
173-
struct page *page = *(rqstp->rq_next_page++);
174-
175-
rqstp->rq_vec[v].iov_base = page_address(page);
176-
rqstp->rq_vec[v].iov_len = min_t(unsigned int, len, PAGE_SIZE);
177-
len -= rqstp->rq_vec[v].iov_len;
178-
v++;
179-
}
180168

181169
/* Obtain buffer pointer for payload.
182170
* 1 (status) + 22 (post_op_attr) + 1 (count) + 1 (eof)
@@ -187,7 +175,7 @@ nfsd3_proc_read(struct svc_rqst *rqstp)
187175

188176
fh_copy(&resp->fh, &argp->fh);
189177
resp->status = nfsd_read(rqstp, &resp->fh, argp->offset,
190-
rqstp->rq_vec, v, &resp->count, &resp->eof);
178+
&resp->count, &resp->eof);
191179
return rpc_success;
192180
}
193181

fs/nfsd/nfs3xdr.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -828,7 +828,8 @@ nfs3svc_encode_readlinkres(struct svc_rqst *rqstp, struct xdr_stream *xdr)
828828
return false;
829829
if (xdr_stream_encode_u32(xdr, resp->len) < 0)
830830
return false;
831-
xdr_write_pages(xdr, resp->pages, 0, resp->len);
831+
svcxdr_encode_opaque_pages(rqstp, xdr, resp->pages, 0,
832+
resp->len);
832833
if (svc_encode_result_payload(rqstp, head->iov_len, resp->len) < 0)
833834
return false;
834835
break;
@@ -859,8 +860,9 @@ nfs3svc_encode_readres(struct svc_rqst *rqstp, struct xdr_stream *xdr)
859860
return false;
860861
if (xdr_stream_encode_u32(xdr, resp->count) < 0)
861862
return false;
862-
xdr_write_pages(xdr, resp->pages, rqstp->rq_res.page_base,
863-
resp->count);
863+
svcxdr_encode_opaque_pages(rqstp, xdr, resp->pages,
864+
rqstp->rq_res.page_base,
865+
resp->count);
864866
if (svc_encode_result_payload(rqstp, head->iov_len, resp->count) < 0)
865867
return false;
866868
break;
@@ -961,7 +963,8 @@ nfs3svc_encode_readdirres(struct svc_rqst *rqstp, struct xdr_stream *xdr)
961963
return false;
962964
if (!svcxdr_encode_cookieverf3(xdr, resp->verf))
963965
return false;
964-
xdr_write_pages(xdr, dirlist->pages, 0, dirlist->len);
966+
svcxdr_encode_opaque_pages(rqstp, xdr, dirlist->pages, 0,
967+
dirlist->len);
965968
/* no more entries */
966969
if (xdr_stream_encode_item_absent(xdr) < 0)
967970
return false;

0 commit comments

Comments
 (0)