[pnfs] [PATCH 8/8] nfsd41: proc stubs
J. Bruce Fields
bfields at fieldses.org
Mon Jun 30 16:32:30 EDT 2008
So v4 and v4.1 are sharing the arrays of decode and proc functions, but
not the array of encode functions?
--b.
On Mon, Jun 30, 2008 at 09:09:43PM +0300, Benny Halevy wrote:
> Signed-off-by: Benny Halevy <bhalevy at panasas.com>
> ---
> fs/nfsd/nfs4proc.c | 47 ++++++++++++++++++++++++++++++++++++++++++++-
> fs/nfsd/nfs4state.c | 34 ++++++++++++++++++++++++++++++++
> include/linux/nfsd/xdr4.h | 14 +++++++++++++
> 3 files changed, 94 insertions(+), 1 deletions(-)
>
> diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
> index 28ae1dc..f0500bb 100644
> --- a/fs/nfsd/nfs4proc.c
> +++ b/fs/nfsd/nfs4proc.c
> @@ -93,6 +93,27 @@ char *nfsd4_op_names[] = {
> OP(VERIFY),
> OP(WRITE),
> OP(RELEASE_LOCKOWNER),
> +#if defined(CONFIG_NFSD_V4_1)
> + OP(BACKCHANNEL_CTL),
> + OP(BIND_CONN_TO_SESSION),
> + OP(EXCHANGE_ID),
> + OP(CREATE_SESSION),
> + OP(DESTROY_SESSION),
> + OP(FREE_STATEID),
> + OP(GET_DIR_DELEGATION),
> + OP(GETDEVICEINFO),
> + OP(GETDEVICELIST),
> + OP(LAYOUTCOMMIT),
> + OP(LAYOUTGET),
> + OP(LAYOUTRETURN),
> + OP(SECINFO_NO_NAME),
> + OP(SEQUENCE),
> + OP(SET_SSV),
> + OP(TEST_STATEID),
> + OP(WANT_DELEGATION),
> + OP(DESTROY_CLIENTID),
> + OP(RECLAIM_COMPLETE),
> +#endif /* CONFIG_NFSD_V4_1 */
> };
> #undef OP
>
> @@ -1015,7 +1036,13 @@ out:
> return status;
> }
>
> -static struct nfsd4_operation nfsd4_ops[OP_RELEASE_LOCKOWNER+1] = {
> +#if defined(CONFIG_NFSD_V4_1)
> +#define NFSD4_LAST_OP OP_RECLAIM_COMPLETE
> +#else /* CONFIG_NFSD_V4_1 */
> +#define NFSD4_LAST_OP OP_RELEASE_LOCKOWNER
> +#endif /* CONFIG_NFSD_V4_1 */
> +
> +static struct nfsd4_operation nfsd4_ops[NFSD4_LAST_OP+1] = {
> [OP_ACCESS] = {
> .op_func = (nfsd4op_func)nfsd4_access,
> },
> @@ -1130,6 +1157,24 @@ static struct nfsd4_operation nfsd4_ops[OP_RELEASE_LOCKOWNER+1] = {
> .op_func = (nfsd4op_func)nfsd4_release_lockowner,
> .op_flags = ALLOWED_WITHOUT_FH | ALLOWED_ON_ABSENT_FS,
> },
> +#if defined(CONFIG_NFSD_V4_1)
> + [OP_EXCHANGE_ID] = {
> + .op_func = (nfsd4op_func)nfsd4_exchange_id,
> + .op_flags = ALLOWED_WITHOUT_FH,
> + },
> + [OP_CREATE_SESSION] = {
> + .op_func = (nfsd4op_func)nfsd4_create_session,
> + .op_flags = ALLOWED_WITHOUT_FH,
> + },
> + [OP_DESTROY_SESSION] = {
> + .op_func = (nfsd4op_func)nfsd4_destroy_session,
> + .op_flags = ALLOWED_WITHOUT_FH,
> + },
> + [OP_SEQUENCE] = {
> + .op_func = (nfsd4op_func)nfsd4_sequence,
> + .op_flags = ALLOWED_WITHOUT_FH,
> + },
> +#endif /* CONFIG_NFSD_V4_1 */
> };
>
> #define nfs4svc_decode_voidargs NULL
> diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
> index 0d1760f..0e588b0 100644
> --- a/fs/nfsd/nfs4state.c
> +++ b/fs/nfsd/nfs4state.c
> @@ -684,6 +684,40 @@ out_err:
> return;
> }
>
> +#if defined(CONFIG_NFSD_V4_1)
> +__be32
> +nfsd4_exchange_id(struct svc_rqst *rqstp,
> + struct nfsd4_compound_state *cstate,
> + struct nfsd4_exchange_id *clid)
> +{
> + return -1; /* stub */
> +}
> +
> +__be32
> +nfsd4_create_session(struct svc_rqst *rqstp,
> + struct nfsd4_compound_state *cstate,
> + struct nfsd4_create_session *session)
> +{
> + return -1; /* stub */
> +}
> +
> +__be32
> +nfsd4_destroy_session(struct svc_rqst *r,
> + struct nfsd4_compound_state *cstate,
> + struct nfsd4_destroy_session *sessionid)
> +{
> + return -1; /* stub */
> +}
> +
> +__be32
> +nfsd4_sequence(struct svc_rqst *r,
> + struct nfsd4_compound_state *cstate,
> + struct nfsd4_sequence *seq)
> +{
> + return -1; /* stub */
> +}
> +#endif /* CONFIG_NFSD_V4_1 */
> +
> __be32
> nfsd4_setclientid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
> struct nfsd4_setclientid *setclid)
> diff --git a/include/linux/nfsd/xdr4.h b/include/linux/nfsd/xdr4.h
> index efd15e0..81a313a 100644
> --- a/include/linux/nfsd/xdr4.h
> +++ b/include/linux/nfsd/xdr4.h
> @@ -472,6 +472,20 @@ extern __be32 nfsd4_setclientid(struct svc_rqst *rqstp,
> extern __be32 nfsd4_setclientid_confirm(struct svc_rqst *rqstp,
> struct nfsd4_compound_state *,
> struct nfsd4_setclientid_confirm *setclientid_confirm);
> +#if defined(CONFIG_NFSD_V4_1)
> +extern __be32 nfsd4_exchange_id(struct svc_rqst *rqstp,
> + struct nfsd4_compound_state *,
> + struct nfsd4_exchange_id *);
> +extern __be32 nfsd4_create_session(struct svc_rqst *,
> + struct nfsd4_compound_state *,
> + struct nfsd4_create_session *);
> +extern __be32 nfsd4_sequence(struct svc_rqst *,
> + struct nfsd4_compound_state *,
> + struct nfsd4_sequence *);
> +extern __be32 nfsd4_destroy_session(struct svc_rqst *,
> + struct nfsd4_compound_state *,
> + struct nfsd4_destroy_session *);
> +#endif /* CONFIG_NFSD_V4_1 */
> extern __be32 nfsd4_process_open1(struct nfsd4_open *open);
> extern __be32 nfsd4_process_open2(struct svc_rqst *rqstp,
> struct svc_fh *current_fh, struct nfsd4_open *open);
> --
> 1.5.6.GIT
>
More information about the pNFS
mailing list