btrfs: scrub: don't go ordered workqueue for dev-replace
authorQu Wenruo <wqu@suse.com>
Thu, 3 Aug 2023 06:33:32 +0000 (14:33 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 21 Aug 2023 12:54:49 +0000 (14:54 +0200)
commit39dc7bd94d084dcdcd4c88be281d7d8c9b3b0d61
tree7a95823e2788de4da9aa4f5a6f8e4eb38785659f
parentae76d8e3e1351aa1ba09cc68dab6866d356f2e17
btrfs: scrub: don't go ordered workqueue for dev-replace

The workqueue fs_info->scrub_worker would go ordered workqueue if it's a
device replace operation.

However the scrub is relying on multiple workers to do data csum
verification, and we always submit several read requests in a row.

Thus there is no need to use ordered workqueue just for dev-replace.
We have extra synchronization (the main thread will always
submit-and-wait for dev-replace writes) to handle it for zoned devices.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/scrub.c