Btrfs: in scrub repair code, optimize the reading of mirrors
authorStefan Behrens <sbehrens@giantdisaster.de>
Fri, 2 Nov 2012 15:14:21 +0000 (16:14 +0100)
committerJosef Bacik <jbacik@fusionio.com>
Wed, 12 Dec 2012 22:15:31 +0000 (17:15 -0500)
commitcb2ced73d8c7a38b5f699e267deadf2a2cfe911c
tree52d23d374ae31faac4d63b031387e532f577b895
parent7a9e9987681198c56ac7f165725ca322d7a196e1
Btrfs: in scrub repair code, optimize the reading of mirrors

In case that disk blocks need to be repaired (rewritten), the
current code at first (for simplicity reasons) reads all alternate
mirrors in the first step, afterwards selects the best one in a
second step. This is now changed to read one alternate mirror
after the other and to leave the loop early when a perfect mirror
is found.

Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
fs/btrfs/scrub.c