linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] nfsd41: fix callback minorversion
@ 2009-03-29 19:09 Benny Halevy
  2009-03-29 19:11 ` [PATCH 1/3] SQUASHME: get callback minorversion from fore channel's Benny Halevy
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Benny Halevy @ 2009-03-29 19:09 UTC (permalink / raw)
  To: J. Bruce Fields; +Cc: NFS list, pNFS Mailing List

The following three patches get rid of the server's use of cl_private
by passing the minorversion for callbacks via struct nfs4_rpc_args

I'd like to squash them into the nfsd41-for-2.6.30 series
and resend (v3)

Benny

[PATCH 1/3] SQUASHME: get callback minorversion from fore channel's
[PATCH 2/3] SQUASHME: nfsd41: use nfsd4_cb_sequence for callback minorversion
[PATCH 3/3] SQUASHME: Revert "sunrpc: add cl_private field to struct rpc_clnt"

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/3] SQUASHME: get callback minorversion from fore channel's
  2009-03-29 19:09 [PATCH 0/3] nfsd41: fix callback minorversion Benny Halevy
@ 2009-03-29 19:11 ` Benny Halevy
  2009-03-29 19:11 ` [PATCH 2/3] SQUASHME: nfsd41: use nfsd4_cb_sequence for callback minorversion Benny Halevy
  2009-03-29 19:11 ` [PATCH 3/3] SQUASHME: Revert "sunrpc: add cl_private field to struct rpc_clnt" Benny Halevy
  2 siblings, 0 replies; 4+ messages in thread
From: Benny Halevy @ 2009-03-29 19:11 UTC (permalink / raw)
  To:  J. Bruce Fields; +Cc: linux-nfs, pnfs

Currently we assign a constant 1.
Squash into "nfsd41: callback infrastructure"

Signed-off-by: Benny Halevy <bhalevy@panasas.com>
---
 fs/nfsd/nfs4state.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index e5c7ddb..b7c4ed0 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -1418,7 +1418,8 @@ nfsd4_create_session(struct svc_rqst *rqstp,
 		if (cr_ses->flags & SESSION4_BACK_CHAN) {
 			unconf->cl_cb_xprt = rqstp->rq_xprt;
 			svc_xprt_get(unconf->cl_cb_xprt);
-			unconf->cl_callback.cb_minorversion = 1;
+			unconf->cl_callback.cb_minorversion =
+				cstate->minorversion;
 			unconf->cl_cb_seq_nr = 0;
 			unconf->cl_callback.cb_prog = cr_ses->callback_prog;
 			nfsd4_probe_callback(unconf);
-- 
1.6.2.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/3] SQUASHME: nfsd41: use nfsd4_cb_sequence for callback minorversion
  2009-03-29 19:09 [PATCH 0/3] nfsd41: fix callback minorversion Benny Halevy
  2009-03-29 19:11 ` [PATCH 1/3] SQUASHME: get callback minorversion from fore channel's Benny Halevy
@ 2009-03-29 19:11 ` Benny Halevy
  2009-03-29 19:11 ` [PATCH 3/3] SQUASHME: Revert "sunrpc: add cl_private field to struct rpc_clnt" Benny Halevy
  2 siblings, 0 replies; 4+ messages in thread
From: Benny Halevy @ 2009-03-29 19:11 UTC (permalink / raw)
  To:  J. Bruce Fields; +Cc: linux-nfs, pnfs

Rather than using struct rpc_clnt.cl_private.

squash into "nfsd: minorversion support for the back channel"

Signed-off-by: Benny Halevy <bhalevy@panasas.com>
---
 fs/nfsd/nfs4callback.c     |   20 +++++++++++++-------
 include/linux/nfsd/state.h |    1 +
 2 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
index 0be75e0..02e0a61 100644
--- a/fs/nfsd/nfs4callback.c
+++ b/fs/nfsd/nfs4callback.c
@@ -297,17 +297,25 @@ nfs4_xdr_enc_cb_null(struct rpc_rqst *req, __be32 *p)
 	return 0;
 }
 
+static u32
+nfs4_xdr_minorversion(struct nfs4_rpc_args *rpc_args)
+{
+#if defined(CONFIG_NFSD_V4_1)
+	if (rpc_args->args_seq)
+		return rpc_args->args_seq->cbs_minorversion;
+#endif /* CONFIG_NFSD_V4_1 */
+	return 0;
+}
+
 static int
 nfs4_xdr_enc_cb_recall(struct rpc_rqst *req, __be32 *p,
 		       struct nfs4_rpc_args *rpc_args)
 {
 	struct xdr_stream xdr;
 	struct nfs4_cb_recall *args = rpc_args->args_op;
-	struct nfs4_callback *cb =
-		(struct nfs4_callback *)req->rq_task->tk_client->cl_private;
 	struct nfs4_cb_compound_hdr hdr = {
 		.ident = args->cbr_ident,
-		.minorversion = cb->cb_minorversion,
+		.minorversion = nfs4_xdr_minorversion(rpc_args),
 	};
 
 	xdr_init_encode(&xdr, &req->rq_snd_buf, p);
@@ -362,14 +370,12 @@ static int
 decode_cb_sequence(struct xdr_stream *xdr, struct nfsd4_cb_sequence *res,
 		   struct rpc_rqst *rqstp)
 {
-	struct nfs4_callback *cb =
-		(struct nfs4_callback *)rqstp->rq_task->tk_client->cl_private;
 	struct nfs4_sessionid id;
 	int status;
 	u32 dummy;
 	__be32 *p;
 
-	if (cb->cb_minorversion == 0)
+	if (res->cbs_minorversion == 0)
 		return 0;
 
 	status = decode_cb_op_hdr(xdr, OP_CB_SEQUENCE);
@@ -570,7 +576,6 @@ static int do_probe_callback(void *data)
 		goto out_release_client;
 
 	cb->cb_client = client;
-	client->cl_private = cb;
 	atomic_set(&cb->cb_set, 1);
 	put_nfs4_client(clp);
 	return 0;
@@ -625,6 +630,7 @@ nfs41_cb_sequence_setup(struct nfs4_client *clp, struct nfsd4_cb_sequence *args)
 		ptr[0], ptr[1], ptr[2], ptr[3]);
 
 	mutex_lock(&clp->cl_cb_mutex);
+	args->cbs_minorversion = clp->cl_callback.cb_minorversion;
 	args->cbs_clp = clp;
 	clp->cl_cb_seq_nr++;
 	return 0;
diff --git a/include/linux/nfsd/state.h b/include/linux/nfsd/state.h
index 0ea8c89..365cc4b 100644
--- a/include/linux/nfsd/state.h
+++ b/include/linux/nfsd/state.h
@@ -63,6 +63,7 @@ typedef struct {
 
 struct nfsd4_cb_sequence {
 	/* args/res */
+	u32			cbs_minorversion;
 	struct nfs4_client	*cbs_clp;
 };
 
-- 
1.6.2.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 3/3] SQUASHME: Revert "sunrpc: add cl_private field to struct rpc_clnt"
  2009-03-29 19:09 [PATCH 0/3] nfsd41: fix callback minorversion Benny Halevy
  2009-03-29 19:11 ` [PATCH 1/3] SQUASHME: get callback minorversion from fore channel's Benny Halevy
  2009-03-29 19:11 ` [PATCH 2/3] SQUASHME: nfsd41: use nfsd4_cb_sequence for callback minorversion Benny Halevy
@ 2009-03-29 19:11 ` Benny Halevy
  2 siblings, 0 replies; 4+ messages in thread
From: Benny Halevy @ 2009-03-29 19:11 UTC (permalink / raw)
  To:  J. Bruce Fields; +Cc: linux-nfs, pnfs

This reverts commit e972f970a78899ef9c3370f014d45b0d1ed228d3.
---
 include/linux/sunrpc/clnt.h |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h
index 0b32b00..cf9a8ec 100644
--- a/include/linux/sunrpc/clnt.h
+++ b/include/linux/sunrpc/clnt.h
@@ -53,7 +53,6 @@ struct rpc_clnt {
 	char			cl_pathname[30];/* Path in rpc_pipe_fs */
 	struct vfsmount *	cl_vfsmnt;
 	struct dentry *		cl_dentry;	/* inode */
-	void			*cl_private;	/* private data */
 	struct rpc_clnt *	cl_parent;	/* Points to parent of clones */
 	struct rpc_rtt		cl_rtt_default;
 	struct rpc_timeout	cl_timeout_default;
-- 
1.6.2.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-03-29 19:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-29 19:09 [PATCH 0/3] nfsd41: fix callback minorversion Benny Halevy
2009-03-29 19:11 ` [PATCH 1/3] SQUASHME: get callback minorversion from fore channel's Benny Halevy
2009-03-29 19:11 ` [PATCH 2/3] SQUASHME: nfsd41: use nfsd4_cb_sequence for callback minorversion Benny Halevy
2009-03-29 19:11 ` [PATCH 3/3] SQUASHME: Revert "sunrpc: add cl_private field to struct rpc_clnt" Benny Halevy

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).