From: Benny Halevy <bhalevy@panasas.com>
To: pnfs@linux-nfs.org
Cc: "J. Bruce Fields" <bfields@fieldses.org>, linux-nfs@vger.kernel.org
Subject: Re: [pnfs] [RFC 21/51] nfsd41: xdr stubs
Date: Mon, 17 Nov 2008 16:06:44 +0200 [thread overview]
Message-ID: <49217A74.50701@panasas.com> (raw)
In-Reply-To: <1226350070-10886-1-git-send-email-bhalevy@panasas.com>
On Nov. 10, 2008, 22:47 +0200, Benny Halevy <bhalevy@panasas.com> wrote:
> define stubs for exchange_id, create_session, destroy_session, and
> sequence.
>
> Signed-off-by: Benny Halevy <bhalevy@panasas.com>
> ---
> fs/nfsd/nfs4xdr.c | 151 +++++++++++++++++++++++++++++++++++++++++++++
> include/linux/nfsd/xdr4.h | 24 +++++++
> 2 files changed, 175 insertions(+), 0 deletions(-)
>
> diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
> index 4675339..fc613cd 100644
> --- a/fs/nfsd/nfs4xdr.c
> +++ b/fs/nfsd/nfs4xdr.c
> @@ -1016,6 +1016,36 @@ nfsd4_decode_release_lockowner(struct nfsd4_compoundargs *argp, struct nfsd4_rel
> DECODE_TAIL;
> }
>
> +#if defined(CONFIG_NFSD_V4_1)
> +static __be32
> +nfsd4_decode_exchange_id(struct nfsd4_compoundargs *argp,
> + struct nfsd4_exchange_id *clid)
> +{
> + return nfserr_opnotsupp; /* stub */
> +}
> +
> +static __be32
> +nfsd4_decode_create_session(struct nfsd4_compoundargs *argp,
> + struct nfsd4_create_session *sess)
> +{
> + return nfserr_opnotsupp; /* stub */
> +}
> +
> +static __be32
> +nfsd4_decode_destroy_session(struct nfsd4_compoundargs *argp,
> + struct nfsd4_destroy_session *destroy_session)
> +{
> + return nfserr_opnotsupp; /* stub */
> +}
> +
> +static __be32
> +nfsd4_decode_sequence(struct nfsd4_compoundargs *argp,
> + struct nfsd4_sequence *seq)
> +{
> + return nfserr_opnotsupp; /* stub */
> +}
> +#endif /* CONFIG_NFSD_V4_1 */
> +
> static __be32
> nfsd4_decode_noop(struct nfsd4_compoundargs *argp, void *p)
> {
> @@ -1070,6 +1100,69 @@ static nfsd4_dec nfsd4_dec_ops[] = {
> [OP_RELEASE_LOCKOWNER] = (nfsd4_dec)nfsd4_decode_release_lockowner,
> };
>
> +#if defined(CONFIG_NFSD_V4_1)
> +static nfsd4_dec nfsd41_dec_ops[] = {
> + [OP_ACCESS] (nfsd4_dec)nfsd4_decode_access,
> + [OP_CLOSE] (nfsd4_dec)nfsd4_decode_close,
> + [OP_COMMIT] (nfsd4_dec)nfsd4_decode_commit,
> + [OP_CREATE] (nfsd4_dec)nfsd4_decode_create,
> + [OP_DELEGPURGE] (nfsd4_dec)nfsd4_decode_notsupp,
> + [OP_DELEGRETURN] (nfsd4_dec)nfsd4_decode_delegreturn,
> + [OP_GETATTR] (nfsd4_dec)nfsd4_decode_getattr,
> + [OP_GETFH] (nfsd4_dec)nfsd4_decode_noop,
> + [OP_LINK] (nfsd4_dec)nfsd4_decode_link,
> + [OP_LOCK] (nfsd4_dec)nfsd4_decode_lock,
> + [OP_LOCKT] (nfsd4_dec)nfsd4_decode_lockt,
> + [OP_LOCKU] (nfsd4_dec)nfsd4_decode_locku,
> + [OP_LOOKUP] (nfsd4_dec)nfsd4_decode_lookup,
> + [OP_LOOKUPP] (nfsd4_dec)nfsd4_decode_noop,
> + [OP_NVERIFY] (nfsd4_dec)nfsd4_decode_verify,
> + [OP_OPEN] (nfsd4_dec)nfsd4_decode_open,
> + [OP_OPENATTR] (nfsd4_dec)nfsd4_decode_notsupp,
> + [OP_OPEN_CONFIRM] (nfsd4_dec)nfsd4_decode_notsupp,
> + [OP_OPEN_DOWNGRADE] (nfsd4_dec)nfsd4_decode_open_downgrade,
> + [OP_PUTFH] (nfsd4_dec)nfsd4_decode_putfh,
> + [OP_PUTPUBFH] (nfsd4_dec)nfsd4_decode_notsupp,
> + [OP_PUTROOTFH] (nfsd4_dec)nfsd4_decode_noop,
> + [OP_READ] (nfsd4_dec)nfsd4_decode_read,
> + [OP_READDIR] (nfsd4_dec)nfsd4_decode_readdir,
> + [OP_READLINK] (nfsd4_dec)nfsd4_decode_noop,
> + [OP_REMOVE] (nfsd4_dec)nfsd4_decode_remove,
> + [OP_RENAME] (nfsd4_dec)nfsd4_decode_rename,
> + [OP_RENEW] (nfsd4_dec)nfsd4_decode_notsupp,
> + [OP_RESTOREFH] (nfsd4_dec)nfsd4_decode_noop,
> + [OP_SAVEFH] (nfsd4_dec)nfsd4_decode_noop,
> + [OP_SECINFO] (nfsd4_dec)nfsd4_decode_secinfo,
> + [OP_SETATTR] (nfsd4_dec)nfsd4_decode_setattr,
> + [OP_SETCLIENTID] (nfsd4_dec)nfsd4_decode_notsupp,
> + [OP_SETCLIENTID_CONFIRM](nfsd4_dec)nfsd4_decode_notsupp,
> + [OP_VERIFY] (nfsd4_dec)nfsd4_decode_verify,
> + [OP_WRITE] (nfsd4_dec)nfsd4_decode_write,
> + [OP_RELEASE_LOCKOWNER] (nfsd4_dec)nfsd4_decode_notsupp,
> +
> + /* new operations for NFSv4.1 */
> + [OP_BACKCHANNEL_CTL] (nfsd4_dec)nfsd4_decode_notsupp,
> + [OP_BIND_CONN_TO_SESSION](nfsd4_dec)nfsd4_decode_notsupp,
> + [OP_EXCHANGE_ID] (nfsd4_dec)nfsd4_decode_exchange_id,
> + [OP_CREATE_SESSION] (nfsd4_dec)nfsd4_decode_create_session,
> + [OP_DESTROY_SESSION] (nfsd4_dec)nfsd4_decode_destroy_session,
> + [OP_FREE_STATEID] (nfsd4_dec)nfsd4_decode_notsupp,
> + [OP_GET_DIR_DELEGATION] (nfsd4_dec)nfsd4_decode_notsupp,
> + [OP_GETDEVICEINFO] (nfsd4_dec)nfsd4_decode_notsupp,
> + [OP_GETDEVICELIST] (nfsd4_dec)nfsd4_decode_notsupp,
> + [OP_LAYOUTCOMMIT] (nfsd4_dec)nfsd4_decode_notsupp,
> + [OP_LAYOUTGET] (nfsd4_dec)nfsd4_decode_notsupp,
> + [OP_LAYOUTRETURN] (nfsd4_dec)nfsd4_decode_notsupp,
> + [OP_SECINFO_NO_NAME] (nfsd4_dec)nfsd4_decode_notsupp,
> + [OP_SEQUENCE] (nfsd4_dec)nfsd4_decode_sequence,
> + [OP_SET_SSV] (nfsd4_dec)nfsd4_decode_notsupp,
> + [OP_TEST_STATEID] (nfsd4_dec)nfsd4_decode_notsupp,
> + [OP_WANT_DELEGATION] (nfsd4_dec)nfsd4_decode_notsupp,
> + [OP_DESTROY_CLIENTID] (nfsd4_dec)nfsd4_decode_notsupp,
> + [OP_RECLAIM_COMPLETE] (nfsd4_dec)nfsd4_decode_notsupp,
> +};
> +#endif /* CONFIG_NFSD_V4_1 */
> +
> struct nfsd4_minorversion_ops {
> nfsd4_dec *decoders;
> int nops;
> @@ -1077,6 +1170,9 @@ struct nfsd4_minorversion_ops {
>
> static struct nfsd4_minorversion_ops nfsd4_minorversion[] = {
> [0] = { nfsd4_dec_ops, ARRAY_SIZE(nfsd4_dec_ops) },
> +#if defined(CONFIG_NFSD_V4_1)
> + [1] = { nfsd41_dec_ops, ARRAY_SIZE(nfsd41_dec_ops) },
> +#endif /* CONFIG_NFSD_V4_1 */
> };
>
> static __be32
> @@ -2591,6 +2687,40 @@ nfsd4_encode_write(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_w
> return nfserr;
> }
>
> +#if defined(CONFIG_NFSD_V4_1)
> +static __be32
> +nfsd4_encode_exchange_id(struct nfsd4_compoundres *resp, int nfserr,
> + struct nfsd4_exchange_id *exid)
> +{
> + /* stub */
> + return nfserr;
> +}
> +
> +static __be32
> +nfsd4_encode_create_session(struct nfsd4_compoundres *resp, int nfserr,
> + struct nfsd4_create_session *sess)
> +{
> + /* stub */
> + return nfserr;
> +}
> +
> +static __be32
> +nfsd4_encode_destroy_session(struct nfsd4_compoundres *resp, int nfserr,
> + struct nfsd4_destroy_session *destroy_session)
> +{
> + /* stub */
> + return nfserr;
> +}
> +
> +static __be32
> +nfsd4_encode_sequence(struct nfsd4_compoundres *resp, int nfserr,
> + struct nfsd4_sequence *seq)
> +{
> + /* stub */
> + return nfserr;
> +}
> +#endif /* CONFIG_NFSD_V4_1 */
> +
> static __be32
> nfsd4_encode_noop(struct nfsd4_compoundres *resp, __be32 nfserr, void *p)
> {
review 11-13: add comment about why we don't need nfsd4_enc_ops
per minorversion like we do for the decoding vector.
> @@ -2636,6 +2766,27 @@ static nfsd4_enc nfsd4_enc_ops[] = {
> [OP_VERIFY] = (nfsd4_enc)nfsd4_encode_noop,
> [OP_WRITE] = (nfsd4_enc)nfsd4_encode_write,
> [OP_RELEASE_LOCKOWNER] = (nfsd4_enc)nfsd4_encode_noop,
> +#if defined(CONFIG_NFSD_V4_1)
> + [OP_BACKCHANNEL_CTL] = (nfsd4_enc)nfsd4_encode_noop,
> + [OP_BIND_CONN_TO_SESSION] = (nfsd4_enc)nfsd4_encode_noop,
> + [OP_EXCHANGE_ID] = (nfsd4_enc)nfsd4_encode_exchange_id,
> + [OP_CREATE_SESSION] = (nfsd4_enc)nfsd4_encode_create_session,
> + [OP_DESTROY_SESSION] = (nfsd4_enc)nfsd4_encode_destroy_session,
> + [OP_FREE_STATEID] = (nfsd4_enc)nfsd4_encode_noop,
> + [OP_GET_DIR_DELEGATION] = (nfsd4_enc)nfsd4_encode_noop,
> + [OP_GETDEVICEINFO] = (nfsd4_enc)nfsd4_encode_noop,
> + [OP_GETDEVICELIST] = (nfsd4_enc)nfsd4_encode_noop,
> + [OP_LAYOUTCOMMIT] = (nfsd4_enc)nfsd4_encode_noop,
> + [OP_LAYOUTGET] = (nfsd4_enc)nfsd4_encode_noop,
> + [OP_LAYOUTRETURN] = (nfsd4_enc)nfsd4_encode_noop,
> + [OP_SECINFO_NO_NAME] = (nfsd4_enc)nfsd4_encode_noop,
> + [OP_SEQUENCE] = (nfsd4_enc)nfsd4_encode_sequence,
> + [OP_SET_SSV] = (nfsd4_enc)nfsd4_encode_noop,
> + [OP_TEST_STATEID] = (nfsd4_enc)nfsd4_encode_noop,
> + [OP_WANT_DELEGATION] = (nfsd4_enc)nfsd4_encode_noop,
> + [OP_DESTROY_CLIENTID] = (nfsd4_enc)nfsd4_encode_noop,
> + [OP_RECLAIM_COMPLETE] = (nfsd4_enc)nfsd4_encode_noop,
> +#endif /* CONFIG_NFSD_V4_1 */
> };
>
> void
> diff --git a/include/linux/nfsd/xdr4.h b/include/linux/nfsd/xdr4.h
> index 81c249c..b864007 100644
> --- a/include/linux/nfsd/xdr4.h
> +++ b/include/linux/nfsd/xdr4.h
> @@ -352,6 +352,24 @@ struct nfsd4_write {
> u32 wr_minorversion; /* processing */
> };
>
> +#if defined(CONFIG_NFSD_V4_1)
> +struct nfsd4_exchange_id {
> + int foo; /* stub */
> +};
> +
> +struct nfsd4_create_session {
> + int foo; /* stub */
> +};
> +
> +struct nfsd4_sequence {
> + int foo; /* stub */
> +};
> +
> +struct nfsd4_destroy_session {
> + int foo; /* stub */
> +};
> +#endif /* CONFIG_NFSD_V4_1 */
> +
> struct nfsd4_op {
> int opnum;
> __be32 status;
> @@ -386,6 +404,12 @@ struct nfsd4_op {
> struct nfsd4_verify verify;
> struct nfsd4_write write;
> struct nfsd4_release_lockowner release_lockowner;
> +#if defined(CONFIG_NFSD_V4_1)
> + struct nfsd4_exchange_id exchange_id;
> + struct nfsd4_create_session create_session;
> + struct nfsd4_destroy_session destroy_session;
> + struct nfsd4_sequence sequence;
> +#endif /* CONFIG_NFSD_V4_1 */
> } u;
> struct nfs4_replay * replay;
> };
next prev parent reply other threads:[~2008-11-17 14:06 UTC|newest]
Thread overview: 85+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-10 20:12 [RFC 0/51] nfs41 server patches for review Benny Halevy
2008-11-10 20:16 ` [RFC 01/51] nfsd: add etoosmall to nfserrno Benny Halevy
2008-11-10 20:39 ` [pnfs] [RFC 0/51] nfs41 server patches for review Benny Halevy
2008-11-10 20:40 ` [RFC 01/51] nfsd: add etoosmall to nfserrno Benny Halevy
2008-11-10 20:41 ` [RFC 02/51] nfsd: dprint each op status in nfsd4_proc_compound Benny Halevy
2008-11-17 13:56 ` [pnfs] " Benny Halevy
2008-11-10 20:41 ` [RFC 03/51] nfsd: git rid of nfs4_cb_null_ops declaration Benny Halevy
2008-11-10 20:41 ` [RFC 04/51] nfsd: fix file comment in fs/nfsd/nfs4xdr.c Benny Halevy
2008-11-17 13:56 ` [pnfs] " Benny Halevy
2008-11-10 20:42 ` [RFC 05/51] nfsd41: Add Kconfig symbols for NFSv4.1 Benny Halevy
2008-11-10 20:42 ` [RFC 06/51] nfsd41: define nfs41 error codes Benny Halevy
2008-11-10 20:43 ` [RFC 07/51] nfsd41: sessions basic data types Benny Halevy
2008-11-17 13:57 ` [pnfs] " Benny Halevy
2008-11-10 20:43 ` [RFC 08/51] nfsd41: introduce nfs4_client cl_sessions list Benny Halevy
2008-11-17 13:58 ` [pnfs] " Benny Halevy
2008-11-10 20:43 ` [RFC 09/51] nfsd41: destroy_session when client is expired Benny Halevy
2008-11-10 20:44 ` [RFC 10/51] nfsd41: sessionid hashing Benny Halevy
2008-11-17 13:58 ` [pnfs] " Benny Halevy
2008-11-10 20:44 ` [RFC 11/51] FIXME: nfsd41: reduce server lease time for nfs41 Benny Halevy
2008-11-17 13:59 ` [pnfs] " Benny Halevy
2008-11-10 20:44 ` [RFC 12/51] nfsd41: provide support for minor version 1 at rpc level Benny Halevy
2008-11-17 14:00 ` [pnfs] " Benny Halevy
2008-11-10 20:45 ` [RFC 13/51] FIXME: nfsd41: introduce current_session Benny Halevy
2008-11-17 14:00 ` [pnfs] " Benny Halevy
2008-11-10 20:45 ` [RFC 14/51] nfsd41: introduce nfs41_{get,set}_slot_state Benny Halevy
2008-11-17 14:01 ` [pnfs] " Benny Halevy
2008-11-10 20:45 ` [RFC 15/51] FIXME: nfsd41: free up slot unless operation is dropped Benny Halevy
2008-11-17 14:01 ` [pnfs] " Benny Halevy
2008-11-10 20:46 ` [RFC 16/51] nfsd41: stateid handling Benny Halevy
2008-11-17 14:02 ` [pnfs] " Benny Halevy
2008-11-10 20:46 ` [RFC 17/51] nfsd41: clientid handling Benny Halevy
2008-11-17 14:03 ` [pnfs] " Benny Halevy
2008-11-10 20:46 ` [RFC 18/51] nfsd41: access_valid Benny Halevy
2008-11-17 14:04 ` [pnfs] " Benny Halevy
2008-11-10 20:47 ` [RFC 19/51] nfsd41: add OPEN4_SHARE_ACCESS_WANT nfs4_stateid bmap Benny Halevy
2008-11-17 14:05 ` [pnfs] " Benny Halevy
2008-11-10 20:47 ` [RFC 20/51] nfsd: last_byte_offset Benny Halevy
2008-11-17 14:06 ` [pnfs] " Benny Halevy
2008-11-10 20:47 ` [RFC 21/51] nfsd41: xdr stubs Benny Halevy
2008-11-17 14:06 ` Benny Halevy [this message]
2008-11-10 20:48 ` [RFC 22/51] nfsd41: proc stubs Benny Halevy
2008-11-17 14:07 ` [pnfs] " Benny Halevy
2008-11-10 20:48 ` [RFC 23/51] nfsd41: exchange_id operation Benny Halevy
2008-11-17 14:07 ` [pnfs] " Benny Halevy
2008-11-10 20:48 ` [RFC 24/51] nfsd41: print exchange flags when purging client Benny Halevy
2008-11-17 14:08 ` [pnfs] " Benny Halevy
2008-11-10 20:49 ` [RFC 25/51] nfsd41: create_session operation Benny Halevy
2008-11-17 14:09 ` [pnfs] " Benny Halevy
2008-11-10 20:49 ` [RFC 26/51] nfsd41: destroy_session operation Benny Halevy
2008-11-17 14:10 ` [pnfs] " Benny Halevy
2008-11-10 20:49 ` [RFC 27/51] nfsd41: sequence operation Benny Halevy
2008-11-17 14:10 ` [pnfs] " Benny Halevy
2008-11-10 20:50 ` [RFC 28/51] FIXME: nfsd41: sunrpc: Added rpc server-side backchannel handling Benny Halevy
2008-11-17 14:11 ` [pnfs] " Benny Halevy
2008-11-10 20:50 ` [RFC 29/51] nfsd: BUG_ON_UNLOCKED_STATE Benny Halevy
2008-11-10 20:50 ` [RFC 30/51] nfsd: lock state around nfs4_put_delegation in nfsd_break_deleg_cb err path Benny Halevy
2008-11-10 20:51 ` [RFC 31/51] FIXME: nfsd: kref_get cb_client while doing the callback Benny Halevy
2008-11-10 20:51 ` [RFC 32/51] nfsd41: callback infrastructure Benny Halevy
2008-11-17 14:12 ` [pnfs] " Benny Halevy
2008-11-10 20:52 ` [RFC 33/51] nfsd41: introduce cl_cb_mutex Benny Halevy
2008-11-10 20:52 ` [RFC 34/51] nfsd41: cb_sequence callback Benny Halevy
2008-11-10 20:52 ` [RFC 35/51] nfsd41: introduce nfs4_cb_call_sync for nfs4 and nfs41 Benny Halevy
2008-11-10 20:53 ` [RFC 36/51] nfsd41: cb_recall callback Benny Halevy
2008-11-10 20:53 ` [RFC 37/51] nfsd41: pass writable attrs mask to nfsd4_decode_fattr Benny Halevy
2008-11-10 20:53 ` [RFC 38/51] nfsd41: support for 3-word long attribute bitmask Benny Halevy
2008-11-17 14:13 ` [pnfs] " Benny Halevy
2008-11-10 20:54 ` [RFC 39/51] nfsd41: SUPPATTR_EXCLCREAT attribute Benny Halevy
2008-11-10 20:54 ` [RFC 40/51] nfsd41: CREATE_EXCLUSIVE4_1 Benny Halevy
2008-11-17 14:13 ` [pnfs] " Benny Halevy
2008-11-10 20:54 ` [RFC 41/51] sunrpc: Add deferral save and restore state callback Benny Halevy
2008-11-10 20:55 ` [RFC 42/51] nfsd: save and restore defer result pages Benny Halevy
2008-11-10 20:55 ` [RFC 43/51] nfsd: deferral processing Benny Halevy
2008-11-10 20:55 ` [RFC 44/51] nfsd41: slab cache for current session Benny Halevy
2008-11-17 14:14 ` [pnfs] " Benny Halevy
2008-11-10 20:56 ` [RFC 45/51] nfsd41: DRC save, restore, and clear functions Benny Halevy
2008-11-17 14:14 ` [pnfs] " Benny Halevy
2008-11-10 20:56 ` [RFC 46/51] nfsd41: nfsd nfsd4_sequence DRC logic Benny Halevy
2008-11-10 20:56 ` [RFC 47/51] nfsd41: enforce NFS4ERR_SEQUENCE_POS operation order rules Benny Halevy
2008-11-17 14:15 ` [pnfs] " Benny Halevy
2008-11-10 20:57 ` [RFC 48/51] nfsd41: nfsd DRC logic Benny Halevy
2008-11-10 20:57 ` [RFC 49/51] nfsd41: clear DRC cache on free_session Benny Halevy
2008-11-10 20:57 ` [RFC 50/51] nfsd41: Add a create session replay cache Benny Halevy
2008-11-17 14:16 ` [pnfs] " Benny Halevy
2008-11-10 20:58 ` [RFC 51/51] nfsd41: print DRC statistics Benny Halevy
2008-11-17 14:17 ` [pnfs] " Benny Halevy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49217A74.50701@panasas.com \
--to=bhalevy@panasas.com \
--cc=bfields@fieldses.org \
--cc=linux-nfs@vger.kernel.org \
--cc=pnfs@linux-nfs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.