All of lore.kernel.org
 help / color / mirror / Atom feed
* master - format_text: Use versionsort to sort archive files
@ 2018-05-24 15:51 Marian Csontos
  0 siblings, 0 replies; 2+ messages in thread
From: Marian Csontos @ 2018-05-24 15:51 UTC (permalink / raw)
  To: lvm-devel

Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=9a730233c935085ec5de9440796daa0d416ba4ba
Commit:        9a730233c935085ec5de9440796daa0d416ba4ba
Parent:        0ecf232194986b12c3ae95b3f93e7fdd56158dc1
Author:        Alasdair G Kergon <agk@redhat.com>
AuthorDate:    Fri Feb 9 01:08:55 2018 +0000
Committer:     Marian Csontos <mcsontos@redhat.com>
CommitterDate: Thu May 24 17:51:03 2018 +0200

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
---
 WHATS_NEW                 |    1 +
 lib/format_text/archive.c |    4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/WHATS_NEW b/WHATS_NEW
index 35695ab..25707ab 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
 Version 2.02.178 -
 ====================================
+  Use versionsort to fix archive file expiry beyond 100000 files.
 
 Version 2.02.178-rc1 - 24th May 2018
 ====================================
diff --git a/lib/format_text/archive.c b/lib/format_text/archive.c
index 690bc74..533e91c 100644
--- a/lib/format_text/archive.c
+++ b/lib/format_text/archive.c
@@ -135,8 +135,8 @@ static struct dm_list *_scan_archive(struct dm_pool *mem,
 
 	dm_list_init(results);
 
-	/* Sort fails beyond 5-digit indexes */
-	if ((count = scandir(dir, &dirent, NULL, alphasort)) < 0) {
+	/* Use versionsort to handle numbers beyond 5 digits */
+	if ((count = scandir(dir, &dirent, NULL, versionsort)) < 0) {
 		log_error("Couldn't scan the archive directory (%s).", dir);
 		return 0;
 	}



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* master - format_text: Use versionsort to sort archive files
@ 2018-02-09  1:32 Alasdair Kergon
  0 siblings, 0 replies; 2+ messages in thread
From: Alasdair Kergon @ 2018-02-09  1:32 UTC (permalink / raw)
  To: lvm-devel

Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=1b6d0346a37d34394471080ec2aff55cea1bdafe
Commit:        1b6d0346a37d34394471080ec2aff55cea1bdafe
Parent:        d6cabbbc53de615fe92ff6372a570285704b59d2
Author:        Alasdair G Kergon <agk@redhat.com>
AuthorDate:    Fri Feb 9 01:08:55 2018 +0000
Committer:     Alasdair G Kergon <agk@redhat.com>
CommitterDate: Fri Feb 9 01:08:55 2018 +0000

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
---
 WHATS_NEW                 |    1 +
 lib/format_text/archive.c |    4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/WHATS_NEW b/WHATS_NEW
index 9e6cb39..197adc3 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
 Version 2.02.178 - 
 =====================================
+  Use versionsort to fix archive file expiry beyond 100000 files.
   Add devices/use_aio, aio_max, aio_memory to configure AIO limits.
   Support asynchronous I/O when scanning devices.
   Detect asynchronous I/O capability in configure or accept --disable-aio.
diff --git a/lib/format_text/archive.c b/lib/format_text/archive.c
index 4d4e7ac..a81a83b 100644
--- a/lib/format_text/archive.c
+++ b/lib/format_text/archive.c
@@ -136,8 +136,8 @@ static struct dm_list *_scan_archive(struct dm_pool *mem,
 
 	dm_list_init(results);
 
-	/* Sort fails beyond 5-digit indexes */
-	if ((count = scandir(dir, &dirent, NULL, alphasort)) < 0) {
+	/* Use versionsort to handle numbers beyond 5 digits */
+	if ((count = scandir(dir, &dirent, NULL, versionsort)) < 0) {
 		log_error("Couldn't scan the archive directory (%s).", dir);
 		return 0;
 	}



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-05-24 15:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-24 15:51 master - format_text: Use versionsort to sort archive files Marian Csontos
  -- strict thread matches above, loose matches on Subject: below --
2018-02-09  1:32 Alasdair Kergon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.