diff options
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-volgen.c | 7 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd.h | 3 |
2 files changed, 10 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) { diff --git a/xlators/mgmt/glusterd/src/glusterd.h b/xlators/mgmt/glusterd/src/glusterd.h index bcc376a6d..7e065b77b 100644 --- a/xlators/mgmt/glusterd/src/glusterd.h +++ b/xlators/mgmt/glusterd/src/glusterd.h @@ -306,6 +306,9 @@ struct glusterd_volinfo_ { glusterd_volinfo_t->snap_volumes */ struct list_head bricks; struct list_head snap_volumes; + /* TODO : Need to remove this, as this + * is already part of snapshot object. + */ glusterd_volume_status status; int sub_count; /* backward compatibility */ int stripe_count; |