[sheepdog] [PATCH v2 2/3] dog: change definitions of subcommands for dynamic work queue
Hitoshi Mitake
mitake.hitoshi at lab.ntt.co.jp
Tue Aug 27 14:35:36 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 CMD_NEED_NODELIST in its flag.
This patch lets vdi list and vdi graph have CMD_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>
---
v2:
- rebase on the latest master
-- SUBCMD_FLAG_NEED_NODELIST -> CMD_NEED_NODELIST
dog/vdi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dog/vdi.c b/dog/vdi.c
index b0c2ea5..333080a 100644
--- a/dog/vdi.c
+++ b/dog/vdi.c
@@ -2064,11 +2064,11 @@ static struct subcommand vdi_cmd[] = {
NULL, CMD_NEED_ARG,
vdi_rollback, vdi_options},
{"list", "[vdiname]", "aprh", "list images",
- NULL, 0, vdi_list, vdi_options},
+ NULL, CMD_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, CMD_NEED_NODELIST, vdi_graph, vdi_options},
{"object", "<vdiname>", "isaph", "show object information in the image",
NULL, CMD_NEED_NODELIST|CMD_NEED_ARG,
vdi_object, vdi_options},
--
1.7.10.4
More information about the sheepdog
mailing list