From eaed5ca0d629c4fc643eaa981287efcdbeacecb6 Mon Sep 17 00:00:00 2001 From: Sachin Pandit Date: Sun, 10 Nov 2013 13:51:21 +0000 Subject: 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 --- xlators/mgmt/glusterd/src/glusterd-snapshot.c | 7 ++----- 1 file 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); -- cgit