[3/4] btrfs-progs: add fi show for spare
diff mbox

Message ID 1459261641-32254-3-git-send-email-anand.jain@oracle.com
State New
Headers show

Commit Message

Anand Jain March 29, 2016, 2:27 p.m. UTC
Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
 cmds-filesystem.c | 4 ++++
 1 file changed, 4 insertions(+)

Patch
diff mbox

diff --git a/cmds-filesystem.c b/cmds-filesystem.c
index 38404d29026e..0901c47e8679 100644
--- a/cmds-filesystem.c
+++ b/cmds-filesystem.c
@@ -351,6 +351,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);
@@ -597,6 +600,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));