From 1f74a3efbd0337759878ffff5cd4ee6782ddfe3f Mon Sep 17 00:00:00 2001 From: Avra Sengupta Date: Wed, 28 Oct 2015 12:30:34 +0530 Subject: snapshot: Inherit snap-max-hard-limit from original volume A snapshot should inherit snap-max-hard-limit from the original volume while being created and when being restored to, it should restore the same. Similarly a clone taken from a snapshot should inherit snap-max-hard-limit from the snapshot. Change-Id: If8e90e2ffc10e22086b803ac8e2638a16bcec968 BUG: 1275616 Signed-off-by: Avra Sengupta Reviewed-on: http://review.gluster.org/12437 Tested-by: Gluster Build System Reviewed-by: mohammed rafi kc Tested-by: NetBSD Build System Reviewed-by: Rajesh Joseph --- xlators/mgmt/glusterd/src/glusterd-snapshot.c | 1 - xlators/mgmt/glusterd/src/glusterd-utils.c | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators') diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot.c b/xlators/mgmt/glusterd/src/glusterd-snapshot.c index 272d497f418..15699b0e9c0 100644 --- a/xlators/mgmt/glusterd/src/glusterd-snapshot.c +++ b/xlators/mgmt/glusterd/src/glusterd-snapshot.c @@ -9606,7 +9606,6 @@ gd_restore_snap_volume (dict_t *dict, dict_t *rsp_dict, strcpy (new_volinfo->volname, orig_vol->volname); gf_uuid_copy (new_volinfo->volume_id, orig_vol->volume_id); new_volinfo->snap_count = orig_vol->snap_count; - new_volinfo->snap_max_hard_limit = orig_vol->snap_max_hard_limit; gf_uuid_copy (new_volinfo->restored_from_snap, snap_vol->snapshot->snap_id); diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index 06c60f37751..4c1b9d42936 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -553,6 +553,7 @@ glusterd_volinfo_dup (glusterd_volinfo_t *volinfo, new_volinfo->brick_count = volinfo->brick_count; new_volinfo->tier_info = volinfo->tier_info; new_volinfo->quota_conf_version = volinfo->quota_conf_version; + new_volinfo->snap_max_hard_limit = volinfo->snap_max_hard_limit; dict_copy (volinfo->dict, new_volinfo->dict); dict_copy (volinfo->gsync_slaves, new_volinfo->gsync_slaves); -- cgit