diff options
author | Sachin Pandit <spandit@redhat.com> | 2014-03-17 09:42:16 +0530 |
---|---|---|
committer | Rajesh Joseph <rjoseph@redhat.com> | 2014-03-17 23:42:24 -0700 |
commit | e481921863d91dfce5550ce9722e99129f5979c2 (patch) | |
tree | a0ca6886b5b08807bdadc3c1017419f2d9e25d3e /xlators/mgmt/glusterd/src/glusterd-volgen.c | |
parent | bc8a9a21f8e3184b2138be3ca10280dfde3ce153 (diff) |
glusterd/snapshot : Restore fix.
Copy the snapshot present in origin volume to the restored volume.
Change-Id: Icea9f712ae062b50b570d27b85cd231903446198
BUG: 1077142
Signed-off-by: Sachin Pandit <spandit@redhat.com>
Reviewed-on: http://review.gluster.org/7282
Reviewed-by: Vijaikumar Mallikarjuna <vmallika@redhat.com>
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Tested-by: Rajesh Joseph <rjoseph@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-volgen.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-volgen.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c index 24a70eb41..4c4dbd735 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volgen.c +++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c @@ -4127,6 +4127,8 @@ gd_restore_snap_volume (glusterd_volinfo_t *orig_vol, glusterd_snap_t *snap = NULL; xlator_t *this = NULL; glusterd_conf_t *conf = NULL; + glusterd_volinfo_t *temp_volinfo = NULL; + glusterd_volinfo_t *voliter = NULL; this = THIS; GF_ASSERT (this); @@ -4162,6 +4164,11 @@ gd_restore_snap_volume (glusterd_volinfo_t *orig_vol, new_volinfo->snap_max_hard_limit = orig_vol->snap_max_hard_limit; new_volinfo->is_volume_restored = _gf_true; + list_for_each_entry_safe (voliter, temp_volinfo, + &orig_vol->snap_volumes, snapvol_list) { + list_add_tail (&voliter->snapvol_list, + &new_volinfo->snap_volumes); + } /* Copy the snap vol info to the new_volinfo.*/ ret = glusterd_snap_volinfo_restore (new_volinfo, snap_vol); if (ret) { |