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/sunrpc: move rq_cachetype into struct nfsd_thread_local_info

The svc_rqst->rq_cachetype field is only accessed by nfsd. Move it
into the nfsd_thread_local_info instead.

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

authored by

Jeff Layton and committed by
Chuck Lever
322ecd01 55b6dd54

+8 -5
+2 -1
fs/nfsd/nfs4xdr.c
··· 2598 2598 static bool 2599 2599 nfsd4_decode_compound(struct nfsd4_compoundargs *argp) 2600 2600 { 2601 + struct nfsd_thread_local_info *ntli = argp->rqstp->rq_private; 2601 2602 struct nfsd4_op *op; 2602 2603 bool cachethis = false; 2603 2604 int auth_slack= argp->rqstp->rq_auth_slack; ··· 2691 2690 if (argp->minorversion) 2692 2691 cachethis = false; 2693 2692 svc_reserve_auth(argp->rqstp, max_reply + readbytes); 2694 - argp->rqstp->rq_cachetype = cachethis ? RC_REPLBUFF : RC_NOCACHE; 2693 + ntli->ntli_cachetype = cachethis ? RC_REPLBUFF : RC_NOCACHE; 2695 2694 2696 2695 argp->splice_ok = nfsd_read_splice_ok(argp->rqstp); 2697 2696 if (readcount > 1 || max_reply > PAGE_SIZE - auth_slack)
+2 -1
fs/nfsd/nfscache.c
··· 467 467 unsigned int len, struct nfsd_cacherep **cacherep) 468 468 { 469 469 struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id); 470 + struct nfsd_thread_local_info *ntli = rqstp->rq_private; 470 471 struct nfsd_cacherep *rp, *found; 471 472 __wsum csum; 472 473 struct nfsd_drc_bucket *b; 473 - int type = rqstp->rq_cachetype; 474 + int type = ntli->ntli_cachetype; 474 475 LIST_HEAD(dispose); 475 476 int rtn = RC_DOIT; 476 477
+1
fs/nfsd/nfsd.h
··· 84 84 85 85 struct nfsd_thread_local_info { 86 86 struct nfs4_client **ntli_lease_breaker; 87 + int ntli_cachetype; 87 88 }; 88 89 89 90 /*
+3 -2
fs/nfsd/nfssvc.c
··· 972 972 */ 973 973 int nfsd_dispatch(struct svc_rqst *rqstp) 974 974 { 975 + struct nfsd_thread_local_info *ntli = rqstp->rq_private; 975 976 const struct svc_procedure *proc = rqstp->rq_procinfo; 976 977 __be32 *statp = rqstp->rq_accept_statp; 977 978 struct nfsd_cacherep *rp; ··· 983 982 * Give the xdr decoder a chance to change this if it wants 984 983 * (necessary in the NFSv4.0 compound case) 985 984 */ 986 - rqstp->rq_cachetype = proc->pc_cachetype; 985 + ntli->ntli_cachetype = proc->pc_cachetype; 987 986 988 987 /* 989 988 * ->pc_decode advances the argument stream past the NFS ··· 1028 1027 */ 1029 1028 smp_store_release(&rqstp->rq_status_counter, rqstp->rq_status_counter + 1); 1030 1029 1031 - nfsd_cache_update(rqstp, rp, rqstp->rq_cachetype, nfs_reply); 1030 + nfsd_cache_update(rqstp, rp, ntli->ntli_cachetype, nfs_reply); 1032 1031 out_cached_reply: 1033 1032 return 1; 1034 1033
-1
include/linux/sunrpc/svc.h
··· 218 218 u32 rq_vers; /* program version */ 219 219 u32 rq_proc; /* procedure number */ 220 220 u32 rq_prot; /* IP protocol */ 221 - int rq_cachetype; /* catering to nfsd */ 222 221 unsigned long rq_flags; /* flags field */ 223 222 ktime_t rq_qtime; /* enqueue time */ 224 223