]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: scrub: merge SCRUB_PAGES_PER_RD_BIO and SCRUB_PAGES_PER_WR_BIO
authorQu Wenruo <wqu@suse.com>
Mon, 6 Dec 2021 05:52:58 +0000 (13:52 +0800)
committerDavid Sterba <dsterba@suse.com>
Fri, 7 Jan 2022 13:18:25 +0000 (14:18 +0100)
commita85604de0d7b639b4ddff8a952423fe46faa8cd4
tree11b6b5df60e5f12d8093512c801f4f34a165621f
parent201e129a9aed34ad737f9679d5428520ef1a216a
btrfs: scrub: merge SCRUB_PAGES_PER_RD_BIO and SCRUB_PAGES_PER_WR_BIO

These two values were introduced in commit 0d803f5d4489 ("Btrfs: add code
to scrub to copy read data to another disk") as an optimization.

But the truth is, block layer scheduler can do whatever it wants to
merge/split bios to improve performance.

Doing such "optimization" is not really going to affect much, especially
considering how good current block layer optimizations are doing.
Remove such old and immature optimization from our code.

Since we're here, also change BUG_ON()s using these two macros to use
ASSERT()s.

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