aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2011-04-27 13:47:52 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2011-04-27 15:57:16 -0400
commit28331a46d88459788c8fca72dbb0415cd7f514c9 (patch)
tree436a4a7209ab9acab87c0e0ecb0cac9b2c749f3d /include
parent1bd714f2a14aa4d6a5570956fcec64530b007e4a (diff)
NFSv4: Ensure we request the ordinary fileid when doing readdirplus
When readdir() returns a directory entry for the root of a mounted filesystem, Linux follows the old convention of returning the inode number of the covered directory (despite newer versions of POSIX declaring that this is a bug). To ensure this continues to work, the NFSv4 readdir implementation requests the 'mounted-on-fileid' from the server. However, readdirplus also needs to instantiate an inode for this entry, and for that, we also need to request the real fileid as per this patch. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/nfs_xdr.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index 78b101e487ea..890dce242639 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -50,6 +50,7 @@ struct nfs_fattr {
50 } du; 50 } du;
51 struct nfs_fsid fsid; 51 struct nfs_fsid fsid;
52 __u64 fileid; 52 __u64 fileid;
53 __u64 mounted_on_fileid;
53 struct timespec atime; 54 struct timespec atime;
54 struct timespec mtime; 55 struct timespec mtime;
55 struct timespec ctime; 56 struct timespec ctime;
@@ -83,6 +84,7 @@ struct nfs_fattr {
83#define NFS_ATTR_FATTR_PRECHANGE (1U << 18) 84#define NFS_ATTR_FATTR_PRECHANGE (1U << 18)
84#define NFS_ATTR_FATTR_V4_REFERRAL (1U << 19) /* NFSv4 referral */ 85#define NFS_ATTR_FATTR_V4_REFERRAL (1U << 19) /* NFSv4 referral */
85#define NFS_ATTR_FATTR_MOUNTPOINT (1U << 20) /* Treat as mountpoint */ 86#define NFS_ATTR_FATTR_MOUNTPOINT (1U << 20) /* Treat as mountpoint */
87#define NFS_ATTR_FATTR_MOUNTED_ON_FILEID (1U << 21)
86 88
87#define NFS_ATTR_FATTR (NFS_ATTR_FATTR_TYPE \ 89#define NFS_ATTR_FATTR (NFS_ATTR_FATTR_TYPE \
88 | NFS_ATTR_FATTR_MODE \ 90 | NFS_ATTR_FATTR_MODE \