[sheepdog] [PATCH 2/2] collie: change definitions of subcommands for dynamic work queue
Hitoshi Mitake
mitake.hitoshi at lab.ntt.co.jp
Mon Aug 5 13:29:33 CEST 2013
parse_vdi() employes a dynamic work queue for parallel requesting. A
number of threads created by dynamic workqueue depends on a number of
sheep nodes. And the number is not initialized when a definition of
subcommand doesn't have SUBCMD_FLAG_NEED_NODELIST in its flag.
This patch lets vdi list and vdi graph have SUBCMD_FLAG_NEED_NODELIST
in their flags. So they can enjoy performance improvements by parallel
requesting of parse_vdi().
Signed-off-by: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
---
collie/vdi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/collie/vdi.c b/collie/vdi.c
index 1a0abf3..221f230 100644
--- a/collie/vdi.c
+++ b/collie/vdi.c
@@ -2004,11 +2004,11 @@ static struct subcommand vdi_cmd[] = {
NULL, SUBCMD_FLAG_NEED_ARG,
vdi_rollback, vdi_options},
{"list", "[vdiname]", "aprh", "list images",
- NULL, 0, vdi_list, vdi_options},
+ NULL, SUBCMD_FLAG_NEED_NODELIST, vdi_list, vdi_options},
{"tree", NULL, "aph", "show images in tree view format",
NULL, 0, vdi_tree, vdi_options},
{"graph", NULL, "aph", "show images in Graphviz dot format",
- NULL, 0, vdi_graph, vdi_options},
+ NULL, SUBCMD_FLAG_NEED_NODELIST, vdi_graph, vdi_options},
{"object", "<vdiname>", "isaph", "show object information in the image",
NULL, SUBCMD_FLAG_NEED_NODELIST|SUBCMD_FLAG_NEED_ARG,
vdi_object, vdi_options},
--
1.7.10.4
More information about the sheepdog
mailing list