diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-06-09 09:34:19 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-06-09 09:34:19 -0400 |
commit | 8b4bdcf8995dd92b23d2ec22b32aee8fbbb50e1c (patch) | |
tree | 8ebe9ec2ed5cb58592097123cf6b34af997316c7 /include | |
parent | 8b512d9a88875affe584bb3d2a7a235f84343b9e (diff) | |
download | linux-stable-8b4bdcf8995dd92b23d2ec22b32aee8fbbb50e1c.tar.gz linux-stable-8b4bdcf8995dd92b23d2ec22b32aee8fbbb50e1c.tar.bz2 linux-stable-8b4bdcf8995dd92b23d2ec22b32aee8fbbb50e1c.zip |
NFS: Store the file system "fsid" value in the NFS super block.
This should enable us to detect if we are crossing a mountpoint in the
case where the server is exporting "nohide" mounts.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/nfs_fs.h | 5 | ||||
-rw-r--r-- | include/linux/nfs_fs_sb.h | 1 | ||||
-rw-r--r-- | include/linux/nfs_page.h | 1 | ||||
-rw-r--r-- | include/linux/nfs_xdr.h | 19 |
4 files changed, 16 insertions, 10 deletions
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index fc48135621ed..6763a0089ee4 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h @@ -16,8 +16,6 @@ #include <linux/rwsem.h> #include <linux/wait.h> -#include <linux/nfs_fs_sb.h> - #include <linux/sunrpc/debug.h> #include <linux/sunrpc/auth.h> #include <linux/sunrpc/clnt.h> @@ -27,6 +25,9 @@ #include <linux/nfs3.h> #include <linux/nfs4.h> #include <linux/nfs_xdr.h> + +#include <linux/nfs_fs_sb.h> + #include <linux/rwsem.h> #include <linux/mempool.h> diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h index 65dec21af774..6b4a13c79474 100644 --- a/include/linux/nfs_fs_sb.h +++ b/include/linux/nfs_fs_sb.h @@ -35,6 +35,7 @@ struct nfs_server { char * hostname; /* remote hostname */ struct nfs_fh fh; struct sockaddr_in addr; + struct nfs_fsid fsid; unsigned long mount_time; /* when this fs was mounted */ #ifdef CONFIG_NFS_V4 /* Our own IP address, as a null-terminated string. diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h index 8cadb0a77a7a..1f7bd287c230 100644 --- a/include/linux/nfs_page.h +++ b/include/linux/nfs_page.h @@ -13,7 +13,6 @@ #include <linux/list.h> #include <linux/pagemap.h> #include <linux/wait.h> -#include <linux/nfs_fs_sb.h> #include <linux/sunrpc/auth.h> #include <linux/nfs_xdr.h> diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index e206c07080fe..95682f7d738a 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h @@ -14,11 +14,19 @@ #define NFS_DEF_FILE_IO_SIZE (4096U) #define NFS_MIN_FILE_IO_SIZE (1024U) -struct nfs4_fsid { - __u64 major; - __u64 minor; +struct nfs_fsid { + uint64_t major; + uint64_t minor; }; +/* + * Helper for checking equality between 2 fsids. + */ +static inline int nfs_fsid_equal(const struct nfs_fsid *a, const struct nfs_fsid *b) +{ + return a->major == b->major && a->minor == b->minor; +} + struct nfs_fattr { unsigned short valid; /* which fields are valid */ __u64 pre_size; /* pre_op_attr.size */ @@ -40,10 +48,7 @@ struct nfs_fattr { } nfs3; } du; dev_t rdev; - union { - __u64 nfs3; /* also nfs2 */ - struct nfs4_fsid nfs4; - } fsid_u; + struct nfs_fsid fsid; __u64 fileid; struct timespec atime; struct timespec mtime; |