Benny Halevy | 1 May 01:00 2009

[RFC 0/10] nfsd41 server backchannel for 2.6.31

Bruce,

After squashing and merging Ricardo's latest patchset
please review the following patchset and consider for 2.6.31.

Thanks,

Benny

[RFC 01/10] nfsd: cleanup nfs4.0 callback encode routines
[RFC 02/10] nfsd: minorversion support for the back channel
[RFC 03/10] nfsd41: sunrpc: Added rpc server-side backchannel handling
[RFC 04/10] nfsd41: Remember the auth flavor to use for callbacks
[RFC 05/10] nfsd41: callback infrastructure
[RFC 06/10] nfsd41: Backchannel: Add sequence arguments to callback RPC arguments
[RFC 07/10] nfsd41: Backchannel: Server backchannel RPC wait queue
[RFC 08/10] nfsd41: Backchannel: Setup sequence information
[RFC 09/10] nfsd41: cb_sequence callback
[RFC 10/10] nfsd41: cb_recall callback
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@...
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Andrew Savchenko | 1 May 01:04 2009
Picon

Re: [Bug] NFSv4 fails to work without ipv6 kernel module

Hello, Chuck!

[10l, forget to CC to list]

On Thursday 30 April 2009, Chuck Lever wrote:
[...]
> > With ipv6 module loaded all works fine.
> >
> >> You can also try building 2.6.28 with
> >> CONFIG_SUNRPC_REGISTER_V4 disabled.
> >
> > With this option disabled errno 5 (see above) disappeared from
> > logs, but mount fails with the same errors. Yet again, with
> > ipv6 module loaded it works ok.
>
> Reproduced here.  A patch is attached.  (I usually send patches
> inline, but to test 2.6.29-stable I'm working outside of git,
> using old-fashioned tools like "diff").

Patch works ok, thank you.

--

-- 
Best regards,
Andrew
Benny Halevy | 1 May 01:05 2009

[RFC 02/10] nfsd: minorversion support for the back channel

From: Andy Adamson <andros@...>

Prepare to share backchannel code with NFSv4.1.

Signed-off-by: Andy Adamson <andros@...>
Signed-off-by: Benny Halevy <bhalevy@...>
[nfsd41: use nfsd4_cb_sequence for callback minorversion]
Signed-off-by: Benny Halevy <bhalevy@...>
---
 fs/nfsd/nfs4callback.c     |    3 ++-
 fs/nfsd/nfs4state.c        |    1 +
 include/linux/nfsd/state.h |    3 ++-
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
index 7129b0c..5823b9a 100644
--- a/fs/nfsd/nfs4callback.c
+++ b/fs/nfsd/nfs4callback.c
 <at>  <at>  -141,6 +141,7  <at>  <at>  struct nfs4_cb_compound_hdr {
 	u32		ident;
 	u32		nops;
 	__be32		*nops_p;
+	u32		minorversion;
 	u32		taglen;
 	char		*tag;
 };
 <at>  <at>  -209,7 +210,7  <at>  <at>  encode_cb_compound_hdr(struct xdr_stream *xdr, struct nfs4_cb_compound_hdr *hdr)

 	RESERVE_SPACE(16);
 	WRITE32(0);            /* tag length is always 0 */
(Continue reading)

Benny Halevy | 1 May 01:05 2009

[RFC 01/10] nfsd: cleanup nfs4.0 callback encode routines

From: Andy Adamson <andros@...>

Mimic the client and prepare to share the back channel xdr with NFSv4.1.
Bump the number of operations in each encode routine, then backfill the
number of operations.

Signed-off-by: Andy Adamson <andros@...>
Signed-off-by: Benny Halevy <bhalevy@...>
---
 fs/nfsd/nfs4callback.c |   24 ++++++++++++++++--------
 1 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
index 290289b..7129b0c 100644
--- a/fs/nfsd/nfs4callback.c
+++ b/fs/nfsd/nfs4callback.c
 <at>  <at>  -140,8 +140,9  <at>  <at>  struct nfs4_cb_compound_hdr {
 	int		status;
 	u32		ident;
 	u32		nops;
+	__be32		*nops_p;
 	u32		taglen;
-	char *		tag;
+	char		*tag;
 };

 static struct {
 <at>  <at>  -201,7 +202,7  <at>  <at>  nfs_cb_stat_to_errno(int stat)
  * XDR encode
  */
(Continue reading)

Benny Halevy | 1 May 01:06 2009

[RFC 04/10] nfsd41: Remember the auth flavor to use for callbacks

From: Ricardo Labiaga <Ricardo.Labiaga@...>

The callbacks will be sent using the same authentication flavor that
was used during session creation.  We'll add code to remember the
principal in the case RPCSEC_GSS in a separate patch.

Signed-off-by: Ricardo Labiaga <Ricardo.Labiaga@...>
Signed-off-by: Benny Halevy <bhalevy@...>
---
 fs/nfsd/nfs4state.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index cc9705b..ad30039 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
 <at>  <at>  -1284,6 +1284,7  <at>  <at>  out_new:
 	copy_verf(new, &verf);
 	copy_cred(&new->cl_cred, &rqstp->rq_cred);
 	new->cl_addr = ip_addr;
+	new->cl_flavor = rqstp->rq_flavor;
 	gen_clid(new);
 	gen_confirm(new);
 	add_to_unconfirmed(new, strhashval);
--

-- 
1.6.2.1

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@...
(Continue reading)

Benny Halevy | 1 May 01:05 2009

[RFC 03/10] nfsd41: sunrpc: Added rpc server-side backchannel handling

From: Rahul Iyer <iyer@...>

FIXME: bhalevy: write up commit message

Signed-off-by: Rahul Iyer <iyer@...>
Signed-off-by: Mike Sager <sager@...>
Signed-off-by: Marc Eshel <eshel@...>
Signed-off-by: Benny Halevy <bhalevy@...>

When the call direction is a reply, copy the xid and call direction into the
req->rq_private_buf.head[0].iov_base otherwise rpc_verify_header returns
rpc_garbage.

Signed-off-by: Andy Adamson <andros@...>
Signed-off-by: Benny Halevy <bhalevy@...>
[get rid of CONFIG_NFSD_V4_1]
Signed-off-by: Benny Halevy <bhalevy@...>
---
 include/linux/sunrpc/clnt.h    |    1 +
 include/linux/sunrpc/svcsock.h |    1 +
 include/linux/sunrpc/xprt.h    |    2 +
 net/sunrpc/clnt.c              |    1 +
 net/sunrpc/svcsock.c           |   68 ++++++++++-
 net/sunrpc/xprt.c              |   41 ++++++-
 net/sunrpc/xprtsock.c          |  278 +++++++++++++++++++++++++++++++++++++++-
 7 files changed, 381 insertions(+), 11 deletions(-)

diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h
index c39a210..cf9a8ec 100644
--- a/include/linux/sunrpc/clnt.h
(Continue reading)

Benny Halevy | 1 May 01:06 2009

[RFC 05/10] nfsd41: callback infrastructure

From: Andy Adamson <andros@...>

Keep the xprt used for create_session in cl_cb_xprt.
Mark cl_callback.cb_minorversion = 1 and remember
the client provided cl_callback.cb_prog rpc program number.
Use it to probe the callback path.

Define xdr sizes and code nfs4_cb_compound header to be able
to send a null callback rpc.

Signed-off-by: Andy Adamson<andros@...>
Signed-off-by: Benny Halevy <bhalevy@...>
[get callback minorversion from fore channel's]
Signed-off-by: Benny Halevy <bhalevy@...>
---
 fs/nfsd/nfs4callback.c     |   33 ++++++++++++++++++++++++++++++---
 fs/nfsd/nfs4state.c        |   10 ++++++++++
 include/linux/nfsd/state.h |    3 +++
 3 files changed, 43 insertions(+), 3 deletions(-)

diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
index 5823b9a..6f1ca49 100644
--- a/fs/nfsd/nfs4callback.c
+++ b/fs/nfsd/nfs4callback.c
 <at>  <at>  -43,6 +43,7  <at>  <at> 
 #include <linux/sunrpc/xdr.h>
 #include <linux/sunrpc/svc.h>
 #include <linux/sunrpc/clnt.h>
+#include <linux/sunrpc/svcsock.h>
 #include <linux/nfsd/nfsd.h>
(Continue reading)

Benny Halevy | 1 May 01:06 2009

[RFC 06/10] nfsd41: Backchannel: Add sequence arguments to callback RPC arguments

From: Ricardo Labiaga <Ricardo.Labiaga@...>

Follow the model we use in the client. Make the sequence arguments
part of the regular RPC arguments.  The results point to them.  Adjust
references to the sequence arguments.

Signed-off-by: Ricardo Labiaga <Ricardo.Labiaga@...>
[define struct nfsd4_cb_sequence here]
Signed-off-by: Benny Halevy <bhalevy@...>
---
 fs/nfsd/nfs4callback.c     |    9 +++++++++
 include/linux/nfsd/state.h |    5 +++++
 2 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
index 6f1ca49..14535b2 100644
--- a/fs/nfsd/nfs4callback.c
+++ b/fs/nfsd/nfs4callback.c
 <at>  <at>  -92,6 +92,15  <at>  <at>  enum nfs_cb_opnum4 {
 					cb_sequence_dec_sz +            \
 					op_dec_sz)

+struct nfs4_rpc_args {
+	void				*args_op;
+	struct nfsd4_cb_sequence	args_seq;
+};
+
+struct nfs4_rpc_res {
+	struct nfsd4_cb_sequence	*res_seq;
+};
(Continue reading)

Benny Halevy | 1 May 01:06 2009

[RFC 07/10] nfsd41: Backchannel: Server backchannel RPC wait queue

From: Ricardo Labiaga <Ricardo.Labiaga@...>

RPC callback requests will wait on this wait queue if the backchannel
is out of slots.

Signed-off-by: Ricardo Labiaga <Ricardo.Labiaga@...>
Signed-off-by: Benny Halevy <bhalevy@...>
---
 fs/nfsd/nfs4state.c        |    2 ++
 include/linux/nfsd/state.h |    4 ++++
 2 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 61d5c66..d7b4028 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
 <at>  <at>  -726,6 +726,8  <at>  <at>  static struct nfs4_client *create_client(struct xdr_netobj name, char *recdir)
 	INIT_LIST_HEAD(&clp->cl_delegations);
 	INIT_LIST_HEAD(&clp->cl_sessions);
 	INIT_LIST_HEAD(&clp->cl_lru);
+	clear_bit(0, &clp->cl_cb_slot_busy);
+	rpc_init_wait_queue(&clp->cl_cb_waitq, "Backchannel slot table");
 	return clp;
 }

diff --git a/include/linux/nfsd/state.h b/include/linux/nfsd/state.h
index aeb9c40..f204ca8 100644
--- a/include/linux/nfsd/state.h
+++ b/include/linux/nfsd/state.h
 <at>  <at>  -210,7 +210,11  <at>  <at>  struct nfs4_client {
(Continue reading)

Benny Halevy | 1 May 01:06 2009

[RFC 08/10] nfsd41: Backchannel: Setup sequence information

From: Ricardo Labiaga <Ricardo.Labiaga@...>

Follows the model used by the NFS client.  Setup the RPC prepare and done
function pointers so that we can populate the sequence information if
minorversion == 1.  rpc_run_task() is then invoked directly just like
existing NFS client operations do.

nfsd4_cb_prepare() determines if the sequence information needs to be setup.
If the slot is in use, it adds itself to the wait queue.

nfsd4_cb_done() wakes anyone sleeping on the callback channel wait queue
after our RPC reply has been received.

Signed-off-by: Ricardo Labiaga <Ricardo.Labiaga@...>
[define cl_cb_seq_nr here]
Signed-off-by: Benny Halevy <bhalevy@...>
---
 fs/nfsd/nfs4callback.c     |  109 ++++++++++++++++++++++++++++++++++++++++++++
 include/linux/nfsd/state.h |    1 +
 2 files changed, 110 insertions(+), 0 deletions(-)

diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
index 14535b2..2bf2cd4 100644
--- a/fs/nfsd/nfs4callback.c
+++ b/fs/nfsd/nfs4callback.c
 <at>  <at>  -507,6 +507,115  <at>  <at>  nfsd4_probe_callback(struct nfs4_client *clp)
 }

 /*
+ * There's currently a single callback channel slot.
(Continue reading)


Gmane