diff options
author | Christoph Hellwig <hch@lst.de> | 2021-04-13 20:15:12 +0200 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2021-04-15 18:35:51 +0200 |
commit | b2197a36c0ef5b35a0ed83de744610a462da1ad3 (patch) | |
tree | 21611dca81125014a3e3904f8c4e8b7e7f2937fb /fs/xfs/scrub | |
parent | xfs: remove XFS_IFINLINE (diff) | |
download | linux-b2197a36c0ef5b35a0ed83de744610a462da1ad3.tar.xz linux-b2197a36c0ef5b35a0ed83de744610a462da1ad3.zip |
xfs: remove XFS_IFEXTENTS
The in-memory XFS_IFEXTENTS is now only used to check if an inode with
extents still needs the extents to be read into memory before doing
operations that need the extent map. Add a new xfs_need_iread_extents
helper that returns true for btree format forks that do not have any
entries in the in-memory extent btree, and use that instead of checking
the XFS_IFEXTENTS flag.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/scrub')
-rw-r--r-- | fs/xfs/scrub/bmap.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/xfs/scrub/bmap.c b/fs/xfs/scrub/bmap.c index 924d7e343731..b5ebf1d1b4db 100644 --- a/fs/xfs/scrub/bmap.c +++ b/fs/xfs/scrub/bmap.c @@ -447,7 +447,7 @@ xchk_bmap_btree( int error; /* Load the incore bmap cache if it's not loaded. */ - info->was_loaded = ifp->if_flags & XFS_IFEXTENTS; + info->was_loaded = !xfs_need_iread_extents(ifp); error = xfs_iread_extents(sc->tp, ip, whichfork); if (!xchk_fblock_process_error(sc, whichfork, 0, &error)) @@ -673,10 +673,6 @@ xchk_bmap( /* No mappings to check. */ goto out; case XFS_DINODE_FMT_EXTENTS: - if (!(ifp->if_flags & XFS_IFEXTENTS)) { - xchk_fblock_set_corrupt(sc, whichfork, 0); - goto out; - } break; case XFS_DINODE_FMT_BTREE: if (whichfork == XFS_COW_FORK) { |