aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/nfs4.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-10-26 12:52:09 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-26 12:52:09 -0400
commita4dd8dce14014665862ce7911b38cb2c69e366dd (patch)
tree00e79b2845d5d49abcd83cf253db83a52d482265 /include/linux/nfs4.h
parentb18cae4224bde7e5a332c19bc99247b2098ea232 (diff)
parent411b5e05617593efebc06241dbc56f42150f2abe (diff)
Merge branch 'nfs-for-2.6.37' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6
* 'nfs-for-2.6.37' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6: net/sunrpc: Use static const char arrays nfs4: fix channel attribute sanity-checks NFSv4.1: Use more sensible names for 'initialize_mountpoint' NFSv4.1: pnfs: filelayout: add driver's LAYOUTGET and GETDEVICEINFO infrastructure NFSv4.1: pnfs: add LAYOUTGET and GETDEVICEINFO infrastructure NFS: client needs to maintain list of inodes with active layouts NFS: create and destroy inode's layout cache NFSv4.1: pnfs: filelayout: introduce minimal file layout driver NFSv4.1: pnfs: full mount/umount infrastructure NFS: set layout driver NFS: ask for layouttypes during v4 fsinfo call NFS: change stateid to be a union NFSv4.1: pnfsd, pnfs: protocol level pnfs constants SUNRPC: define xdr_decode_opaque_fixed NFSD: remove duplicate NFS4_STATEID_SIZE
Diffstat (limited to 'include/linux/nfs4.h')
-rw-r--r--include/linux/nfs4.h62
1 files changed, 60 insertions, 2 deletions
diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h
index 07e40c62597..a9683d6acaa 100644
--- a/include/linux/nfs4.h
+++ b/include/linux/nfs4.h
@@ -17,7 +17,9 @@
17 17
18#define NFS4_BITMAP_SIZE 2 18#define NFS4_BITMAP_SIZE 2
19#define NFS4_VERIFIER_SIZE 8 19#define NFS4_VERIFIER_SIZE 8
20#define NFS4_STATEID_SIZE 16 20#define NFS4_STATEID_SEQID_SIZE 4
21#define NFS4_STATEID_OTHER_SIZE 12
22#define NFS4_STATEID_SIZE (NFS4_STATEID_SEQID_SIZE + NFS4_STATEID_OTHER_SIZE)
21#define NFS4_FHSIZE 128 23#define NFS4_FHSIZE 128
22#define NFS4_MAXPATHLEN PATH_MAX 24#define NFS4_MAXPATHLEN PATH_MAX
23#define NFS4_MAXNAMLEN NAME_MAX 25#define NFS4_MAXNAMLEN NAME_MAX
@@ -167,7 +169,16 @@ struct nfs4_acl {
167}; 169};
168 170
169typedef struct { char data[NFS4_VERIFIER_SIZE]; } nfs4_verifier; 171typedef struct { char data[NFS4_VERIFIER_SIZE]; } nfs4_verifier;
170typedef struct { char data[NFS4_STATEID_SIZE]; } nfs4_stateid; 172
173struct nfs41_stateid {
174 __be32 seqid;
175 char other[NFS4_STATEID_OTHER_SIZE];
176} __attribute__ ((packed));
177
178typedef union {
179 char data[NFS4_STATEID_SIZE];
180 struct nfs41_stateid stateid;
181} nfs4_stateid;
171 182
172enum nfs_opnum4 { 183enum nfs_opnum4 {
173 OP_ACCESS = 3, 184 OP_ACCESS = 3,
@@ -471,6 +482,8 @@ enum lock_type4 {
471#define FATTR4_WORD1_TIME_MODIFY (1UL << 21) 482#define FATTR4_WORD1_TIME_MODIFY (1UL << 21)
472#define FATTR4_WORD1_TIME_MODIFY_SET (1UL << 22) 483#define FATTR4_WORD1_TIME_MODIFY_SET (1UL << 22)
473#define FATTR4_WORD1_MOUNTED_ON_FILEID (1UL << 23) 484#define FATTR4_WORD1_MOUNTED_ON_FILEID (1UL << 23)
485#define FATTR4_WORD1_FS_LAYOUT_TYPES (1UL << 30)
486#define FATTR4_WORD2_LAYOUT_BLKSIZE (1UL << 1)
474 487
475#define NFSPROC4_NULL 0 488#define NFSPROC4_NULL 0
476#define NFSPROC4_COMPOUND 1 489#define NFSPROC4_COMPOUND 1
@@ -532,6 +545,8 @@ enum {
532 NFSPROC4_CLNT_SEQUENCE, 545 NFSPROC4_CLNT_SEQUENCE,
533 NFSPROC4_CLNT_GET_LEASE_TIME, 546 NFSPROC4_CLNT_GET_LEASE_TIME,
534 NFSPROC4_CLNT_RECLAIM_COMPLETE, 547 NFSPROC4_CLNT_RECLAIM_COMPLETE,
548 NFSPROC4_CLNT_LAYOUTGET,
549 NFSPROC4_CLNT_GETDEVICEINFO,
535}; 550};
536 551
537/* nfs41 types */ 552/* nfs41 types */
@@ -550,6 +565,49 @@ enum state_protect_how4 {
550 SP4_SSV = 2 565 SP4_SSV = 2
551}; 566};
552 567
568enum pnfs_layouttype {
569 LAYOUT_NFSV4_1_FILES = 1,
570 LAYOUT_OSD2_OBJECTS = 2,
571 LAYOUT_BLOCK_VOLUME = 3,
572};
573
574/* used for both layout return and recall */
575enum pnfs_layoutreturn_type {
576 RETURN_FILE = 1,
577 RETURN_FSID = 2,
578 RETURN_ALL = 3
579};
580
581enum pnfs_iomode {
582 IOMODE_READ = 1,
583 IOMODE_RW = 2,
584 IOMODE_ANY = 3,
585};
586
587enum pnfs_notify_deviceid_type4 {
588 NOTIFY_DEVICEID4_CHANGE = 1 << 1,
589 NOTIFY_DEVICEID4_DELETE = 1 << 2,
590};
591
592#define NFL4_UFLG_MASK 0x0000003F
593#define NFL4_UFLG_DENSE 0x00000001
594#define NFL4_UFLG_COMMIT_THRU_MDS 0x00000002
595#define NFL4_UFLG_STRIPE_UNIT_SIZE_MASK 0xFFFFFFC0
596
597/* Encoded in the loh_body field of type layouthint4 */
598enum filelayout_hint_care4 {
599 NFLH4_CARE_DENSE = NFL4_UFLG_DENSE,
600 NFLH4_CARE_COMMIT_THRU_MDS = NFL4_UFLG_COMMIT_THRU_MDS,
601 NFLH4_CARE_STRIPE_UNIT_SIZE = 0x00000040,
602 NFLH4_CARE_STRIPE_COUNT = 0x00000080
603};
604
605#define NFS4_DEVICEID4_SIZE 16
606
607struct nfs4_deviceid {
608 char data[NFS4_DEVICEID4_SIZE];
609};
610
553#endif 611#endif
554#endif 612#endif
555 613