]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_db: metadump metadir rt bitmap and summary files
authorChristoph Hellwig <hch@lst.de>
Thu, 21 Nov 2024 00:24:37 +0000 (16:24 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 24 Dec 2024 02:01:34 +0000 (18:01 -0800)
Don't skip dumping the data fork for regular files that are marked as
metadata inodes.  This catches rtbitmap and summary inodes on rtgroup
enabled file systems where their inode numbers aren't recorded in the
superblock.

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>
Reviewed-by: Christoph Hellwig <hch@lst.de>
db/metadump.c

index 144ebfbfe2a90e4a2e3e61ed24f713057e78ee05..8eb4b8eb69e45c4bef66f17994ed060b9d4332b8 100644 (file)
@@ -2072,7 +2072,11 @@ process_bmbt_reclist(
        xfs_agblock_t           agbno;
        int                     rval = 1;
 
-       if (btype == TYP_DATA)
+       /*
+        * Ignore regular file data except for metadata inodes, where it is by
+        * definition metadata.
+        */
+       if (btype == TYP_DATA && !is_metadata_ino(dip))
                return 1;
 
        convert_extent(&rp[numrecs - 1], &o, &s, &c, &f);