diff options
| author | Neil Brown <neilb@cse.unsw.edu.au> | 2002-03-11 20:47:30 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2002-03-11 20:47:30 -0800 |
| commit | cbada281cd3defea968e1edc7ad37cb21082aa9b (patch) | |
| tree | 8c74bd9f9973d3f8a1f5ff483cae69f6e7b161d9 /include/linux/nfsd | |
| parent | c662921a06f057464f3e051763536106b6a243a1 (diff) | |
[PATCH] PATCH - knfsd in 2.5.6 - fsid= export option
Support fsid=<number> export option to be device number independent
This patch was largely supplied by Steven Whitehouse <steve@gw.chygwyn.com>
A new export option "NFSEXP_FSID" indicates that the ex_dev passed down
is a user specified number, not a device number.
It should be used in fsid_type==1 filehandles to identify the
the exportpoint rather than the devid and inode (as in fsid_type == 0).
This allows filehandles to be device-number independent so that when Linux
changes device numbers on you (after reboot), your filesystems wont go stale.
User-space support for this is in the nfs-utils CVS and will be in
the next release (any release > 1.0).
Diffstat (limited to 'include/linux/nfsd')
| -rw-r--r-- | include/linux/nfsd/export.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/nfsd/export.h b/include/linux/nfsd/export.h index 1125d2fa1cbf..ab7b149a3f84 100644 --- a/include/linux/nfsd/export.h +++ b/include/linux/nfsd/export.h @@ -39,7 +39,8 @@ #define NFSEXP_NOSUBTREECHECK 0x0400 #define NFSEXP_NOAUTHNLM 0x0800 /* Don't authenticate NLM requests - just trust */ #define NFSEXP_MSNFS 0x1000 /* do silly things that MS clients expect */ -#define NFSEXP_ALLFLAGS 0x1FFF +#define NFSEXP_FSID 0x2000 +#define NFSEXP_ALLFLAGS 0x3FFF #ifdef __KERNEL__ @@ -55,11 +56,13 @@ struct svc_client { struct in_addr cl_addr[NFSCLNT_ADDRMAX]; struct svc_uidmap * cl_umap; struct list_head cl_export[NFSCLNT_EXPMAX]; + struct list_head cl_expfsid[NFSCLNT_EXPMAX]; struct list_head cl_list; }; struct svc_export { struct list_head ex_hash; + struct list_head ex_fsid_hash; struct list_head ex_list; char ex_path[NFS_MAXPATHLEN+1]; struct svc_export * ex_parent; @@ -71,6 +74,7 @@ struct svc_export { ino_t ex_ino; uid_t ex_anon_uid; gid_t ex_anon_gid; + int ex_fsid; }; #define EX_SECURE(exp) (!((exp)->ex_flags & NFSEXP_INSECURE_PORT)) @@ -91,6 +95,7 @@ void exp_readunlock(void); struct svc_client * exp_getclient(struct sockaddr_in *sin); void exp_putclient(struct svc_client *clp); struct svc_export * exp_get(struct svc_client *clp, kdev_t dev, ino_t ino); +struct svc_export * exp_get_fsid(struct svc_client *clp, int fsid); struct svc_export * exp_get_by_name(struct svc_client *clp, struct vfsmount *mnt, struct dentry *dentry); |
