diff options
author | Jeff Layton <jlayton@primarydata.com> | 2014-11-19 07:51:15 -0500 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2014-12-09 11:21:21 -0500 |
commit | 7501cc2bcf9a71cc1f19e38775c234815ee44578 (patch) | |
tree | cd60b136d4912a98a5efa722e4028bf5c3a29551 | |
parent | 4d152e2c9a6a3e3556ce5da7782a9e2836edbe0f (diff) |
sunrpc: move rq_local field to rq_flags
Signed-off-by: Jeff Layton <jlayton@primarydata.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
-rw-r--r-- | fs/nfsd/vfs.c | 4 | ||||
-rw-r--r-- | include/linux/sunrpc/svc.h | 2 | ||||
-rw-r--r-- | include/trace/events/sunrpc.h | 3 | ||||
-rw-r--r-- | net/sunrpc/svcsock.c | 5 |
4 files changed, 9 insertions, 5 deletions
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index f1999619d516..60c25850fb16 100644 --- a/fs/nfsd/vfs.c +++ b/fs/nfsd/vfs.c | |||
@@ -962,7 +962,7 @@ nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file, | |||
962 | loff_t end = LLONG_MAX; | 962 | loff_t end = LLONG_MAX; |
963 | unsigned int pflags = current->flags; | 963 | unsigned int pflags = current->flags; |
964 | 964 | ||
965 | if (rqstp->rq_local) | 965 | if (test_bit(RQ_LOCAL, &rqstp->rq_flags)) |
966 | /* | 966 | /* |
967 | * We want less throttling in balance_dirty_pages() | 967 | * We want less throttling in balance_dirty_pages() |
968 | * and shrink_inactive_list() so that nfs to | 968 | * and shrink_inactive_list() so that nfs to |
@@ -1006,7 +1006,7 @@ out_nfserr: | |||
1006 | err = 0; | 1006 | err = 0; |
1007 | else | 1007 | else |
1008 | err = nfserrno(host_err); | 1008 | err = nfserrno(host_err); |
1009 | if (rqstp->rq_local) | 1009 | if (test_bit(RQ_LOCAL, &rqstp->rq_flags)) |
1010 | tsk_restore_flags(current, pflags, PF_LESS_THROTTLE); | 1010 | tsk_restore_flags(current, pflags, PF_LESS_THROTTLE); |
1011 | return err; | 1011 | return err; |
1012 | } | 1012 | } |
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index b60eb7c3f3f7..a91df9047f32 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h | |||
@@ -254,8 +254,8 @@ struct svc_rqst { | |||
254 | u32 rq_proc; /* procedure number */ | 254 | u32 rq_proc; /* procedure number */ |
255 | u32 rq_prot; /* IP protocol */ | 255 | u32 rq_prot; /* IP protocol */ |
256 | #define RQ_SECURE (0) /* secure port */ | 256 | #define RQ_SECURE (0) /* secure port */ |
257 | #define RQ_LOCAL (1) /* local request */ | ||
257 | unsigned long rq_flags; /* flags field */ | 258 | unsigned long rq_flags; /* flags field */ |
258 | unsigned short rq_local : 1; /* local request */ | ||
259 | 259 | ||
260 | void * rq_argp; /* decoded arguments */ | 260 | void * rq_argp; /* decoded arguments */ |
261 | void * rq_resp; /* xdr'd results */ | 261 | void * rq_resp; /* xdr'd results */ |
diff --git a/include/trace/events/sunrpc.h b/include/trace/events/sunrpc.h index 5eb5f79d9794..98259f163cd8 100644 --- a/include/trace/events/sunrpc.h +++ b/include/trace/events/sunrpc.h | |||
@@ -414,7 +414,8 @@ TRACE_EVENT(xs_tcp_data_recv, | |||
414 | 414 | ||
415 | #define show_rqstp_flags(flags) \ | 415 | #define show_rqstp_flags(flags) \ |
416 | __print_flags(flags, "|", \ | 416 | __print_flags(flags, "|", \ |
417 | { (1UL << RQ_SECURE), "RQ_SECURE"}) | 417 | { (1UL << RQ_SECURE), "RQ_SECURE"}, \ |
418 | { (1UL << RQ_LOCAL), "RQ_LOCAL"}) | ||
418 | 419 | ||
419 | TRACE_EVENT(svc_recv, | 420 | TRACE_EVENT(svc_recv, |
420 | TP_PROTO(struct svc_rqst *rqst, int status), | 421 | TP_PROTO(struct svc_rqst *rqst, int status), |
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c index f9c052d508f0..cc331b6cf573 100644 --- a/net/sunrpc/svcsock.c +++ b/net/sunrpc/svcsock.c | |||
@@ -1145,7 +1145,10 @@ static int svc_tcp_recvfrom(struct svc_rqst *rqstp) | |||
1145 | 1145 | ||
1146 | rqstp->rq_xprt_ctxt = NULL; | 1146 | rqstp->rq_xprt_ctxt = NULL; |
1147 | rqstp->rq_prot = IPPROTO_TCP; | 1147 | rqstp->rq_prot = IPPROTO_TCP; |
1148 | rqstp->rq_local = !!test_bit(XPT_LOCAL, &svsk->sk_xprt.xpt_flags); | 1148 | if (test_bit(XPT_LOCAL, &svsk->sk_xprt.xpt_flags)) |
1149 | set_bit(RQ_LOCAL, &rqstp->rq_flags); | ||
1150 | else | ||
1151 | clear_bit(RQ_LOCAL, &rqstp->rq_flags); | ||
1149 | 1152 | ||
1150 | p = (__be32 *)rqstp->rq_arg.head[0].iov_base; | 1153 | p = (__be32 *)rqstp->rq_arg.head[0].iov_base; |
1151 | calldir = p[1]; | 1154 | calldir = p[1]; |