diff options
author | Darrick J. Wong <djwong@kernel.org> | 2023-05-31 11:02:21 +0200 |
---|---|---|
committer | Carlos Maiolino <cem@kernel.org> | 2023-06-09 10:27:50 +0200 |
commit | b3c8146ec425df6cc4e072d7cab35e89d9f34467 (patch) | |
tree | 81c6c2d31a9ed2e4f7ccff12b739e8aa7dae48c9 | |
parent | 830c99b1869205e1ca8979fc31d24cff8d56db22 (diff) | |
download | xfsprogs-dev-b3c8146ec425df6cc4e072d7cab35e89d9f34467.tar.gz |
xfs: hoist rmap record flag checks from scrub
Source kernel commit: e774b2ea0bb130d00e3cb1c29cd91028d0c0c83d
Move the rmap record flag checks from xchk_rmapbt_rec into
xfs_rmap_check_irec so that they are applied everywhere.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
-rw-r--r-- | libxfs/xfs_rmap.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libxfs/xfs_rmap.c b/libxfs/xfs_rmap.c index 4657d7da7f..2a05cdba8e 100644 --- a/libxfs/xfs_rmap.c +++ b/libxfs/xfs_rmap.c @@ -253,6 +253,11 @@ xfs_rmap_check_irec( if (!is_inode && (is_bmbt || is_unwritten || is_attr)) return __this_address; + /* Check for a valid fork offset, if applicable. */ + if (is_inode && !is_bmbt && + !xfs_verify_fileext(mp, irec->rm_offset, irec->rm_blockcount)) + return __this_address; + return NULL; } |