nfsd41: Backchannel: Add sequence arguments to callback RPC arguments
authorRicardo Labiaga <Ricardo.Labiaga@netapp.com>
Thu, 10 Sep 2009 09:26:12 +0000 (12:26 +0300)
committerJ. Bruce Fields <bfields@citi.umich.edu>
Wed, 16 Sep 2009 00:49:55 +0000 (20:49 -0400)
Follow the model we use in the client. Make the sequence arguments
part of the regular RPC arguments.  None of the callbacks that are
soon to be implemented expect results that need to be passed back
to the caller, so we don't define a separate RPC results structure.
For session validation, the cb_sequence decoding will use a pointer
to the sequence arguments that are part of the RPC argument.

Signed-off-by: Ricardo Labiaga <Ricardo.Labiaga@netapp.com>
[define struct nfsd4_cb_sequence here]
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
fs/nfsd/nfs4callback.c
include/linux/nfsd/state.h

index db4188ce9b000d74c76cd09e3f5d1296d0329268..f31175717c1a9f0d89573954b7c682e1bc6c8d1b 100644 (file)
@@ -92,6 +92,11 @@ enum nfs_cb_opnum4 {
                                        cb_sequence_dec_sz +            \
                                        op_dec_sz)
 
+struct nfs4_rpc_args {
+       void                            *args_op;
+       struct nfsd4_cb_sequence        args_seq;
+};
+
 /*
 * Generic encode routines from fs/nfs/nfs4xdr.c
 */
index c916032570c46f022f206d9161b1be4353fb3ddd..0e5b5aecde03dd21b163e95f3611dba2cb332942 100644 (file)
@@ -60,6 +60,12 @@ typedef struct {
 #define si_stateownerid   si_opaque.so_stateownerid
 #define si_fileid         si_opaque.so_fileid
 
+struct nfsd4_cb_sequence {
+       /* args/res */
+       u32                     cbs_minorversion;
+       struct nfs4_client      *cbs_clp;
+};
+
 struct nfs4_delegation {
        struct list_head        dl_perfile;
        struct list_head        dl_perclnt;