fs: Lift XFS_IDONTCACHE to the VFS layer
DAX effective mode (S_DAX) changes requires inode eviction. XFS has an advisory flag (XFS_IDONTCACHE) to prevent caching of the inode if no other additional references are taken. We lift this flag to the VFS layer and change the behavior slightly by allowing the flag to remain even if multiple references are taken. This will expedite the eviction of inodes to change S_DAX. Cc: Al Viro <viro@zeniv.linux.org.uk> Reviewed-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Ira Weiny <ira.weiny@intel.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
This commit is contained in:
committed by
Darrick J. Wong
parent
83d9088659
commit
dae2f8ed79
@@ -479,7 +479,7 @@ xfs_iget_cache_hit(
|
||||
xfs_ilock(ip, lock_flags);
|
||||
|
||||
if (!(flags & XFS_IGET_INCORE))
|
||||
xfs_iflags_clear(ip, XFS_ISTALE | XFS_IDONTCACHE);
|
||||
xfs_iflags_clear(ip, XFS_ISTALE);
|
||||
XFS_STATS_INC(mp, xs_ig_found);
|
||||
|
||||
return 0;
|
||||
@@ -561,7 +561,7 @@ xfs_iget_cache_miss(
|
||||
*/
|
||||
iflags = XFS_INEW;
|
||||
if (flags & XFS_IGET_DONTCACHE)
|
||||
iflags |= XFS_IDONTCACHE;
|
||||
VFS_I(ip)->i_state |= I_DONTCACHE;
|
||||
ip->i_udquot = NULL;
|
||||
ip->i_gdquot = NULL;
|
||||
ip->i_pdquot = NULL;
|
||||
|
||||
Reference in New Issue
Block a user