dect
/
linux-2.6
Archived
13
0
Fork 0

Btrfs: fix a scrub regression in case of write errors

This regression was introduced by the device-replace patches.
Scrub immediately stops checking those disks that have write errors.
This is nothing that happens in the real world, but it is wrong
since scrub is the tool to detect and repair defects. Fix it.

Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
This commit is contained in:
Stefan Behrens 2012-11-27 17:39:51 +00:00 committed by Chris Mason
parent f9c83748de
commit af1be4f851
1 changed files with 2 additions and 1 deletions

View File

@ -2657,7 +2657,8 @@ int scrub_enumerate_chunks(struct scrub_ctx *sctx,
btrfs_put_block_group(cache);
if (ret)
break;
if (atomic64_read(&dev_replace->num_write_errors) > 0) {
if (is_dev_replace &&
atomic64_read(&dev_replace->num_write_errors) > 0) {
ret = -EIO;
break;
}