diff options
author | Darrick J. Wong <djwong@kernel.org> | 2021-02-20 08:18:20 -0800 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2021-03-25 17:08:55 -0700 |
commit | 13a296999ea49dd4cb16cab75c3aef5e691ed124 (patch) | |
tree | 01352ba13312a481be236c65046f47c8d569bbc4 /fs/xfs/xfs_itable.c | |
parent | 2fc33b20316a173c7de3451b6cb6c64d6ca900b2 (diff) |
xfs: experiment with dontcache when scanning inodesvectorized-scrub_2021-03-25
Add some experimental flags to drop inodes from the cache after a scan.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/xfs_itable.c')
-rw-r--r-- | fs/xfs/xfs_itable.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/xfs/xfs_itable.c b/fs/xfs/xfs_itable.c index 4d1a9b5d975b..bee985fe525f 100644 --- a/fs/xfs/xfs_itable.c +++ b/fs/xfs/xfs_itable.c @@ -74,11 +74,13 @@ xfs_bulkstat_one_int( struct xfs_inode *ip; /* incore inode pointer */ struct inode *inode; struct xfs_bulkstat *buf = bc->buf; + int flags = XFS_IGET_UNTRUSTED; int error = -EINVAL; - error = xfs_iget(mp, tp, ino, - (XFS_IGET_DONTCACHE | XFS_IGET_UNTRUSTED), - XFS_ILOCK_SHARED, &ip); + if (!(bc->breq->flags & XFS_IBULK_RETAIN_INODES)) + flags |= XFS_IGET_DONTCACHE; + + error = xfs_iget(mp, tp, ino, flags, XFS_ILOCK_SHARED, &ip); if (error == -ENOENT || error == -EINVAL) goto out_advance; if (error) |