]> www.infradead.org Git - users/hch/xfsprogs.git/commitdiff
repair: don't reset fork format on link
authorChristoph Hellwig <hch@lst.de>
Wed, 10 Jul 2024 07:27:44 +0000 (09:27 +0200)
committerChristoph Hellwig <hch@lst.de>
Wed, 17 Jul 2024 06:17:59 +0000 (08:17 +0200)
The inode fork formats won't change with an unlink/link cycle, so don't
reset them for the rtgroup inodes in phase6.  If the inode was corrupted
we won't even get here and will re-create the inode anyway.

Signed-off-by: Christoph Hellwig <hch@lst.de>
repair/phase6.c

index 81e349e7443d7b9f761eceb6e2ea1533e244f980..f6a85c577802c4c0f4d6380a40f94624f659b3bd 100644 (file)
@@ -966,7 +966,6 @@ ensure_rtgroup_rmapbt(
 
                /* Reset the link count to something sane. */
                set_nlink(VFS_I(upd.ip), 1);
-               upd.ip->i_df.if_format = XFS_DINODE_FMT_RMAP;
                libxfs_trans_log_inode(upd.tp, upd.ip, XFS_ILOG_CORE);
        } else {
 zap:
@@ -1095,7 +1094,6 @@ ensure_rtgroup_refcountbt(
 
                /* Reset the link count to something sane. */
                set_nlink(VFS_I(upd.ip), 1);
-               upd.ip->i_df.if_format = XFS_DINODE_FMT_REFCOUNT;
                libxfs_trans_log_inode(upd.tp, upd.ip, XFS_ILOG_CORE);
        } else {
 zap: