NFS: More fine grained attribute tracking
Currently, if the NFS_INO_INVALID_ATTR flag is set, for instance by a call to nfs_post_op_update_inode_locked(), then it will not be cleared until all the attributes have been revalidated. This means, for instance, that NFSv4 writes will always force a full attribute revalidation. Track the ctime, mtime, size and change attribute separately from the other attributes so that we can have nfs_post_op_update_inode_locked() set them correctly, and later have the cache consistency bitmask be able to clear them. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
This commit is contained in:

committed by
Anna Schumaker

parent
cac88f942d
commit
16e1437517
@@ -1272,7 +1272,9 @@ static void nfs_drop_nlink(struct inode *inode)
|
||||
/* drop the inode if we're reasonably sure this is the last link */
|
||||
if (inode->i_nlink == 1)
|
||||
clear_nlink(inode);
|
||||
NFS_I(inode)->cache_validity |= NFS_INO_INVALID_ATTR;
|
||||
NFS_I(inode)->cache_validity |= NFS_INO_INVALID_CHANGE
|
||||
| NFS_INO_INVALID_CTIME
|
||||
| NFS_INO_INVALID_OTHER;
|
||||
spin_unlock(&inode->i_lock);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user