There are some reports of dead relocation stage loop, where dmesg is
flooded by "Found X extents".
The root cause of it is still uncertain, but we can work around such bug
by checking cancelling request so user can at least cancel such dead
loop.
Signed-off-by: Qu Wenruo <wqu@suse.com>
(cherry picked from commit
51e1987039e8138615d7da1e52aa53a3fb332612)
btrfs_info(fs_info, "found %llu extents, stage: %s",
rc->extents_found, stage_to_string(finishes_stage));
+
+ if (should_cancel_balance(fs_info)) {
+ err = -ECANCELED;
+ goto out;
+ }
}
WARN_ON(rc->block_group->pinned > 0);