summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSachin Pandit <spandit@redhat.com>2013-11-10 13:51:21 +0000
committerSachin Pandit <spandit@redhat.com>2013-11-10 13:55:14 +0000
commiteaed5ca0d629c4fc643eaa981287efcdbeacecb6 (patch)
tree5c6597b96b501a83a11016a491a96b56eb4b7cc5
parent697f0f4329ffa1fc974ad63c101e8d76691485d7 (diff)
mgmt/glusterd : Change in the ordering of snapshot list output.snap_devel
snapshot taken first should be displayed first in the snapshot list output. Change-Id: Idd1b2374f842b3b70edfb3024094d4d81fbb1163 Signed-off-by: Sachin Pandit <spandit@redhat.com>
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-snapshot.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot.c b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
index 077bf33ad..18024e806 100644
--- a/xlators/mgmt/glusterd/src/glusterd-snapshot.c
+++ b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
@@ -1324,11 +1324,8 @@ glusterd_snapshot_vol_get_snaplist_lk (dict_t *dict, char *keyprefix,
* it to NULL */
value = NULL;
- /* New entries are always added to the end of snap_list and we need to
- * display the list in LIFO (Last-In-First-Out) order. Therefore insert
- * the entries in reverse order into the dictionary.
- */
- list_for_each_entry_safe_reverse (entry, tmp, &volinfo->snaps,
+ /* snapshot taken first should be displayed first */
+ list_for_each_entry_safe (entry, tmp, &volinfo->snaps,
snap_list) {
++index;
ret = snprintf (key, sizeof (key), "%s.snap-%ld", keyprefix, index);