diff options
Diffstat (limited to 'include/linux/nfs_xdr.h')
-rw-r--r-- | include/linux/nfs_xdr.h | 61 |
1 files changed, 50 insertions, 11 deletions
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 7fafc4c546b7..7c7320fa51aa 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
@@ -14,11 +14,19 @@ | |||
14 | #define NFS_DEF_FILE_IO_SIZE (4096U) | 14 | #define NFS_DEF_FILE_IO_SIZE (4096U) |
15 | #define NFS_MIN_FILE_IO_SIZE (1024U) | 15 | #define NFS_MIN_FILE_IO_SIZE (1024U) |
16 | 16 | ||
17 | struct nfs4_fsid { | 17 | struct nfs_fsid { |
18 | __u64 major; | 18 | uint64_t major; |
19 | __u64 minor; | 19 | uint64_t minor; |
20 | }; | 20 | }; |
21 | 21 | ||
22 | /* | ||
23 | * Helper for checking equality between 2 fsids. | ||
24 | */ | ||
25 | static inline int nfs_fsid_equal(const struct nfs_fsid *a, const struct nfs_fsid *b) | ||
26 | { | ||
27 | return a->major == b->major && a->minor == b->minor; | ||
28 | } | ||
29 | |||
22 | struct nfs_fattr { | 30 | struct nfs_fattr { |
23 | unsigned short valid; /* which fields are valid */ | 31 | unsigned short valid; /* which fields are valid */ |
24 | __u64 pre_size; /* pre_op_attr.size */ | 32 | __u64 pre_size; /* pre_op_attr.size */ |
@@ -40,10 +48,7 @@ struct nfs_fattr { | |||
40 | } nfs3; | 48 | } nfs3; |
41 | } du; | 49 | } du; |
42 | dev_t rdev; | 50 | dev_t rdev; |
43 | union { | 51 | struct nfs_fsid fsid; |
44 | __u64 nfs3; /* also nfs2 */ | ||
45 | struct nfs4_fsid nfs4; | ||
46 | } fsid_u; | ||
47 | __u64 fileid; | 52 | __u64 fileid; |
48 | struct timespec atime; | 53 | struct timespec atime; |
49 | struct timespec mtime; | 54 | struct timespec mtime; |
@@ -57,8 +62,8 @@ struct nfs_fattr { | |||
57 | #define NFS_ATTR_WCC 0x0001 /* pre-op WCC data */ | 62 | #define NFS_ATTR_WCC 0x0001 /* pre-op WCC data */ |
58 | #define NFS_ATTR_FATTR 0x0002 /* post-op attributes */ | 63 | #define NFS_ATTR_FATTR 0x0002 /* post-op attributes */ |
59 | #define NFS_ATTR_FATTR_V3 0x0004 /* NFSv3 attributes */ | 64 | #define NFS_ATTR_FATTR_V3 0x0004 /* NFSv3 attributes */ |
60 | #define NFS_ATTR_FATTR_V4 0x0008 | 65 | #define NFS_ATTR_FATTR_V4 0x0008 /* NFSv4 change attribute */ |
61 | #define NFS_ATTR_PRE_CHANGE 0x0010 | 66 | #define NFS_ATTR_FATTR_V4_REFERRAL 0x0010 /* NFSv4 referral */ |
62 | 67 | ||
63 | /* | 68 | /* |
64 | * Info on the file system | 69 | * Info on the file system |
@@ -675,6 +680,40 @@ struct nfs4_server_caps_res { | |||
675 | u32 has_symlinks; | 680 | u32 has_symlinks; |
676 | }; | 681 | }; |
677 | 682 | ||
683 | struct nfs4_string { | ||
684 | unsigned int len; | ||
685 | char *data; | ||
686 | }; | ||
687 | |||
688 | #define NFS4_PATHNAME_MAXCOMPONENTS 512 | ||
689 | struct nfs4_pathname { | ||
690 | unsigned int ncomponents; | ||
691 | struct nfs4_string components[NFS4_PATHNAME_MAXCOMPONENTS]; | ||
692 | }; | ||
693 | |||
694 | #define NFS4_FS_LOCATION_MAXSERVERS 10 | ||
695 | struct nfs4_fs_location { | ||
696 | unsigned int nservers; | ||
697 | struct nfs4_string servers[NFS4_FS_LOCATION_MAXSERVERS]; | ||
698 | struct nfs4_pathname rootpath; | ||
699 | }; | ||
700 | |||
701 | #define NFS4_FS_LOCATIONS_MAXENTRIES 10 | ||
702 | struct nfs4_fs_locations { | ||
703 | struct nfs_fattr fattr; | ||
704 | const struct nfs_server *server; | ||
705 | struct nfs4_pathname fs_path; | ||
706 | int nlocations; | ||
707 | struct nfs4_fs_location locations[NFS4_FS_LOCATIONS_MAXENTRIES]; | ||
708 | }; | ||
709 | |||
710 | struct nfs4_fs_locations_arg { | ||
711 | const struct nfs_fh *dir_fh; | ||
712 | const struct qstr *name; | ||
713 | struct page *page; | ||
714 | const u32 *bitmask; | ||
715 | }; | ||
716 | |||
678 | #endif /* CONFIG_NFS_V4 */ | 717 | #endif /* CONFIG_NFS_V4 */ |
679 | 718 | ||
680 | struct nfs_page; | 719 | struct nfs_page; |
@@ -695,7 +734,7 @@ struct nfs_read_data { | |||
695 | #ifdef CONFIG_NFS_V4 | 734 | #ifdef CONFIG_NFS_V4 |
696 | unsigned long timestamp; /* For lease renewal */ | 735 | unsigned long timestamp; /* For lease renewal */ |
697 | #endif | 736 | #endif |
698 | struct page *page_array[NFS_PAGEVEC_SIZE + 1]; | 737 | struct page *page_array[NFS_PAGEVEC_SIZE]; |
699 | }; | 738 | }; |
700 | 739 | ||
701 | struct nfs_write_data { | 740 | struct nfs_write_data { |
@@ -713,7 +752,7 @@ struct nfs_write_data { | |||
713 | #ifdef CONFIG_NFS_V4 | 752 | #ifdef CONFIG_NFS_V4 |
714 | unsigned long timestamp; /* For lease renewal */ | 753 | unsigned long timestamp; /* For lease renewal */ |
715 | #endif | 754 | #endif |
716 | struct page *page_array[NFS_PAGEVEC_SIZE + 1]; | 755 | struct page *page_array[NFS_PAGEVEC_SIZE]; |
717 | }; | 756 | }; |
718 | 757 | ||
719 | struct nfs_access_entry; | 758 | struct nfs_access_entry; |