diff options
author | Darrick J. Wong <djwong@kernel.org> | 2024-01-31 11:47:14 -0800 |
---|---|---|
committer | Chandan Babu R <chandanbabu@kernel.org> | 2024-02-17 09:18:53 +0530 |
commit | 1149314a16f7972743c66988b2ac19767009325e (patch) | |
tree | 8193ebc7bc0b561ec1276d21a440ff8cef47f9f9 /fs | |
parent | 57b98393b812ddaf9cf33a0d57d70b25cabfed66 (diff) |
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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/xfs/scrub/ialloc_repair.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/scrub/ialloc_repair.c b/fs/xfs/scrub/ialloc_repair.c index b3f7182dd2f5..e94f10800082 100644 --- a/fs/xfs/scrub/ialloc_repair.c +++ b/fs/xfs/scrub/ialloc_repair.c @@ -369,7 +369,7 @@ xrep_ibt_check_inode_ext( * On a sparse inode fs, this cluster could be part of a sparse chunk. * Sparse clusters must be aligned to sparse chunk alignment. */ - if (xfs_has_sparseinodes(mp) && + if (xfs_has_sparseinodes(mp) && mp->m_sb.sb_spino_align && (!IS_ALIGNED(agbno, mp->m_sb.sb_spino_align) || !IS_ALIGNED(agbno + len, mp->m_sb.sb_spino_align))) return -EFSCORRUPTED; |