diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/nfs_idmap.h | 8 | ||||
-rw-r--r-- | include/linux/nfs_xdr.h | 17 |
2 files changed, 20 insertions, 5 deletions
diff --git a/include/linux/nfs_idmap.h b/include/linux/nfs_idmap.h index ae7d6a380dae..308c18877018 100644 --- a/include/linux/nfs_idmap.h +++ b/include/linux/nfs_idmap.h | |||
@@ -66,6 +66,8 @@ struct idmap_msg { | |||
66 | /* Forward declaration to make this header independent of others */ | 66 | /* Forward declaration to make this header independent of others */ |
67 | struct nfs_client; | 67 | struct nfs_client; |
68 | struct nfs_server; | 68 | struct nfs_server; |
69 | struct nfs_fattr; | ||
70 | struct nfs4_string; | ||
69 | 71 | ||
70 | #ifdef CONFIG_NFS_USE_NEW_IDMAPPER | 72 | #ifdef CONFIG_NFS_USE_NEW_IDMAPPER |
71 | 73 | ||
@@ -97,6 +99,12 @@ void nfs_idmap_delete(struct nfs_client *); | |||
97 | 99 | ||
98 | #endif /* CONFIG_NFS_USE_NEW_IDMAPPER */ | 100 | #endif /* CONFIG_NFS_USE_NEW_IDMAPPER */ |
99 | 101 | ||
102 | void nfs_fattr_init_names(struct nfs_fattr *fattr, | ||
103 | struct nfs4_string *owner_name, | ||
104 | struct nfs4_string *group_name); | ||
105 | void nfs_fattr_free_names(struct nfs_fattr *); | ||
106 | void nfs_fattr_map_and_free_names(struct nfs_server *, struct nfs_fattr *); | ||
107 | |||
100 | int nfs_map_name_to_uid(const struct nfs_server *, const char *, size_t, __u32 *); | 108 | int nfs_map_name_to_uid(const struct nfs_server *, const char *, size_t, __u32 *); |
101 | int nfs_map_group_to_gid(const struct nfs_server *, const char *, size_t, __u32 *); | 109 | int nfs_map_group_to_gid(const struct nfs_server *, const char *, size_t, __u32 *); |
102 | int nfs_map_uid_to_name(const struct nfs_server *, __u32, char *, size_t); | 110 | int nfs_map_uid_to_name(const struct nfs_server *, __u32, char *, size_t); |
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 6c898afe6095..a764cef06b73 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
@@ -18,6 +18,11 @@ | |||
18 | /* Forward declaration for NFS v3 */ | 18 | /* Forward declaration for NFS v3 */ |
19 | struct nfs4_secinfo_flavors; | 19 | struct nfs4_secinfo_flavors; |
20 | 20 | ||
21 | struct nfs4_string { | ||
22 | unsigned int len; | ||
23 | char *data; | ||
24 | }; | ||
25 | |||
21 | struct nfs_fsid { | 26 | struct nfs_fsid { |
22 | uint64_t major; | 27 | uint64_t major; |
23 | uint64_t minor; | 28 | uint64_t minor; |
@@ -61,6 +66,8 @@ struct nfs_fattr { | |||
61 | struct timespec pre_ctime; /* pre_op_attr.ctime */ | 66 | struct timespec pre_ctime; /* pre_op_attr.ctime */ |
62 | unsigned long time_start; | 67 | unsigned long time_start; |
63 | unsigned long gencount; | 68 | unsigned long gencount; |
69 | struct nfs4_string *owner_name; | ||
70 | struct nfs4_string *group_name; | ||
64 | }; | 71 | }; |
65 | 72 | ||
66 | #define NFS_ATTR_FATTR_TYPE (1U << 0) | 73 | #define NFS_ATTR_FATTR_TYPE (1U << 0) |
@@ -85,6 +92,8 @@ struct nfs_fattr { | |||
85 | #define NFS_ATTR_FATTR_V4_REFERRAL (1U << 19) /* NFSv4 referral */ | 92 | #define NFS_ATTR_FATTR_V4_REFERRAL (1U << 19) /* NFSv4 referral */ |
86 | #define NFS_ATTR_FATTR_MOUNTPOINT (1U << 20) /* Treat as mountpoint */ | 93 | #define NFS_ATTR_FATTR_MOUNTPOINT (1U << 20) /* Treat as mountpoint */ |
87 | #define NFS_ATTR_FATTR_MOUNTED_ON_FILEID (1U << 21) | 94 | #define NFS_ATTR_FATTR_MOUNTED_ON_FILEID (1U << 21) |
95 | #define NFS_ATTR_FATTR_OWNER_NAME (1U << 22) | ||
96 | #define NFS_ATTR_FATTR_GROUP_NAME (1U << 23) | ||
88 | 97 | ||
89 | #define NFS_ATTR_FATTR (NFS_ATTR_FATTR_TYPE \ | 98 | #define NFS_ATTR_FATTR (NFS_ATTR_FATTR_TYPE \ |
90 | | NFS_ATTR_FATTR_MODE \ | 99 | | NFS_ATTR_FATTR_MODE \ |
@@ -324,6 +333,7 @@ struct nfs_openargs { | |||
324 | const struct qstr * name; | 333 | const struct qstr * name; |
325 | const struct nfs_server *server; /* Needed for ID mapping */ | 334 | const struct nfs_server *server; /* Needed for ID mapping */ |
326 | const u32 * bitmask; | 335 | const u32 * bitmask; |
336 | const u32 * dir_bitmask; | ||
327 | __u32 claim; | 337 | __u32 claim; |
328 | struct nfs4_sequence_args seq_args; | 338 | struct nfs4_sequence_args seq_args; |
329 | }; | 339 | }; |
@@ -342,6 +352,8 @@ struct nfs_openres { | |||
342 | __u32 do_recall; | 352 | __u32 do_recall; |
343 | __u64 maxsize; | 353 | __u64 maxsize; |
344 | __u32 attrset[NFS4_BITMAP_SIZE]; | 354 | __u32 attrset[NFS4_BITMAP_SIZE]; |
355 | struct nfs4_string *owner; | ||
356 | struct nfs4_string *group_owner; | ||
345 | struct nfs4_sequence_res seq_res; | 357 | struct nfs4_sequence_res seq_res; |
346 | }; | 358 | }; |
347 | 359 | ||
@@ -778,11 +790,6 @@ struct nfs3_getaclres { | |||
778 | struct posix_acl * acl_default; | 790 | struct posix_acl * acl_default; |
779 | }; | 791 | }; |
780 | 792 | ||
781 | struct nfs4_string { | ||
782 | unsigned int len; | ||
783 | char *data; | ||
784 | }; | ||
785 | |||
786 | #ifdef CONFIG_NFS_V4 | 793 | #ifdef CONFIG_NFS_V4 |
787 | 794 | ||
788 | typedef u64 clientid4; | 795 | typedef u64 clientid4; |