linux-brain/fs/xfs/scrub
Darrick J. Wong b45f52a208 xfs: fix brainos in the refcount scrubber's rmap fragment processor
[ Upstream commit 54e9b09e153842ab5adb8a460b891e11b39e9c3d ]

Fix some serious WTF in the reference count scrubber's rmap fragment
processing.  The code comment says that this loop is supposed to move
all fragment records starting at or before bno onto the worklist, but
there's no obvious reason why nr (the number of items added) should
increment starting from 1, and breaking the loop when we've added the
target number seems dubious since we could have more rmap fragments that
should have been added to the worklist.

This seems to manifest in xfs/411 when adding one to the refcount field.

Fixes: dbde19da96 ("xfs: cross-reference the rmapbt data with the refcountbt")
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-11-18 19:20:27 +01:00
..
agheader_repair.c xfs: remove unused header files 2019-06-28 19:30:43 -07:00
agheader.c xfs: remove all *_ITER_ABORT values 2019-08-29 21:22:41 -07:00
alloc.c xfs: removed unneeded variable 2019-09-23 13:00:56 -07:00
attr.c xfs: make attr lookup returns consistent 2019-08-30 22:43:57 -07:00
attr.h xfs: only allocate memory for scrubbing attributes when we need it 2019-07-05 10:29:56 -07:00
bitmap.c xfs: remove unused header files 2019-06-28 19:30:43 -07:00
bitmap.h xfs: repair the AGFL 2018-08-10 11:44:31 -07:00
bmap.c xfs: set the unwritten bit in rmap lookup flags in xchk_bmap_get_rmapextents 2020-11-18 19:20:27 +01:00
btree.c xfs: remove unused header files 2019-06-28 19:30:43 -07:00
btree.h xfs: const-ify xfs_owner_info arguments 2018-12-12 08:47:16 -08:00
common.c xfs: remove unused header files 2019-06-28 19:30:43 -07:00
common.h xfs: periodically yield scrub threads to the scheduler 2020-01-09 10:20:06 +01:00
dabtree.c xfs: Fix possible null-pointer dereferences in xchk_da_btree_block_check_sibling() 2019-07-30 11:28:20 -07:00
dabtree.h xfs: fix indentation and other whitespace problems in scrub/repair 2018-07-23 09:08:01 -07:00
dir.c xfs: mark dir corrupt when lookup-by-hash fails 2020-10-01 13:17:42 +02:00
fscounters.c fs: xfs: Remove KM_NOSLEEP and KM_SLEEP. 2019-08-26 12:06:22 -07:00
health.c xfs: remove unused header files 2019-06-28 19:30:43 -07:00
health.h xfs: scrub should only cross-reference with healthy btrees 2019-04-16 10:01:57 -07:00
ialloc.c xfs: remove unused header files 2019-06-28 19:30:43 -07:00
inode.c xfs: fix scrub flagging rtinherit even if there is no rt device 2020-11-18 19:20:20 +01:00
parent.c xfs: remove unused header files 2019-06-28 19:30:43 -07:00
quota.c xfs: remove unused header files 2019-06-28 19:30:43 -07:00
refcount.c xfs: fix brainos in the refcount scrubber's rmap fragment processor 2020-11-18 19:20:27 +01:00
repair.c xfs: remove all *_ITER_ABORT values 2019-08-29 21:22:41 -07:00
repair.h xfs: hoist the already_fixed variable to the scrub context 2019-04-16 10:01:57 -07:00
rmap.c xfs: remove unused header files 2019-06-28 19:30:43 -07:00
rtbitmap.c xfs: remove unused header files 2019-06-28 19:30:43 -07:00
scrub.c xfs: prohibit fs freezing when using empty transactions 2020-10-01 13:17:49 +02:00
scrub.h xfs: add online scrub for superblock counters 2019-04-30 08:19:13 -07:00
symlink.c fs: xfs: Remove KM_NOSLEEP and KM_SLEEP. 2019-08-26 12:06:22 -07:00
trace.c xfs: remove unused header files 2019-06-28 19:30:43 -07:00
trace.h xfs: add online scrub for superblock counters 2019-04-30 08:19:13 -07:00
xfs_scrub.h xfs: convert to SPDX license tags 2018-06-06 14:17:53 -07:00