[sheepdog] [PATCH v2 14/21] sheep: fix cluster_notify_vdi_add

Liu Yuan namei.unix at gmail.com
Wed Oct 16 07:50:40 CEST 2013


We should set copy_policy too for snapshot vdi

Signed-off-by: Liu Yuan <namei.unix at gmail.com>
---
 sheep/ops.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sheep/ops.c b/sheep/ops.c
index d96ab43..69b1659 100644
--- a/sheep/ops.c
+++ b/sheep/ops.c
@@ -602,7 +602,7 @@ static int cluster_notify_vdi_add(const struct sd_req *req, struct sd_rsp *rsp,
 		/* make the previous working vdi a snapshot */
 		add_vdi_state(req->vdi_state.old_vid,
 			      get_vdi_copy_number(req->vdi_state.old_vid),
-			      true, 0);
+			      true, req->vdi_state.copy_policy);
 
 	if (req->vdi_state.set_bitmap)
 		atomic_set_bit(req->vdi_state.new_vid, sys->vdi_inuse);
-- 
1.7.9.5




More information about the sheepdog mailing list