aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/nfsd/export.h
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2007-02-14 03:33:12 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-14 11:09:53 -0500
commitaf6a4e280e3ff453653f39190b57b345ff0bec16 (patch)
tree4895c90613737db7354f43431ed10a55dc0c98f0 /include/linux/nfsd/export.h
parent982aedfd091e6d9831216f8519f12242091be4fd (diff)
[PATCH] knfsd: add some new fsid types
Add support for using a filesystem UUID to identify and export point in the filehandle. For NFSv2, this UUID is xor-ed down to 4 or 8 bytes so that it doesn't take up too much room. For NFSv3+, we use the full 16 bytes, and possibly also a 64bit inode number for exports beneath the root of a filesystem. When generating an fsid to return in 'stat' information, use the UUID (hashed down to size) if it is available and a small 'fsid' was not specifically provided. Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/nfsd/export.h')
-rw-r--r--include/linux/nfsd/export.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/linux/nfsd/export.h b/include/linux/nfsd/export.h
index 045e38cdbe64..9f62d6182d32 100644
--- a/include/linux/nfsd/export.h
+++ b/include/linux/nfsd/export.h
@@ -74,19 +74,20 @@ struct svc_export {
74 uid_t ex_anon_uid; 74 uid_t ex_anon_uid;
75 gid_t ex_anon_gid; 75 gid_t ex_anon_gid;
76 int ex_fsid; 76 int ex_fsid;
77 unsigned char * ex_uuid; /* 16 byte fsid */
77 struct nfsd4_fs_locations ex_fslocs; 78 struct nfsd4_fs_locations ex_fslocs;
78}; 79};
79 80
80/* an "export key" (expkey) maps a filehandlefragement to an 81/* an "export key" (expkey) maps a filehandlefragement to an
81 * svc_export for a given client. There can be two per export, one 82 * svc_export for a given client. There can be several per export,
82 * for type 0 (dev/ino), one for type 1 (fsid) 83 * for the different fsid types.
83 */ 84 */
84struct svc_expkey { 85struct svc_expkey {
85 struct cache_head h; 86 struct cache_head h;
86 87
87 struct auth_domain * ek_client; 88 struct auth_domain * ek_client;
88 int ek_fsidtype; 89 int ek_fsidtype;
89 u32 ek_fsid[3]; 90 u32 ek_fsid[6];
90 91
91 struct vfsmount * ek_mnt; 92 struct vfsmount * ek_mnt;
92 struct dentry * ek_dentry; 93 struct dentry * ek_dentry;