EIO is only for the IO failure to the device, avoid it. Signed-off-by: Anand Jain <anand.j...@oracle.com> --- v2: This patch is renamed from [PATCH 1/2] btrfs: fix read_one_chunk() return error code
fs/btrfs/volumes.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 2f500a32089e..844ae25cff9e 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -6448,7 +6448,7 @@ static int read_one_chunk(struct btrfs_fs_info *fs_info, struct btrfs_key *key, !btrfs_test_opt(fs_info, DEGRADED)) { free_extent_map(em); btrfs_report_missing_device(fs_info, devid, uuid); - return -EIO; + return -ENOENT; } if (!map->stripes[i].dev) { map->stripes[i].dev = @@ -6581,7 +6581,7 @@ static int read_one_dev(struct btrfs_fs_info *fs_info, if (!device) { if (!btrfs_test_opt(fs_info, DEGRADED)) { btrfs_report_missing_device(fs_info, devid, dev_uuid); - return -EIO; + return -ENOENT; } device = add_missing_dev(fs_devices, devid, dev_uuid); @@ -6592,7 +6592,7 @@ static int read_one_dev(struct btrfs_fs_info *fs_info, if (!device->bdev) { btrfs_report_missing_device(fs_info, devid, dev_uuid); if (!btrfs_test_opt(fs_info, DEGRADED)) - return -EIO; + return -ENOENT; } if(!device->bdev && !device->missing) { -- 2.7.0 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html