diff options
| -rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-snapshot.c | 7 | 
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);  | 
