summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSachin Pandit <spandit@redhat.com>2013-11-10 13:51:21 +0000
committershishir gowda <sgowda@redhat.com>2013-11-15 14:45:14 +0530
commit6acf65e64cb6cd50b05ef8e60769ab3d5dc32ef7 (patch)
tree9c961da42e137cd1ea6fd833223215a4799aa227
parentb831d59836547b7d5d21afb38af2629036864c57 (diff)
mgmt/glusterd : Change in the ordering of snapshot list output.
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 dbbf84189..be910f73a 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);