@@ -353,6 +353,9 @@ static void print_one_uuid(struct btrfs_fs_devices *fs_devices,
if (add_seen_fsid(fs_devices->fsid))
return;
+ if (fs_devices->spare)
+ return;
+
uuid_unparse(fs_devices->fsid, uuidbuf);
device = list_entry(fs_devices->devices.next, struct btrfs_device,
dev_list);
@@ -610,6 +613,7 @@ static int copy_fs_devices(struct btrfs_fs_devices *dst,
memcpy(dst->fsid, src->fsid, BTRFS_FSID_SIZE);
INIT_LIST_HEAD(&dst->devices);
dst->seed = NULL;
+ dst->spare = src->spare;
list_for_each_entry(cur_dev, &src->devices, dev_list) {
dev_copy = malloc(sizeof(*dev_copy));
Signed-off-by: Anand Jain <anand.jain@oracle.com> --- cmds-filesystem.c | 4 ++++ 1 file changed, 4 insertions(+)