sunrpc: move rq_dropme flag into rq_flags
Signed-off-by: Jeff Layton <jlayton@primarydata.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
This commit is contained in:
parent
30660e04b0
commit
78b65eb3fd
5 changed files with 9 additions and 9 deletions
|
@ -692,7 +692,7 @@ nfsd_dispatch(struct svc_rqst *rqstp, __be32 *statp)
|
||||||
/* Now call the procedure handler, and encode NFS status. */
|
/* Now call the procedure handler, and encode NFS status. */
|
||||||
nfserr = proc->pc_func(rqstp, rqstp->rq_argp, rqstp->rq_resp);
|
nfserr = proc->pc_func(rqstp, rqstp->rq_argp, rqstp->rq_resp);
|
||||||
nfserr = map_new_errors(rqstp->rq_vers, nfserr);
|
nfserr = map_new_errors(rqstp->rq_vers, nfserr);
|
||||||
if (nfserr == nfserr_dropit || rqstp->rq_dropme) {
|
if (nfserr == nfserr_dropit || test_bit(RQ_DROPME, &rqstp->rq_flags)) {
|
||||||
dprintk("nfsd: Dropping request; may be revisited later\n");
|
dprintk("nfsd: Dropping request; may be revisited later\n");
|
||||||
nfsd_cache_update(rqstp, RC_NOCACHE, NULL);
|
nfsd_cache_update(rqstp, RC_NOCACHE, NULL);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -255,6 +255,7 @@ struct svc_rqst {
|
||||||
#define RQ_SECURE (0) /* secure port */
|
#define RQ_SECURE (0) /* secure port */
|
||||||
#define RQ_LOCAL (1) /* local request */
|
#define RQ_LOCAL (1) /* local request */
|
||||||
#define RQ_USEDEFERRAL (2) /* use deferral */
|
#define RQ_USEDEFERRAL (2) /* use deferral */
|
||||||
|
#define RQ_DROPME (3) /* drop current reply */
|
||||||
unsigned long rq_flags; /* flags field */
|
unsigned long rq_flags; /* flags field */
|
||||||
|
|
||||||
void * rq_argp; /* decoded arguments */
|
void * rq_argp; /* decoded arguments */
|
||||||
|
@ -271,7 +272,6 @@ struct svc_rqst {
|
||||||
struct cache_req rq_chandle; /* handle passed to caches for
|
struct cache_req rq_chandle; /* handle passed to caches for
|
||||||
* request delaying
|
* request delaying
|
||||||
*/
|
*/
|
||||||
bool rq_dropme;
|
|
||||||
/* Catering to nfsd */
|
/* Catering to nfsd */
|
||||||
struct auth_domain * rq_client; /* RPC peer info */
|
struct auth_domain * rq_client; /* RPC peer info */
|
||||||
struct auth_domain * rq_gssclient; /* "gss/"-style peer info */
|
struct auth_domain * rq_gssclient; /* "gss/"-style peer info */
|
||||||
|
|
|
@ -416,7 +416,8 @@ TRACE_EVENT(xs_tcp_data_recv,
|
||||||
__print_flags(flags, "|", \
|
__print_flags(flags, "|", \
|
||||||
{ (1UL << RQ_SECURE), "RQ_SECURE"}, \
|
{ (1UL << RQ_SECURE), "RQ_SECURE"}, \
|
||||||
{ (1UL << RQ_LOCAL), "RQ_LOCAL"}, \
|
{ (1UL << RQ_LOCAL), "RQ_LOCAL"}, \
|
||||||
{ (1UL << RQ_USEDEFERRAL), "RQ_USEDEFERRAL"})
|
{ (1UL << RQ_USEDEFERRAL), "RQ_USEDEFERRAL"}, \
|
||||||
|
{ (1UL << RQ_DROPME), "RQ_DROPME"})
|
||||||
|
|
||||||
TRACE_EVENT(svc_recv,
|
TRACE_EVENT(svc_recv,
|
||||||
TP_PROTO(struct svc_rqst *rqst, int status),
|
TP_PROTO(struct svc_rqst *rqst, int status),
|
||||||
|
@ -459,13 +460,12 @@ DECLARE_EVENT_CLASS(svc_rqst_status,
|
||||||
TP_fast_assign(
|
TP_fast_assign(
|
||||||
__entry->addr = (struct sockaddr *)&rqst->rq_addr;
|
__entry->addr = (struct sockaddr *)&rqst->rq_addr;
|
||||||
__entry->xid = rqst->rq_xid;
|
__entry->xid = rqst->rq_xid;
|
||||||
__entry->dropme = (int)rqst->rq_dropme;
|
|
||||||
__entry->status = status;
|
__entry->status = status;
|
||||||
__entry->flags = rqst->rq_flags;
|
__entry->flags = rqst->rq_flags;
|
||||||
),
|
),
|
||||||
|
|
||||||
TP_printk("addr=%pIScp rq_xid=0x%x dropme=%d status=%d flags=%s",
|
TP_printk("addr=%pIScp rq_xid=0x%x status=%d flags=%s",
|
||||||
__entry->addr, be32_to_cpu(__entry->xid), __entry->dropme,
|
__entry->addr, be32_to_cpu(__entry->xid),
|
||||||
__entry->status, show_rqstp_flags(__entry->flags))
|
__entry->status, show_rqstp_flags(__entry->flags))
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -1091,7 +1091,7 @@ svc_process_common(struct svc_rqst *rqstp, struct kvec *argv, struct kvec *resv)
|
||||||
rqstp->rq_splice_ok = true;
|
rqstp->rq_splice_ok = true;
|
||||||
/* Will be turned off only when NFSv4 Sessions are used */
|
/* Will be turned off only when NFSv4 Sessions are used */
|
||||||
set_bit(RQ_USEDEFERRAL, &rqstp->rq_flags);
|
set_bit(RQ_USEDEFERRAL, &rqstp->rq_flags);
|
||||||
rqstp->rq_dropme = false;
|
clear_bit(RQ_DROPME, &rqstp->rq_flags);
|
||||||
|
|
||||||
/* Setup reply header */
|
/* Setup reply header */
|
||||||
rqstp->rq_xprt->xpt_ops->xpo_prep_reply_hdr(rqstp);
|
rqstp->rq_xprt->xpt_ops->xpo_prep_reply_hdr(rqstp);
|
||||||
|
@ -1191,7 +1191,7 @@ svc_process_common(struct svc_rqst *rqstp, struct kvec *argv, struct kvec *resv)
|
||||||
*statp = procp->pc_func(rqstp, rqstp->rq_argp, rqstp->rq_resp);
|
*statp = procp->pc_func(rqstp, rqstp->rq_argp, rqstp->rq_resp);
|
||||||
|
|
||||||
/* Encode reply */
|
/* Encode reply */
|
||||||
if (rqstp->rq_dropme) {
|
if (test_bit(RQ_DROPME, &rqstp->rq_flags)) {
|
||||||
if (procp->pc_release)
|
if (procp->pc_release)
|
||||||
procp->pc_release(rqstp, NULL, rqstp->rq_resp);
|
procp->pc_release(rqstp, NULL, rqstp->rq_resp);
|
||||||
goto dropit;
|
goto dropit;
|
||||||
|
|
|
@ -1110,7 +1110,7 @@ static struct cache_deferred_req *svc_defer(struct cache_req *req)
|
||||||
}
|
}
|
||||||
svc_xprt_get(rqstp->rq_xprt);
|
svc_xprt_get(rqstp->rq_xprt);
|
||||||
dr->xprt = rqstp->rq_xprt;
|
dr->xprt = rqstp->rq_xprt;
|
||||||
rqstp->rq_dropme = true;
|
set_bit(RQ_DROPME, &rqstp->rq_flags);
|
||||||
|
|
||||||
dr->handle.revisit = svc_revisit;
|
dr->handle.revisit = svc_revisit;
|
||||||
return &dr->handle;
|
return &dr->handle;
|
||||||
|
|
Loading…
Add table
Reference in a new issue