mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-01 03:11:59 +00:00
nfs: define and use the NFS_INO_INVALID_XATTR flag
Define the NFS_INO_INVALID_XATTR flag, to be used for the NFSv4.2 xattr cache, and use it where appropriate. No functional change as yet. Signed-off-by: Frank van der Linden <fllinden@amazon.com> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
This commit is contained in:
parent
1b523ca972
commit
0f44da51ae
4 changed files with 11 additions and 3 deletions
|
@ -204,7 +204,8 @@ static void nfs_set_cache_invalid(struct inode *inode, unsigned long flags)
|
|||
flags &= ~NFS_INO_INVALID_OTHER;
|
||||
flags &= ~(NFS_INO_INVALID_CHANGE
|
||||
| NFS_INO_INVALID_SIZE
|
||||
| NFS_INO_REVAL_PAGECACHE);
|
||||
| NFS_INO_REVAL_PAGECACHE
|
||||
| NFS_INO_INVALID_XATTR);
|
||||
}
|
||||
|
||||
if (inode->i_mapping->nrpages == 0)
|
||||
|
@ -542,6 +543,8 @@ nfs_fhget(struct super_block *sb, struct nfs_fh *fh, struct nfs_fattr *fattr, st
|
|||
inode->i_gid = fattr->gid;
|
||||
else if (nfs_server_capable(inode, NFS_CAP_OWNER_GROUP))
|
||||
nfs_set_cache_invalid(inode, NFS_INO_INVALID_OTHER);
|
||||
if (nfs_server_capable(inode, NFS_CAP_XATTR))
|
||||
nfs_set_cache_invalid(inode, NFS_INO_INVALID_XATTR);
|
||||
if (fattr->valid & NFS_ATTR_FATTR_BLOCKS_USED)
|
||||
inode->i_blocks = fattr->du.nfs2.blocks;
|
||||
if (fattr->valid & NFS_ATTR_FATTR_SPACE_USED) {
|
||||
|
@ -1375,6 +1378,8 @@ static void nfs_wcc_update_inode(struct inode *inode, struct nfs_fattr *fattr)
|
|||
inode_set_iversion_raw(inode, fattr->change_attr);
|
||||
if (S_ISDIR(inode->i_mode))
|
||||
nfs_set_cache_invalid(inode, NFS_INO_INVALID_DATA);
|
||||
else if (nfs_server_capable(inode, NFS_CAP_XATTR))
|
||||
nfs_set_cache_invalid(inode, NFS_INO_INVALID_XATTR);
|
||||
}
|
||||
/* If we have atomic WCC data, we may update some attributes */
|
||||
ts = inode->i_ctime;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue