From 6ba6f3933ee6af32c4a2187b742788cb21831bc6 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Wed, 20 Nov 2024 16:24:37 -0800 Subject: [PATCH] xfs_db: metadump metadir rt bitmap and summary files 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 Reviewed-by: "Darrick J. Wong" Signed-off-by: "Darrick J. Wong" Reviewed-by: Christoph Hellwig --- db/metadump.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/db/metadump.c b/db/metadump.c index 144ebfbf..8eb4b8eb 100644 --- a/db/metadump.c +++ b/db/metadump.c @@ -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); -- 2.47.2