diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2009-03-11 14:10:24 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2009-03-11 14:10:24 -0400 |
commit | 9e6e70f8d8b6698e0017c56b86525aabe9c7cd4c (patch) | |
tree | 3364c61dc3fdb1cc69b18e0cf16947abc49c0be5 /fs/nfs/nfs3xdr.c | |
parent | 78f945f88ef83dcc7c962614a080e0a9a2db5889 (diff) |
NFSv4: Support NFSv4 optional attributes in the struct nfs_fattr
Currently, filling struct nfs_fattr is more or less an all or nothing
operation, since NFSv2 and NFSv3 have only mandatory attributes.
In NFSv4, some attributes are optional, and so we may simply not be able to
fill in those fields. Furthermore, NFSv4 allows you to specify which
attributes you are interested in retrieving, thus permitting you to
optimise away retrieval of attributes that you know will no change...
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs3xdr.c')
-rw-r--r-- | fs/nfs/nfs3xdr.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/nfs/nfs3xdr.c b/fs/nfs/nfs3xdr.c index 6cdeacffde46..c0f7d02aced9 100644 --- a/fs/nfs/nfs3xdr.c +++ b/fs/nfs/nfs3xdr.c | |||
@@ -177,7 +177,7 @@ xdr_decode_fattr(__be32 *p, struct nfs_fattr *fattr) | |||
177 | p = xdr_decode_time3(p, &fattr->ctime); | 177 | p = xdr_decode_time3(p, &fattr->ctime); |
178 | 178 | ||
179 | /* Update the mode bits */ | 179 | /* Update the mode bits */ |
180 | fattr->valid |= (NFS_ATTR_FATTR | NFS_ATTR_FATTR_V3); | 180 | fattr->valid |= NFS_ATTR_FATTR_V3; |
181 | return p; | 181 | return p; |
182 | } | 182 | } |
183 | 183 | ||
@@ -233,7 +233,9 @@ xdr_decode_wcc_attr(__be32 *p, struct nfs_fattr *fattr) | |||
233 | p = xdr_decode_hyper(p, &fattr->pre_size); | 233 | p = xdr_decode_hyper(p, &fattr->pre_size); |
234 | p = xdr_decode_time3(p, &fattr->pre_mtime); | 234 | p = xdr_decode_time3(p, &fattr->pre_mtime); |
235 | p = xdr_decode_time3(p, &fattr->pre_ctime); | 235 | p = xdr_decode_time3(p, &fattr->pre_ctime); |
236 | fattr->valid |= NFS_ATTR_WCC; | 236 | fattr->valid |= NFS_ATTR_FATTR_PRESIZE |
237 | | NFS_ATTR_FATTR_PREMTIME | ||
238 | | NFS_ATTR_FATTR_PRECTIME; | ||
237 | return p; | 239 | return p; |
238 | } | 240 | } |
239 | 241 | ||