[sheepdog] [PATCH] dog: use right redundancy copies when rollback VDI

Wang dongxu wangdongxu at cmss.chinamobile.com
Tue Mar 3 06:35:59 CET 2015


This commit fix Bug #1427094
https://bugs.launchpad.net/sheepdog-project/+bug/1427094
"redundancy change to the cluster default when rollback VDI"

While rollback from a snapshot, VDI should use snapshot's nr_copies.

Signed-off-by: Wang dongxu <wangdongxu at cmss.chinamobile.com>
---
 dog/vdi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dog/vdi.c b/dog/vdi.c
index 3a69505..3766273 100644
--- a/dog/vdi.c
+++ b/dog/vdi.c
@@ -1084,7 +1084,7 @@ static int vdi_rollback(int argc, char **argv)
 	}
 
 	ret = do_vdi_create(vdiname, inode->vdi_size, base_vid, &new_vid,
-			     false, vdi_cmd_data.nr_copies, inode->copy_policy,
+			     false, inode->nr_copies, inode->copy_policy,
 			     inode->store_policy, inode->block_size_shift);
 
 	if (ret == EXIT_SUCCESS && verbose) {
-- 
2.1.0






More information about the sheepdog mailing list