Skip to content

Commit 33b97e4

Browse files
asjmasoncl
authored andcommitted
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>
1 parent 1f6e4b3 commit 33b97e4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/btrfs/volumes.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6230,10 +6230,11 @@ static int read_one_dev(struct btrfs_root *root,
62306230
if (!btrfs_test_opt(root, DEGRADED))
62316231
return -EIO;
62326232

6233-
btrfs_warn(root->fs_info, "devid %llu missing", devid);
62346233
device = add_missing_dev(root, fs_devices, devid, dev_uuid);
62356234
if (!device)
62366235
return -ENOMEM;
6236+
btrfs_warn(root->fs_info, "devid %llu uuid %pU missing",
6237+
devid, dev_uuid);
62376238
} else {
62386239
if (!device->bdev && !btrfs_test_opt(root, DEGRADED))
62396240
return -EIO;

0 commit comments

Comments
 (0)