summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendra@redhat.com>2013-12-03 17:51:20 +0530
committerRaghavendra Bhat <raghavendra@redhat.com>2013-12-03 17:52:14 +0530
commit79467d3a41689b7789a15b923ef97e4c1f19d20b (patch)
tree96bf07a8be07a654ca89d1f822054b5d1eaa6f69
parentd50377f7296bf3bd83d0e116ccf6f5b9465666a7 (diff)
mgmt/glusterd: set the snap count properly while restoring
Change-Id: I37eb7ab12767fdd11aa2e58441d26e6d6d9dd245 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-store.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-store.c b/xlators/mgmt/glusterd/src/glusterd-store.c
index 37bf8bd..ca3b80c 100644
--- a/xlators/mgmt/glusterd/src/glusterd-store.c
+++ b/xlators/mgmt/glusterd/src/glusterd-store.c
@@ -3082,6 +3082,7 @@ glusterd_store_retrieve_snap_list (char *volname)
gf_store_op_errno_t op_errno = GD_STORE_SUCCESS;
glusterd_snap_t *snap = NULL;
uint64_t count = 0;
+ uint64_t snap_count = 0;
gf_store_handle_t *shandle = NULL;
priv = THIS->private;
@@ -3110,12 +3111,12 @@ glusterd_store_retrieve_snap_list (char *volname)
if(ret)
goto out;
- volinfo->snap_count = atol(value);
+ snap_count = atol(value);
GF_FREE (value);
value = NULL;
shandle = volinfo->snap_list_shandle;
- while (count <= volinfo->snap_count) {
+ while (count <= snap_count) {
snap = glusterd_new_snap_object ();
if (!snap) {
gf_log (THIS->name, GF_LOG_ERROR,