[sheepdog] [PATCH 02/10] sheep: fix cluster_notify_vdi_add

Liu Yuan namei.unix at gmail.com
Tue Oct 15 16:36:35 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 5c6c571..340c8d4 100644
--- a/sheep/ops.c
+++ b/sheep/ops.c
@@ -598,7 +598,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