From: Hitoshi Mitake <[email protected]> Current "dog vdi clone" has a possibility of creating clone volume which has a different replica number from its original volume when it receives -c option. This patch forbid such a situation by letting vdi_clone() use inode->nr_copies instead of vdi_cmd_data.nr_copies (the variable which holds a value passed with -c option).
Cc: MORITA Kazutaka <[email protected]> Cc: Valerio Pachera <[email protected]> Cc: Alessandro Bolgia <[email protected]> Signed-off-by: Hitoshi Mitake <[email protected]> Signed-off-by: Liu Yuan <[email protected]> --- dog/vdi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dog/vdi.c b/dog/vdi.c index e469f58..9c029ee 100644 --- a/dog/vdi.c +++ b/dog/vdi.c @@ -750,7 +750,7 @@ static int vdi_clone(int argc, char **argv) goto out; ret = do_vdi_create(dst_vdi, inode->vdi_size, base_vid, &new_vid, false, - vdi_cmd_data.nr_copies, inode->copy_policy, + inode->nr_copies, inode->copy_policy, inode->store_policy); if (ret != EXIT_SUCCESS || !vdi_cmd_data.prealloc) goto out; -- 1.9.1 -- sheepdog mailing list [email protected] http://lists.wpkg.org/mailman/listinfo/sheepdog
