diff options
Diffstat (limited to 'include/linux/exportfs.h')
-rw-r--r-- | include/linux/exportfs.h | 44 |
1 files changed, 41 insertions, 3 deletions
diff --git a/include/linux/exportfs.h b/include/linux/exportfs.h index 8872fe8392d6..06178a1336ff 100644 --- a/include/linux/exportfs.h +++ b/include/linux/exportfs.h | |||
@@ -7,6 +7,44 @@ struct dentry; | |||
7 | struct super_block; | 7 | struct super_block; |
8 | struct vfsmount; | 8 | struct vfsmount; |
9 | 9 | ||
10 | /* | ||
11 | * The fileid_type identifies how the file within the filesystem is encoded. | ||
12 | * In theory this is freely set and parsed by the filesystem, but we try to | ||
13 | * stick to conventions so we can share some generic code and don't confuse | ||
14 | * sniffers like ethereal/wireshark. | ||
15 | * | ||
16 | * The filesystem must not use the value '0' or '0xff'. | ||
17 | */ | ||
18 | enum fid_type { | ||
19 | /* | ||
20 | * The root, or export point, of the filesystem. | ||
21 | * (Never actually passed down to the filesystem. | ||
22 | */ | ||
23 | FILEID_ROOT = 0, | ||
24 | |||
25 | /* | ||
26 | * 32bit inode number, 32 bit generation number. | ||
27 | */ | ||
28 | FILEID_INO32_GEN = 1, | ||
29 | |||
30 | /* | ||
31 | * 32bit inode number, 32 bit generation number, | ||
32 | * 32 bit parent directory inode number. | ||
33 | */ | ||
34 | FILEID_INO32_GEN_PARENT = 2, | ||
35 | }; | ||
36 | |||
37 | struct fid { | ||
38 | union { | ||
39 | struct { | ||
40 | u32 ino; | ||
41 | u32 gen; | ||
42 | u32 parent_ino; | ||
43 | u32 parent_gen; | ||
44 | } i32; | ||
45 | __u32 raw[6]; | ||
46 | }; | ||
47 | }; | ||
10 | 48 | ||
11 | /** | 49 | /** |
12 | * struct export_operations - for nfsd to communicate with file systems | 50 | * struct export_operations - for nfsd to communicate with file systems |
@@ -117,9 +155,9 @@ extern struct dentry *find_exported_dentry(struct super_block *sb, void *obj, | |||
117 | void *parent, int (*acceptable)(void *context, struct dentry *de), | 155 | void *parent, int (*acceptable)(void *context, struct dentry *de), |
118 | void *context); | 156 | void *context); |
119 | 157 | ||
120 | extern int exportfs_encode_fh(struct dentry *dentry, __u32 *fh, int *max_len, | 158 | extern int exportfs_encode_fh(struct dentry *dentry, struct fid *fid, |
121 | int connectable); | 159 | int *max_len, int connectable); |
122 | extern struct dentry *exportfs_decode_fh(struct vfsmount *mnt, __u32 *fh, | 160 | extern struct dentry *exportfs_decode_fh(struct vfsmount *mnt, struct fid *fid, |
123 | int fh_len, int fileid_type, int (*acceptable)(void *, struct dentry *), | 161 | int fh_len, int fileid_type, int (*acceptable)(void *, struct dentry *), |
124 | void *context); | 162 | void *context); |
125 | 163 | ||