summaryrefslogtreecommitdiff
path: root/mm/kmemleak.c
diff options
context:
space:
mode:
authorNaohiro Aota <naohiro.aota@wdc.com>2024-04-09 17:18:52 +0300
committerDavid Sterba <dsterba@suse.com>2024-04-18 02:46:47 +0300
commit7192833c4e55b26e8f15ef58577867a1bc808036 (patch)
tree6608a8e8343fa56071cc1c38300f51f19892098e /mm/kmemleak.c
parente5a78fdec0114266d3c47df413d2d7955807fad9 (diff)
downloadlinux-7192833c4e55b26e8f15ef58577867a1bc808036.tar.xz
btrfs: scrub: run relocation repair when/only needed
When btrfs scrub finds an error, it reads mirrors to find correct data. If all the errors are fixed, sctx->error_bitmap is cleared for the stripe range. However, in the zoned mode, it runs relocation to repair scrub errors when the bitmap is *not* empty, which is a flipped condition. Also, it runs the relocation even if the scrub is read-only. This was missed by a fix in commit 1f2030ff6e49 ("btrfs: scrub: respect the read-only flag during repair"). The repair is only necessary when there is a repaired sector and should be done on read-write scrub. So, tweak the condition for both regular and zoned case. Fixes: 54765392a1b9 ("btrfs: scrub: introduce helper to queue a stripe for scrub") Fixes: 1f2030ff6e49 ("btrfs: scrub: respect the read-only flag during repair") CC: stable@vger.kernel.org # 6.6+ Reviewed-by: Qu Wenruo <wqu@suse.com> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'mm/kmemleak.c')
0 files changed, 0 insertions, 0 deletions