btrfs: use readahead API for scrub
commit7a26285eea8eb92e0088db011571d887d4551b0f
authorArne Jansen <sensille@gmx.net>
Fri, 10 Jun 2011 10:39:23 +0000 (10 12:39 +0200)
committerArne Jansen <sensille@gmx.net>
Sun, 2 Oct 2011 06:48:45 +0000 (2 08:48 +0200)
tree2165dcb75f2ebbae358fc54aebaa49e7337c317f
parent4bb31e928d1a47f5bd046ecb176b8eff7c589fc0
btrfs: use readahead API for scrub

Scrub uses a simple tree-enumeration to bring the relevant portions
of the extent- and csum-tree into the page cache before starting the
scrub-I/O. This is now replaced by using the new readahead-API.
During readahead the scrub is being accounted as paused, so it won't
hold off transaction commits.

This change raises the average disk bandwith utilisation on my test
volume from 70% to 90%. On another volume, the time for a test run
went down from 89s to 43s.

Changes v5:
 - reada1/2 are now of type struct reada_control *

Signed-off-by: Arne Jansen <sensille@gmx.net>
fs/btrfs/scrub.c