summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorAvra Sengupta <asengupt@redhat.com>2016-07-27 16:28:44 +0530
committerRajesh Joseph <rjoseph@redhat.com>2016-08-24 03:17:30 -0700
commit5d833c89aacc747d0bc654b4ab947c6bf59366d0 (patch)
treed066b94f06c4865cc2d9483a49885c0f0d79b171 /xlators
parent106a107ec5c8ecc48c3e048a9b8ad9ac809e278d (diff)
snapshot: Display number of snapshots in volume info
Backport of http://review.gluster.org/#/c/15029/ Display number of snapshots in a volume in volume info output. This number gets modified, with create, delete, and restore operations. > Reviewed-on: http://review.gluster.org/15029 > Smoke: Gluster Build System <jenkins@build.gluster.org> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.org> > Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> (cherry picked from commit 1df4a89de17e44c8c1f9b4794a7b8c2741f2bc2e) Change-Id: Ic9b7c2b6950980f8ce75ca362998c097ea7c863d BUG: 1369328 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/15288 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-handler.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c
index 91ae6237c54..bf62290d023 100644
--- a/xlators/mgmt/glusterd/src/glusterd-handler.c
+++ b/xlators/mgmt/glusterd/src/glusterd-handler.c
@@ -558,6 +558,11 @@ glusterd_add_volume_detail_to_dict (glusterd_volinfo_t *volinfo,
if (ret)
goto out;
+ snprintf (key, 256, "volume%d.snap_count", count);
+ ret = dict_set_int32 (volumes, key, volinfo->snap_count);
+ if (ret)
+ goto out;
+
#ifdef HAVE_BD_XLATOR
if (volinfo->caps) {
caps = 0;