From: "J. Bruce Fields" <bfields@fieldses.org>
To: Benny Halevy <bhalevy@panasas.com>
Cc: Trond.Myklebust@netapp.com, linux-nfs@vger.kernel.org,
pnfs@linux-nfs.org
Subject: Re: [pnfs] [PATCH v2 01/67] nfs41: common protocol definitions
Date: Thu, 2 Apr 2009 14:10:38 -0400 [thread overview]
Message-ID: <20090402181038.GE5560@fieldses.org> (raw)
In-Reply-To: <1238680233-13431-1-git-send-email-bhalevy@panasas.com>
On Thu, Apr 02, 2009 at 04:50:33PM +0300, Benny Halevy wrote:
> Define all NFSv4.1 common operation and error code constants.
>
> Note that some of the definitions are used by both the nfs41 client
> and the server code. This patch is duplicated in the nfs41 and nfsd41
> sessions patchset.
Oh, and, for what it's worth (and not being sure which route this may go
in by):
Acked-by: J. Bruce Fields <bfields@citi.umich.edu>
--b.
> Signed-off-by: Andy Adamson<andros@netapp.com>
> Signed-off-by: Benny Halevy <bhalevy@panasas.com>
> [nfs41: add exchange id flags]
> Signed-off-by: Mike Sager <sager@netapp.com>
> Signed-off-by: Benny Halevy <bhalevy@panasas.com>
> [removed server-only hunk changing NFSERR_REPLAY_ME]
> Signed-off-by: Benny Halevy <bhalevy@panasas.com>
> [nfs41: add SEQ4_XX to nfs41-common-protocol]
> Signed-off-by: Andy Adamson <andros@netapp.com>
> Signed-off-by: Benny Halevy <bhalevy@panasas.com>
> [nfs41: generic error code update]
> [nfs41: reverse EXCHGID4_INVAL_FLAG_MASK_{A,R}]
> Signed-off-by: Benny Halevy <bhalevy@panasas.com>
> ---
> include/linux/nfs4.h | 128 +++++++++++++++++++++++++++++++++++++++++++++++++-
> 1 files changed, 127 insertions(+), 1 deletions(-)
>
> diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h
> index b912311..29ed600 100644
> --- a/include/linux/nfs4.h
> +++ b/include/linux/nfs4.h
> @@ -21,6 +21,7 @@
> #define NFS4_FHSIZE 128
> #define NFS4_MAXPATHLEN PATH_MAX
> #define NFS4_MAXNAMLEN NAME_MAX
> +#define NFS4_MAX_SESSIONID_LEN 16
>
> #define NFS4_ACCESS_READ 0x0001
> #define NFS4_ACCESS_LOOKUP 0x0002
> @@ -38,6 +39,7 @@
> #define NFS4_OPEN_RESULT_CONFIRM 0x0002
> #define NFS4_OPEN_RESULT_LOCKTYPE_POSIX 0x0004
>
> +#define NFS4_SHARE_ACCESS_MASK 0x000F
> #define NFS4_SHARE_ACCESS_READ 0x0001
> #define NFS4_SHARE_ACCESS_WRITE 0x0002
> #define NFS4_SHARE_ACCESS_BOTH 0x0003
> @@ -45,6 +47,19 @@
> #define NFS4_SHARE_DENY_WRITE 0x0002
> #define NFS4_SHARE_DENY_BOTH 0x0003
>
> +/* nfs41 */
> +#define NFS4_SHARE_WANT_MASK 0xFF00
> +#define NFS4_SHARE_WANT_NO_PREFERENCE 0x0000
> +#define NFS4_SHARE_WANT_READ_DELEG 0x0100
> +#define NFS4_SHARE_WANT_WRITE_DELEG 0x0200
> +#define NFS4_SHARE_WANT_ANY_DELEG 0x0300
> +#define NFS4_SHARE_WANT_NO_DELEG 0x0400
> +#define NFS4_SHARE_WANT_CANCEL 0x0500
> +
> +#define NFS4_SHARE_WHEN_MASK 0xF0000
> +#define NFS4_SHARE_SIGNAL_DELEG_WHEN_RESRC_AVAIL 0x10000
> +#define NFS4_SHARE_PUSH_DELEG_WHEN_UNCONTENDED 0x20000
> +
> #define NFS4_SET_TO_SERVER_TIME 0
> #define NFS4_SET_TO_CLIENT_TIME 1
>
> @@ -88,6 +103,31 @@
> #define NFS4_ACE_GENERIC_EXECUTE 0x001200A0
> #define NFS4_ACE_MASK_ALL 0x001F01FF
>
> +#define EXCHGID4_FLAG_SUPP_MOVED_REFER 0x00000001
> +#define EXCHGID4_FLAG_SUPP_MOVED_MIGR 0x00000002
> +#define EXCHGID4_FLAG_USE_NON_PNFS 0x00010000
> +#define EXCHGID4_FLAG_USE_PNFS_MDS 0x00020000
> +#define EXCHGID4_FLAG_USE_PNFS_DS 0x00040000
> +#define EXCHGID4_FLAG_UPD_CONFIRMED_REC_A 0x40000000
> +#define EXCHGID4_FLAG_CONFIRMED_R 0x80000000
> +/*
> + * Since the validity of these bits depends on whether
> + * they're set in the argument or response, have separate
> + * invalid flag masks for arg (_A) and resp (_R).
> + */
> +#define EXCHGID4_FLAG_MASK_A 0x40070003
> +#define EXCHGID4_FLAG_MASK_R 0x80070003
> +
> +#define SEQ4_STATUS_CB_PATH_DOWN 0x00000001
> +#define SEQ4_STATUS_CB_GSS_CONTEXTS_EXPIRING 0x00000002
> +#define SEQ4_STATUS_CB_GSS_CONTEXTS_EXPIRED 0x00000004
> +#define SEQ4_STATUS_EXPIRED_ALL_STATE_REVOKED 0x00000008
> +#define SEQ4_STATUS_EXPIRED_SOME_STATE_REVOKED 0x00000010
> +#define SEQ4_STATUS_ADMIN_STATE_REVOKED 0x00000020
> +#define SEQ4_STATUS_RECALLABLE_STATE_REVOKED 0x00000040
> +#define SEQ4_STATUS_LEASE_MOVED 0x00000080
> +#define SEQ4_STATUS_RESTART_RECLAIM_NEEDED 0x00000100
> +
> #define NFS4_MAX_UINT64 (~(u64)0)
>
> enum nfs4_acl_whotype {
> @@ -154,6 +194,28 @@ enum nfs_opnum4 {
> OP_VERIFY = 37,
> OP_WRITE = 38,
> OP_RELEASE_LOCKOWNER = 39,
> +
> + /* nfs41 */
> + OP_BACKCHANNEL_CTL = 40,
> + OP_BIND_CONN_TO_SESSION = 41,
> + OP_EXCHANGE_ID = 42,
> + OP_CREATE_SESSION = 43,
> + OP_DESTROY_SESSION = 44,
> + OP_FREE_STATEID = 45,
> + OP_GET_DIR_DELEGATION = 46,
> + OP_GETDEVICEINFO = 47,
> + OP_GETDEVICELIST = 48,
> + OP_LAYOUTCOMMIT = 49,
> + OP_LAYOUTGET = 50,
> + OP_LAYOUTRETURN = 51,
> + OP_SECINFO_NO_NAME = 52,
> + OP_SEQUENCE = 53,
> + OP_SET_SSV = 54,
> + OP_TEST_STATEID = 55,
> + OP_WANT_DELEGATION = 56,
> + OP_DESTROY_CLIENTID = 57,
> + OP_RECLAIM_COMPLETE = 58,
> +
> OP_ILLEGAL = 10044,
> };
>
> @@ -230,7 +292,48 @@ enum nfsstat4 {
> NFS4ERR_DEADLOCK = 10045,
> NFS4ERR_FILE_OPEN = 10046,
> NFS4ERR_ADMIN_REVOKED = 10047,
> - NFS4ERR_CB_PATH_DOWN = 10048
> + NFS4ERR_CB_PATH_DOWN = 10048,
> +
> + /* nfs41 */
> + NFS4ERR_BADIOMODE = 10049,
> + NFS4ERR_BADLAYOUT = 10050,
> + NFS4ERR_BAD_SESSION_DIGEST = 10051,
> + NFS4ERR_BADSESSION = 10052,
> + NFS4ERR_BADSLOT = 10053,
> + NFS4ERR_COMPLETE_ALREADY = 10054,
> + NFS4ERR_CONN_NOT_BOUND_TO_SESSION = 10055,
> + NFS4ERR_DELEG_ALREADY_WANTED = 10056,
> + NFS4ERR_BACK_CHAN_BUSY = 10057, /* backchan reqs outstanding */
> + NFS4ERR_LAYOUTTRYLATER = 10058,
> + NFS4ERR_LAYOUTUNAVAILABLE = 10059,
> + NFS4ERR_NOMATCHING_LAYOUT = 10060,
> + NFS4ERR_RECALLCONFLICT = 10061,
> + NFS4ERR_UNKNOWN_LAYOUTTYPE = 10062,
> + NFS4ERR_SEQ_MISORDERED = 10063, /* unexpected seq.id in req */
> + NFS4ERR_SEQUENCE_POS = 10064, /* [CB_]SEQ. op not 1st op */
> + NFS4ERR_REQ_TOO_BIG = 10065, /* request too big */
> + NFS4ERR_REP_TOO_BIG = 10066, /* reply too big */
> + NFS4ERR_REP_TOO_BIG_TO_CACHE = 10067, /* rep. not all cached */
> + NFS4ERR_RETRY_UNCACHED_REP = 10068, /* retry & rep. uncached */
> + NFS4ERR_UNSAFE_COMPOUND = 10069, /* retry/recovery too hard */
> + NFS4ERR_TOO_MANY_OPS = 10070, /* too many ops in [CB_]COMP */
> + NFS4ERR_OP_NOT_IN_SESSION = 10071, /* op needs [CB_]SEQ. op */
> + NFS4ERR_HASH_ALG_UNSUPP = 10072, /* hash alg. not supp. */
> + /* Error 10073 is unused. */
> + NFS4ERR_CLIENTID_BUSY = 10074, /* clientid has state */
> + NFS4ERR_PNFS_IO_HOLE = 10075, /* IO to _SPARSE file hole */
> + NFS4ERR_SEQ_FALSE_RETRY = 10076, /* retry not origional */
> + NFS4ERR_BAD_HIGH_SLOT = 10077, /* sequence arg bad */
> + NFS4ERR_DEADSESSION = 10078, /* persistent session dead */
> + NFS4ERR_ENCR_ALG_UNSUPP = 10079, /* SSV alg mismatch */
> + NFS4ERR_PNFS_NO_LAYOUT = 10080, /* direct I/O with no layout */
> + NFS4ERR_NOT_ONLY_OP = 10081, /* bad compound */
> + NFS4ERR_WRONG_CRED = 10082, /* permissions:state change */
> + NFS4ERR_WRONG_TYPE = 10083, /* current operation mismatch */
> + NFS4ERR_DIRDELEG_UNAVAIL = 10084, /* no directory delegation */
> + NFS4ERR_REJECT_DELEG = 10085, /* on callback */
> + NFS4ERR_RETURNCONFLICT = 10086, /* outstanding layoutreturn */
> + NFS4ERR_DELEG_REVOKED = 10087, /* deleg./layout revoked */
> };
>
> /*
> @@ -391,6 +494,29 @@ enum {
> NFSPROC4_CLNT_GETACL,
> NFSPROC4_CLNT_SETACL,
> NFSPROC4_CLNT_FS_LOCATIONS,
> +
> + /* nfs41 */
> + NFSPROC4_CLNT_EXCHANGE_ID,
> + NFSPROC4_CLNT_CREATE_SESSION,
> + NFSPROC4_CLNT_DESTROY_SESSION,
> + NFSPROC4_CLNT_SEQUENCE,
> + NFSPROC4_CLNT_GET_LEASE_TIME,
> +};
> +
> +/* nfs41 types */
> +struct nfs4_sessionid {
> + unsigned char data[NFS4_MAX_SESSIONID_LEN];
> +};
> +
> +/* Create Session Flags */
> +#define SESSION4_PERSIST 0x001
> +#define SESSION4_BACK_CHAN 0x002
> +#define SESSION4_RDMA 0x004
> +
> +enum state_protect_how4 {
> + SP4_NONE = 0,
> + SP4_MACH_CRED = 1,
> + SP4_SSV = 2
> };
>
> #endif
> --
> 1.6.2.1
>
> _______________________________________________
> pNFS mailing list
> pNFS@linux-nfs.org
> http://linux-nfs.org/cgi-bin/mailman/listinfo/pnfs
next prev parent reply other threads:[~2009-04-02 18:10 UTC|newest]
Thread overview: 72+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-02 13:46 [PATCH v2 0/67] nfs41 client patch for 2.6.30 Benny Halevy
2009-04-02 13:48 ` [pnfs] " Benny Halevy
2009-04-02 13:50 ` [PATCH v2 01/67] nfs41: common protocol definitions Benny Halevy
2009-04-02 18:10 ` J. Bruce Fields [this message]
2009-04-02 13:50 ` [PATCH v2 02/67] nfs41: Add Kconfig symbols for NFSv4.1 Benny Halevy
2009-04-02 13:50 ` [PATCH v2 03/67] nfs41: define NFS4_MAX_MINOR_VERSION based on CONFIG_NFS_V4_1 Benny Halevy
2009-04-02 13:51 ` [PATCH v2 04/67] nfs41: add mount command option minorversion Benny Halevy
2009-04-02 13:51 ` [PATCH v2 05/67] nfs41: nfs_client.cl_minorversion Benny Halevy
2009-04-02 13:51 ` [PATCH v2 06/67] nfs41: Use mount minorversion option Benny Halevy
2009-04-02 13:51 ` [PATCH v2 07/67] nfs41: translate NFS4ERR_MINOR_VERS_MISMATCH to EPROTONOSUPPORT Benny Halevy
2009-04-02 13:51 ` [PATCH v2 08/67] nfs41: client xdr definitions Benny Halevy
2009-04-02 13:51 ` [PATCH v2 09/67] nfs41: sessions client infrastructure Benny Halevy
2009-04-02 13:51 ` [PATCH v2 10/67] nfs41: use nfs4_server_caps_arg Benny Halevy
2009-04-02 13:51 ` [PATCH v2 11/67] nfs41: use nfs4_readlink_res Benny Halevy
2009-04-02 13:52 ` [PATCH v2 12/67] nfs41: use nfs4_statfs_res Benny Halevy
2009-04-02 13:52 ` [PATCH v2 13/67] nfs41: use nfs4_fsinfo_res Benny Halevy
2009-04-02 13:52 ` [PATCH v2 14/67] nfs41: use nfs4_pathconf_res Benny Halevy
2009-04-02 13:52 ` [PATCH v2 15/67] nfs41: use nfs4_getaclres Benny Halevy
2009-04-02 13:52 ` [PATCH v2 16/67] NFS: get rid of unused xdr decode_setattr(, res) argument Benny Halevy
2009-04-02 13:52 ` [PATCH v2 17/67] nfs41: use nfs4_setaclres Benny Halevy
2009-04-02 13:52 ` [PATCH v2 18/67] nfs41: use nfs4_fs_locations_res Benny Halevy
2009-04-02 13:52 ` [PATCH v2 19/67] nfs41: introduce nfs4_call_sync Benny Halevy
2009-04-02 13:52 ` [PATCH v2 20/67] nfs41: nfs41: pass *session in seq_args and seq_res Benny Halevy
2009-04-02 13:53 ` [PATCH v2 21/67] nfs41: set up seq_res.sr_slotid Benny Halevy
2009-04-02 13:53 ` [PATCH v2 22/67] NFS: use decode_change_info_maxsz for xdr maxsz calculations Benny Halevy
2009-04-02 13:53 ` [PATCH v2 23/67] NFS: define and initialize compound_hdr.replen Benny Halevy
2009-04-02 13:53 ` [PATCH v2 24/67] NFS: update hdr->replen for every encode op Benny Halevy
2009-04-02 13:53 ` [PATCH v2 25/67] NFS: use dynamically computed compound_hdr.replen for xdr_inline_pages offset Benny Halevy
2009-04-02 13:53 ` [PATCH v2 26/67] nfs41: encode minorversion in compound header Benny Halevy
2009-04-02 13:54 ` [PATCH v2 27/67] nfs41: xdr {encode,decode}_sequence Benny Halevy
2009-04-02 13:54 ` [PATCH v2 28/67] nfs41: nfs4_setup_sequence Benny Halevy
2009-04-02 13:54 ` [PATCH v2 29/67] nfs41: find slot Benny Halevy
2009-04-02 13:54 ` [PATCH v2 30/67] nfs41: setup_sequence method Benny Halevy
2009-04-02 13:54 ` [PATCH v2 31/67] nfs41: free slot Benny Halevy
2009-04-02 13:54 ` [PATCH v2 32/67] nfs41: nfs41_sequence_free_slot Benny Halevy
2009-04-02 13:55 ` [PATCH v2 33/67] nfs41: nfs41_sequence_done Benny Halevy
2009-04-02 13:55 ` [PATCH v2 34/67] nfs41: nfs41_call_sync_done Benny Halevy
2009-04-02 13:55 ` [PATCH v2 35/67] nfs41: close sequence setup/done support Benny Halevy
2009-04-02 13:55 ` [PATCH v2 36/67] nfs41: open " Benny Halevy
2009-04-02 13:55 ` [PATCH v2 37/67] nfs41: lock " Benny Halevy
2009-04-02 13:55 ` [PATCH v2 38/67] nfs41: locku " Benny Halevy
2009-04-02 13:56 ` [PATCH v2 39/67] nfs41: unlink " Benny Halevy
2009-04-02 13:56 ` [PATCH v2 40/67] nfs41: read " Benny Halevy
2009-04-02 13:56 ` [PATCH v2 41/67] nfs41 write sequence setup done support Benny Halevy
2009-04-02 13:56 ` [PATCH v2 42/67] nfs41 commit " Benny Halevy
2009-04-02 13:56 ` [PATCH v2 43/67] nfs41 delegreturn " Benny Halevy
2009-04-02 13:56 ` [PATCH v2 44/67] nfs41: exchange_id operation Benny Halevy
2009-04-02 13:57 ` [PATCH v2 45/67] nfs41: get_lease_time Benny Halevy
2009-04-02 13:57 ` [PATCH v2 46/67] nfs41: create_session operation Benny Halevy
2009-04-02 13:57 ` [PATCH v2 47/67] nfs41: verify session channel attribues Benny Halevy
2009-04-02 13:57 ` [PATCH v2 48/67] nfs41: use session attributes for rsize and wsize Benny Halevy
2009-04-02 13:57 ` [PATCH v2 49/67] nfs41: destroy_session operation Benny Halevy
2009-04-02 13:57 ` [PATCH v2 50/67] nfs41: enable nfs_client only nfs4_async_handle_error Benny Halevy
2009-04-02 13:57 ` [PATCH v2 51/67] nfs41: sequence operation Benny Halevy
2009-04-02 13:58 ` [PATCH v2 52/67] nfs41: reset the session slot table Benny Halevy
2009-04-02 13:58 ` [PATCH v2 53/67] nfs41: add session setup to the state manager Benny Halevy
2009-04-02 13:58 ` [PATCH v2 54/67] nfs41: add session reset to " Benny Halevy
2009-04-02 13:58 ` [PATCH v2 55/67] nfs41: sunrpc: Export the call prepare state for session reset Benny Halevy
2009-04-02 13:58 ` [PATCH v2 56/67] nfs41: use rpc prepare call " Benny Halevy
2009-04-02 13:58 ` [PATCH v2 57/67] nfs41: kick start nfs41 session recovery when handling errors Benny Halevy
2009-04-02 13:58 ` [PATCH v2 58/67] nfs41: schedule async session reset Benny Halevy
2009-04-02 13:59 ` [PATCH v2 59/67] nfs41: lease renewal Benny Halevy
2009-04-02 13:59 ` [PATCH v2 60/67] nfs41: support minorversion 1 for nfs4_check_lease Benny Halevy
2009-04-02 13:59 ` [PATCH v2 61/67] nfs41: introduce get_state_renewal_cred Benny Halevy
2009-04-02 13:59 ` [PATCH v2 62/67] nfs41: establish sessions-based clientid Benny Halevy
2009-04-02 13:59 ` [PATCH v2 63/67] nfs41: add a get_clid_cred function to nfs4_state_recovery_ops Benny Halevy
2009-04-02 13:59 ` [PATCH v2 64/67] nfs41: get_clid_cred for EXCHANGE_ID Benny Halevy
2009-04-02 14:00 ` [PATCH v2 65/67] nfs41: recover lease in _nfs4_lookup_root Benny Halevy
2009-04-02 14:00 ` [PATCH v2 66/67] nfs41: fail mount on EXCHANGE_ID, CREATE_SESSION failure Benny Halevy
2009-04-02 14:00 ` [PATCH v2 67/67] nfs41: increment_{open,lock}_seqid Benny Halevy
2009-04-04 19:37 ` [PATCH v2 0/67] nfs41 client patch for 2.6.30 Trond Myklebust
[not found] ` <1238873829.22935.4.camel-rJ7iovZKK19ZJLDQqaL3InhyD016LWXt@public.gmane.org>
2009-04-05 9:34 ` 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=20090402181038.GE5560@fieldses.org \
--to=bfields@fieldses.org \
--cc=Trond.Myklebust@netapp.com \
--cc=bhalevy@panasas.com \
--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.