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

No differences found