[sheepdog] [PATCH] dog: compare copies with zones_nr instead of nodes_nr when format
Meng Lingkun
starmlk at 163.com
Wed Jul 22 06:38:48 CEST 2015
From: Meng Lingkun <menglingkun at cmss.chinamobile.com>
Since cluster stores data in different nodes with different zones,
So fix it.
Signed-off-by: Meng Lingkun <menglingkun at cmss.chinamobile.com>
---
dog/cluster.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/dog/cluster.c b/dog/cluster.c
index ef854d5..696d249 100644
--- a/dog/cluster.c
+++ b/dog/cluster.c
@@ -130,12 +130,12 @@ static int cluster_format(int argc, char **argv)
}
}
- if (cluster_cmd_data.copies > sd_nodes_nr) {
+ if (cluster_cmd_data.copies > sd_zones_nr) {
char info[1024];
snprintf(info, sizeof(info), "Number of copies (%d) is larger "
- "than number of nodes (%d).\n"
+ "than number of zones (%d).\n"
"Are you sure you want to continue? [yes/no]: ",
- cluster_cmd_data.copies, sd_nodes_nr);
+ cluster_cmd_data.copies, sd_zones_nr);
confirm(info);
}
--
1.7.1
More information about the sheepdog
mailing list