aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/exportfs.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/exportfs.h')
-rw-r--r--include/linux/exportfs.h24
1 files changed, 21 insertions, 3 deletions
diff --git a/include/linux/exportfs.h b/include/linux/exportfs.h
index a9cd507f8cd2..3a4cef5322dc 100644
--- a/include/linux/exportfs.h
+++ b/include/linux/exportfs.h
@@ -8,6 +8,9 @@ struct inode;
8struct super_block; 8struct super_block;
9struct vfsmount; 9struct vfsmount;
10 10
11/* limit the handle size to NFSv4 handle size now */
12#define MAX_HANDLE_SZ 128
13
11/* 14/*
12 * The fileid_type identifies how the file within the filesystem is encoded. 15 * The fileid_type identifies how the file within the filesystem is encoded.
13 * In theory this is freely set and parsed by the filesystem, but we try to 16 * In theory this is freely set and parsed by the filesystem, but we try to
@@ -67,6 +70,19 @@ enum fid_type {
67 * 32 bit parent block number, 32 bit parent generation number 70 * 32 bit parent block number, 32 bit parent generation number
68 */ 71 */
69 FILEID_UDF_WITH_PARENT = 0x52, 72 FILEID_UDF_WITH_PARENT = 0x52,
73
74 /*
75 * 64 bit checkpoint number, 64 bit inode number,
76 * 32 bit generation number.
77 */
78 FILEID_NILFS_WITHOUT_PARENT = 0x61,
79
80 /*
81 * 64 bit checkpoint number, 64 bit inode number,
82 * 32 bit generation number, 32 bit parent generation.
83 * 64 bit parent inode number.
84 */
85 FILEID_NILFS_WITH_PARENT = 0x62,
70}; 86};
71 87
72struct fid { 88struct fid {
@@ -104,12 +120,14 @@ struct fid {
104 * encode_fh: 120 * encode_fh:
105 * @encode_fh should store in the file handle fragment @fh (using at most 121 * @encode_fh should store in the file handle fragment @fh (using at most
106 * @max_len bytes) information that can be used by @decode_fh to recover the 122 * @max_len bytes) information that can be used by @decode_fh to recover the
107 * file refered to by the &struct dentry @de. If the @connectable flag is 123 * file referred to by the &struct dentry @de. If the @connectable flag is
108 * set, the encode_fh() should store sufficient information so that a good 124 * set, the encode_fh() should store sufficient information so that a good
109 * attempt can be made to find not only the file but also it's place in the 125 * attempt can be made to find not only the file but also it's place in the
110 * filesystem. This typically means storing a reference to de->d_parent in 126 * filesystem. This typically means storing a reference to de->d_parent in
111 * the filehandle fragment. encode_fh() should return the number of bytes 127 * the filehandle fragment. encode_fh() should return the fileid_type on
112 * stored or a negative error code such as %-ENOSPC 128 * success and on error returns 255 (if the space needed to encode fh is
129 * greater than @max_len*4 bytes). On error @max_len contains the minimum
130 * size(in 4 byte unit) needed to encode the file handle.
113 * 131 *
114 * fh_to_dentry: 132 * fh_to_dentry:
115 * @fh_to_dentry is given a &struct super_block (@sb) and a file handle 133 * @fh_to_dentry is given a &struct super_block (@sb) and a file handle