mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
format_text: Use versionsort to sort archive files
Ensure that vg_100000-* follows vg_99999-* so that the expiry logic doesn't stop too early. https://bugzilla.redhat.com/1481085
This commit is contained in:
parent
0ecf232194
commit
9a730233c9
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.178 -
|
Version 2.02.178 -
|
||||||
====================================
|
====================================
|
||||||
|
Use versionsort to fix archive file expiry beyond 100000 files.
|
||||||
|
|
||||||
Version 2.02.178-rc1 - 24th May 2018
|
Version 2.02.178-rc1 - 24th May 2018
|
||||||
====================================
|
====================================
|
||||||
|
@ -135,8 +135,8 @@ static struct dm_list *_scan_archive(struct dm_pool *mem,
|
|||||||
|
|
||||||
dm_list_init(results);
|
dm_list_init(results);
|
||||||
|
|
||||||
/* Sort fails beyond 5-digit indexes */
|
/* Use versionsort to handle numbers beyond 5 digits */
|
||||||
if ((count = scandir(dir, &dirent, NULL, alphasort)) < 0) {
|
if ((count = scandir(dir, &dirent, NULL, versionsort)) < 0) {
|
||||||
log_error("Couldn't scan the archive directory (%s).", dir);
|
log_error("Couldn't scan the archive directory (%s).", dir);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user