From: Vasily Averin <vvs@virtuozzo.com>
To: Trond Myklebust <trond.myklebust@hammerspace.com>,
Anna Schumaker <anna.schumaker@netapp.com>
Cc: "J. Bruce Fields" <bfields@fieldses.org>,
Jeff Layton <jlayton@kernel.org>,
Chuck Lever <chuck.lever@oracle.com>,
linux-nfs@vger.kernel.org,
Evgenii Shatokhin <eshatokhin@virtuozzo.com>
Subject: [PATCH v3 2/8] sunrpc: introduce svc_rqst->rq_bc_net
Date: Fri, 21 Dec 2018 20:32:32 +0300 [thread overview]
Message-ID: <9d1cc004-c43e-b4c3-159c-77bd6efec1a9@virtuozzo.com> (raw)
In-Reply-To: <cover.1545412216.git.vvs@virtuozzo.com>
svc_rqst->rq_bc_net points to net namespace used during
backchannel's request processing
Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
---
include/linux/sunrpc/svc.h | 4 +++-
net/sunrpc/svc.c | 1 +
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
index 73e130a840ce..23e33f8f0507 100644
--- a/include/linux/sunrpc/svc.h
+++ b/include/linux/sunrpc/svc.h
@@ -295,10 +295,12 @@ struct svc_rqst {
struct svc_cacherep * rq_cacherep; /* cache info */
struct task_struct *rq_task; /* service thread */
spinlock_t rq_lock; /* per-request lock */
+ struct net * rq_bc_net; /* pointer to backchannel's
+ * net namespace
+ */
};
#define SVC_NET(svc_rqst) (svc_rqst->rq_xprt->xpt_net)
-
/*
* Rigorous type checking on sockaddr type conversions
*/
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
index d13e05f1a990..94a2a85c078b 100644
--- a/net/sunrpc/svc.c
+++ b/net/sunrpc/svc.c
@@ -1463,6 +1463,7 @@ bc_svc_process(struct svc_serv *serv, struct rpc_rqst *req,
rqstp->rq_xid = req->rq_xid;
rqstp->rq_prot = req->rq_xprt->prot;
rqstp->rq_server = serv;
+ rqstp->rq_bc_net = req->rq_xprt->xprt_net;
rqstp->rq_addrlen = sizeof(req->rq_xprt->addr);
memcpy(&rqstp->rq_addr, &req->rq_xprt->addr, rqstp->rq_addrlen);
--
2.17.1
next prev parent reply other threads:[~2018-12-21 17:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1545412216.git.vvs@virtuozzo.com>
2018-12-21 17:32 ` [PATCH v3 1/8] sunrpc: use SVC_NET() in svcauth_gss_* functions Vasily Averin
2018-12-21 17:32 ` Vasily Averin [this message]
2018-12-21 17:35 ` [PATCH v3 3/8] sunrpc: introduce per-netns sunrpc_net->bc_prep_reply_hdr() Vasily Averin
2018-12-21 17:35 ` [PATCH v3 4/8] sunrpc: use-after-free in svc_process_common() Vasily Averin
2018-12-21 17:35 ` [PATCH v3 5/8] nfs: remove sv_bc_enabled using in svc_is_backchannel() Vasily Averin
2018-12-21 17:35 ` [PATCH v3 6/8] sunrpc: make visible processing error in bc_svc_process() Vasily Averin
2018-12-21 17:36 ` [PATCH v3 7/8] sunrpc: fix debug message in svc_create_xprt() Vasily Averin
2018-12-21 17:36 ` [PATCH v3 8/8] nfs: minor typo in nfs4_callback_up_net() Vasily Averin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9d1cc004-c43e-b4c3-159c-77bd6efec1a9@virtuozzo.com \
--to=vvs@virtuozzo.com \
--cc=anna.schumaker@netapp.com \
--cc=bfields@fieldses.org \
--cc=chuck.lever@oracle.com \
--cc=eshatokhin@virtuozzo.com \
--cc=jlayton@kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=trond.myklebust@hammerspace.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).