diff options
author | Anand Jain <Anand.Jain@oracle.com> | 2015-05-07 20:34:35 (GMT) |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2015-06-03 02:34:35 (GMT) |
commit | 33b97e43279a60729eee502809cf5269b3a64cf3 (patch) | |
tree | 8d6bcad7d71e777253b1ab1890900b7ef8938efd | |
parent | 1f6e4b3f9f7c859fed7ac4c0853e976a1a752873 (diff) | |
download | linux-33b97e43279a60729eee502809cf5269b3a64cf3.tar.xz |
Btrfs: check error before reporting missing device and add uuid
Report missing device when add is successful,
otherwise it would exit as ENOMEM. And add uuid
to the report.
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <clm@fb.com>
-rw-r--r-- | fs/btrfs/volumes.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 38d3a0f3..403ed1f 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -6230,10 +6230,11 @@ static int read_one_dev(struct btrfs_root *root, if (!btrfs_test_opt(root, DEGRADED)) return -EIO; - btrfs_warn(root->fs_info, "devid %llu missing", devid); device = add_missing_dev(root, fs_devices, devid, dev_uuid); if (!device) return -ENOMEM; + btrfs_warn(root->fs_info, "devid %llu uuid %pU missing", + devid, dev_uuid); } else { if (!device->bdev && !btrfs_test_opt(root, DEGRADED)) return -EIO; |