[sheepdog] [PATCH v6 8/8] collie: show copy number in the output of 'collie vdi list'
levin li
levin108 at gmail.com
Thu Aug 23 05:48:42 CEST 2012
From: levin li <xingke.lwp at taobao.com>
Signed-off-by: levin li <xingke.lwp at taobao.com>
---
collie/vdi.c | 10 +++++-----
tests/016.out | 2 +-
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/collie/vdi.c b/collie/vdi.c
index 52015ed..b354619 100644
--- a/collie/vdi.c
+++ b/collie/vdi.c
@@ -112,14 +112,14 @@ static void print_vdi_list(uint32_t vid, char *name, char *tag, uint32_t snapid,
putchar('\\');
putchar(*name++);
}
- printf(" %d %s %s %s %s %" PRIx32 " %s\n", snapid,
+ printf(" %d %s %s %s %s %" PRIx32 " %d %s\n", snapid,
vdi_size_str, my_objs_str, cow_objs_str, dbuf, vid,
- i->tag);
+ i->nr_copies, i->tag);
} else {
- printf("%c %-8s %5d %7s %7s %7s %s %7" PRIx32 " %s\n",
+ printf("%c %-8s %5d %7s %7s %7s %s %7" PRIx32 " %5d %13s\n",
is_current(i) ? (is_clone ? 'c' : ' ') : 's',
name, snapid, vdi_size_str, my_objs_str, cow_objs_str,
- dbuf, vid, i->tag);
+ dbuf, vid, i->nr_copies, i->tag);
}
}
@@ -312,7 +312,7 @@ static int vdi_list(int argc, char **argv)
char *vdiname = argv[optind];
if (!raw_output)
- printf(" Name Id Size Used Shared Creation time VDI id Tag\n");
+ printf(" Name Id Size Used Shared Creation time VDI id Copies Tag\n");
if (vdiname) {
struct get_vdi_info info;
diff --git a/tests/016.out b/tests/016.out
index ab894f4..6042ff3 100644
--- a/tests/016.out
+++ b/tests/016.out
@@ -1,7 +1,7 @@
QA output created by 016
using backend farm store
there should be no vdi
- Name Id Size Used Shared Creation time VDI id Tag
+ Name Id Size Used Shared Creation time VDI id Copies Tag
there should be no object
Id Size Used Use%
0 4.0 GB 12 MB 0%
--
1.7.1
More information about the sheepdog
mailing list