xfs: disable sparse inode chunk alignment check when there is no alignment
authorDarrick J. Wong <djwong@kernel.org>
Wed, 31 Jan 2024 19:47:14 +0000 (11:47 -0800)
committerChandan Babu R <chandanbabu@kernel.org>
Sat, 17 Feb 2024 03:48:53 +0000 (09:18 +0530)
commit1149314a16f7972743c66988b2ac19767009325e
tree8193ebc7bc0b561ec1276d21a440ff8cef47f9f9
parent57b98393b812ddaf9cf33a0d57d70b25cabfed66
xfs: disable sparse inode chunk alignment check when there is no alignment

While testing a 64k-blocksize filesystem, I noticed that xfs/709 fails
to rebuild the inode btree with a bunch of "Corruption remains"
messages.  It turns out that when the inode chunk size is smaller than a
single filesystem block, no block alignments constraints are necessary
for inode chunk allocations, and sb_spino_align is zero.  Hence we can
skip the check.

Fixes: dbfbf3bdf639 ("xfs: repair inode btrees")
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
fs/xfs/scrub/ialloc_repair.c