summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_buf_item.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2021-12-04 20:48:55 -0800
committerDarrick J. Wong <djwong@kernel.org>2021-12-15 17:28:45 -0800
commitac8b02a059a8faded0ab7048a3dc5a26330520d1 (patch)
treed6798ce77926f3157b60bce6331489af0b8d32b8 /fs/xfs/xfs_buf_item.c
parent461d48f2597d822301f621e7123120ed1d26f3b4 (diff)
xfs: fix a bug in the online fsck directory leaf1 bestcount check
When xfs_scrub encounters a directory with a leaf1 block, it tries to validate that the leaf1 block's bestcount (aka the best free count of each directory data block) is the correct size. Previously, this author believed that comparing bestcount to the directory isize (since directory data blocks are under isize, and leaf/bestfree blocks are above it) was sufficient. Unfortunately during testing of online repair, it was discovered that it is possible to create a directory with a hole between the last directory block and isize. The directory code seems to handle this situation just fine and xfs_repair doesn't complain, which effectively makes this quirk part of the disk format. Fix the check to work properly. Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/xfs_buf_item.c')
0 files changed, 0 insertions, 0 deletions