diff options
author | Stefan Behrens <sbehrens@giantdisaster.de> | 2012-11-27 17:39:51 +0000 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2012-12-16 20:46:14 -0500 |
commit | af1be4f851db4f4975f0139211a6561776ef37c0 (patch) | |
tree | a508ceac2567883c6cbfac5c8e06761db80d2b20 /fs | |
parent | f9c83748deb94aba89b5c1085f887ddcdab223ef (diff) | |
download | kernel_goldelico_gta04-af1be4f851db4f4975f0139211a6561776ef37c0.zip kernel_goldelico_gta04-af1be4f851db4f4975f0139211a6561776ef37c0.tar.gz kernel_goldelico_gta04-af1be4f851db4f4975f0139211a6561776ef37c0.tar.bz2 |
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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/scrub.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c index 30ba997..8db6a64 100644 --- a/fs/btrfs/scrub.c +++ b/fs/btrfs/scrub.c @@ -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; } |