SUNRPC: Add a callback to initialise server requests
Add a callback to help initialise server requests before they are processed. This will allow us to clean up the NFS server version support, and to make it container safe. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
This commit is contained in:

committed by
J. Bruce Fields

parent
83dd59a0b9
commit
8e5b67731d
@@ -383,6 +383,16 @@ struct svc_deferred_req {
|
||||
__be32 args[0];
|
||||
};
|
||||
|
||||
struct svc_process_info {
|
||||
union {
|
||||
int (*dispatch)(struct svc_rqst *, __be32 *);
|
||||
struct {
|
||||
unsigned int lovers;
|
||||
unsigned int hivers;
|
||||
} mismatch;
|
||||
};
|
||||
};
|
||||
|
||||
/*
|
||||
* List of RPC programs on the same transport endpoint
|
||||
*/
|
||||
@@ -397,6 +407,9 @@ struct svc_program {
|
||||
char * pg_class; /* class name: services sharing authentication */
|
||||
struct svc_stat * pg_stats; /* rpc statistics */
|
||||
int (*pg_authenticate)(struct svc_rqst *);
|
||||
__be32 (*pg_init_request)(struct svc_rqst *,
|
||||
const struct svc_program *,
|
||||
struct svc_process_info *);
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -506,6 +519,9 @@ char *svc_fill_symlink_pathname(struct svc_rqst *rqstp,
|
||||
struct kvec *first, void *p,
|
||||
size_t total);
|
||||
__be32 svc_return_autherr(struct svc_rqst *rqstp, __be32 auth_err);
|
||||
__be32 svc_generic_init_request(struct svc_rqst *rqstp,
|
||||
const struct svc_program *progp,
|
||||
struct svc_process_info *procinfo);
|
||||
|
||||
#define RPC_MAX_ADDRBUFLEN (63U)
|
||||
|
||||
|
Reference in New Issue
Block a user