Stefan Behrens
2012-Nov-27 17:39 UTC
[PATCH] Btrfs: fix a build warning for an unused label
This issue was detected by the "0-DAY kernel build testing". fs/btrfs/volumes.c: In function ''btrfs_rm_device'': fs/btrfs/volumes.c:1505:1: warning: label ''error_close'' defined but not used [-Wunused-label] Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de> --- This patch is only for btrfs-next. fs/btrfs/volumes.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 012eb7a..69d1388 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -1541,7 +1541,6 @@ int btrfs_rm_device(struct btrfs_root *root, char *device_path) error_brelse: brelse(bh); -error_close: if (bdev) blkdev_put(bdev, FMODE_READ | FMODE_EXCL); out: -- 1.8.0.1 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Stefan Behrens
2012-Nov-27 17:39 UTC
[PATCH] 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> --- This patch is only for btrfs-next. fs/btrfs/scrub.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } -- 1.8.0.1 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html