diff options
Diffstat (limited to 'include/linux/nfs4.h')
-rw-r--r-- | include/linux/nfs4.h | 62 |
1 files changed, 60 insertions, 2 deletions
diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h index 79b15fb2f30..4925b22219d 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 |
@@ -170,7 +172,16 @@ struct nfs4_acl { | |||
170 | }; | 172 | }; |
171 | 173 | ||
172 | typedef struct { char data[NFS4_VERIFIER_SIZE]; } nfs4_verifier; | 174 | typedef struct { char data[NFS4_VERIFIER_SIZE]; } nfs4_verifier; |
173 | typedef struct { char data[NFS4_STATEID_SIZE]; } nfs4_stateid; | 175 | |
176 | struct nfs41_stateid { | ||
177 | __be32 seqid; | ||
178 | char other[NFS4_STATEID_OTHER_SIZE]; | ||
179 | } __attribute__ ((packed)); | ||
180 | |||
181 | typedef union { | ||
182 | char data[NFS4_STATEID_SIZE]; | ||
183 | struct nfs41_stateid stateid; | ||
184 | } nfs4_stateid; | ||
174 | 185 | ||
175 | enum nfs_opnum4 { | 186 | enum nfs_opnum4 { |
176 | OP_ACCESS = 3, | 187 | OP_ACCESS = 3, |
@@ -474,6 +485,8 @@ enum lock_type4 { | |||
474 | #define FATTR4_WORD1_TIME_MODIFY (1UL << 21) | 485 | #define FATTR4_WORD1_TIME_MODIFY (1UL << 21) |
475 | #define FATTR4_WORD1_TIME_MODIFY_SET (1UL << 22) | 486 | #define FATTR4_WORD1_TIME_MODIFY_SET (1UL << 22) |
476 | #define FATTR4_WORD1_MOUNTED_ON_FILEID (1UL << 23) | 487 | #define FATTR4_WORD1_MOUNTED_ON_FILEID (1UL << 23) |
488 | #define FATTR4_WORD1_FS_LAYOUT_TYPES (1UL << 30) | ||
489 | #define FATTR4_WORD2_LAYOUT_BLKSIZE (1UL << 1) | ||
477 | 490 | ||
478 | #define NFSPROC4_NULL 0 | 491 | #define NFSPROC4_NULL 0 |
479 | #define NFSPROC4_COMPOUND 1 | 492 | #define NFSPROC4_COMPOUND 1 |
@@ -535,6 +548,8 @@ enum { | |||
535 | NFSPROC4_CLNT_SEQUENCE, | 548 | NFSPROC4_CLNT_SEQUENCE, |
536 | NFSPROC4_CLNT_GET_LEASE_TIME, | 549 | NFSPROC4_CLNT_GET_LEASE_TIME, |
537 | NFSPROC4_CLNT_RECLAIM_COMPLETE, | 550 | NFSPROC4_CLNT_RECLAIM_COMPLETE, |
551 | NFSPROC4_CLNT_LAYOUTGET, | ||
552 | NFSPROC4_CLNT_GETDEVICEINFO, | ||
538 | }; | 553 | }; |
539 | 554 | ||
540 | /* nfs41 types */ | 555 | /* nfs41 types */ |
@@ -553,6 +568,49 @@ enum state_protect_how4 { | |||
553 | SP4_SSV = 2 | 568 | SP4_SSV = 2 |
554 | }; | 569 | }; |
555 | 570 | ||
571 | enum pnfs_layouttype { | ||
572 | LAYOUT_NFSV4_1_FILES = 1, | ||
573 | LAYOUT_OSD2_OBJECTS = 2, | ||
574 | LAYOUT_BLOCK_VOLUME = 3, | ||
575 | }; | ||
576 | |||
577 | /* used for both layout return and recall */ | ||
578 | enum pnfs_layoutreturn_type { | ||
579 | RETURN_FILE = 1, | ||
580 | RETURN_FSID = 2, | ||
581 | RETURN_ALL = 3 | ||
582 | }; | ||
583 | |||
584 | enum pnfs_iomode { | ||
585 | IOMODE_READ = 1, | ||
586 | IOMODE_RW = 2, | ||
587 | IOMODE_ANY = 3, | ||
588 | }; | ||
589 | |||
590 | enum pnfs_notify_deviceid_type4 { | ||
591 | NOTIFY_DEVICEID4_CHANGE = 1 << 1, | ||
592 | NOTIFY_DEVICEID4_DELETE = 1 << 2, | ||
593 | }; | ||
594 | |||
595 | #define NFL4_UFLG_MASK 0x0000003F | ||
596 | #define NFL4_UFLG_DENSE 0x00000001 | ||
597 | #define NFL4_UFLG_COMMIT_THRU_MDS 0x00000002 | ||
598 | #define NFL4_UFLG_STRIPE_UNIT_SIZE_MASK 0xFFFFFFC0 | ||
599 | |||
600 | /* Encoded in the loh_body field of type layouthint4 */ | ||
601 | enum filelayout_hint_care4 { | ||
602 | NFLH4_CARE_DENSE = NFL4_UFLG_DENSE, | ||
603 | NFLH4_CARE_COMMIT_THRU_MDS = NFL4_UFLG_COMMIT_THRU_MDS, | ||
604 | NFLH4_CARE_STRIPE_UNIT_SIZE = 0x00000040, | ||
605 | NFLH4_CARE_STRIPE_COUNT = 0x00000080 | ||
606 | }; | ||
607 | |||
608 | #define NFS4_DEVICEID4_SIZE 16 | ||
609 | |||
610 | struct nfs4_deviceid { | ||
611 | char data[NFS4_DEVICEID4_SIZE]; | ||
612 | }; | ||
613 | |||
556 | #endif | 614 | #endif |
557 | #endif | 615 | #endif |
558 | 616 | ||