diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-09-30 15:21:24 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-10-09 17:19:15 -0400 |
commit | 70ca88521fc7bee8ef0fc22033a439d4b9a2c70d (patch) | |
tree | 8e3943bfac55b59dc127393f8da0ecfc4aba424b /include/linux | |
parent | b64e8a5ef758888cb42b7c105dcfaaf51aab1baf (diff) |
NFS: Fake up 'wcc' attributes to prevent cache invalidation after write
NFSv2 and v4 don't offer weak cache consistency attributes on WRITE calls.
In NFSv3, returning wcc data is optional. In all cases, we want to prevent
the client from invalidating our cached data whenever ->write_done()
attempts to update the inode attributes.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/nfs_fs.h | 1 | ||||
-rw-r--r-- | include/linux/nfs_xdr.h | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 63850a884902..9449286c5867 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
@@ -293,6 +293,7 @@ extern struct inode *nfs_fhget(struct super_block *, struct nfs_fh *, | |||
293 | struct nfs_fattr *); | 293 | struct nfs_fattr *); |
294 | extern int nfs_refresh_inode(struct inode *, struct nfs_fattr *); | 294 | extern int nfs_refresh_inode(struct inode *, struct nfs_fattr *); |
295 | extern int nfs_post_op_update_inode(struct inode *inode, struct nfs_fattr *fattr); | 295 | extern int nfs_post_op_update_inode(struct inode *inode, struct nfs_fattr *fattr); |
296 | extern int nfs_post_op_update_inode_force_wcc(struct inode *inode, struct nfs_fattr *fattr); | ||
296 | extern int nfs_getattr(struct vfsmount *, struct dentry *, struct kstat *); | 297 | extern int nfs_getattr(struct vfsmount *, struct dentry *, struct kstat *); |
297 | extern int nfs_permission(struct inode *, int, struct nameidata *); | 298 | extern int nfs_permission(struct inode *, int, struct nameidata *); |
298 | extern int nfs_open(struct inode *, struct file *); | 299 | extern int nfs_open(struct inode *, struct file *); |
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index 03032017ffaa..daab252f2e5c 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h | |||
@@ -62,7 +62,8 @@ struct nfs_fattr { | |||
62 | #define NFS_ATTR_FATTR 0x0002 /* post-op attributes */ | 62 | #define NFS_ATTR_FATTR 0x0002 /* post-op attributes */ |
63 | #define NFS_ATTR_FATTR_V3 0x0004 /* NFSv3 attributes */ | 63 | #define NFS_ATTR_FATTR_V3 0x0004 /* NFSv3 attributes */ |
64 | #define NFS_ATTR_FATTR_V4 0x0008 /* NFSv4 change attribute */ | 64 | #define NFS_ATTR_FATTR_V4 0x0008 /* NFSv4 change attribute */ |
65 | #define NFS_ATTR_FATTR_V4_REFERRAL 0x0010 /* NFSv4 referral */ | 65 | #define NFS_ATTR_WCC_V4 0x0010 /* pre-op change attribute */ |
66 | #define NFS_ATTR_FATTR_V4_REFERRAL 0x0020 /* NFSv4 referral */ | ||
66 | 67 | ||
67 | /* | 68 | /* |
68 | * Info on the file system | 69 | * Info on the file system |