lvm2: update to 2.03.40 (libdm 1.02.209)
authorDaniel Golle <redacted>
Fri, 8 May 2026 17:40:01 +0000 (18:40 +0100)
committerAlexandru Ardelean <redacted>
Sat, 9 May 2026 16:14:58 +0000 (19:14 +0300)
Update LVM2 from 2.03.33 to 2.03.40, bundled libdm from 1.02.207 to
1.02.209.

LVM2 highlights since 2.03.33:

2.03.40 (28th April 2026):
 * Many bug fixes and memory/lock leak fixes throughout the
   tree (vgcreate, vgmerge, vgimportclone, pvscan, raid, dmeventd,
   pvmove, lvmpolld).
 * Validate area_count and metadata sizes to prevent overflows.
 * Fix percent_check threshold stuck above 100% in dmeventd
   thin/vdo plugins.
 * Pre-create udev cookie before critical section to avoid
   resume failures.

2.03.39 (13th March 2026):
 * Support --interval +N to delay first poll in pvmove and lvpoll.
 * Add atomic leases using Compare and Write (CAW) to lvmlockd.
 * Add lvm-index(7), lvm-categories(7), lvm-args(7) man pages.
 * Show active cache mode in kernel table line (lvs -o kernel_cache_mode).
 * Switch from internal device_mapper library to libdm.

2.03.34 - 2.03.38:
 * Persistent reservation support on a VG; VG attr character + pr
   field on vgs reflecting persistent reservation status.
 * dmeventd: restart with no monitored devices, no actions on
   removed devices.
 * Various filter, integrity, cache, raid and pvmove fixes.

libdm changes since 1.02.207 (1.02.208 / 1.02.209) consist purely
of internal cleanups and version bumps; no user-visible changes
documented in WHATS_NEW_DM.

Link: https://gitlab.com/lvmteam/lvm2/-/blob/v2_03_40/WHATS_NEW
Link: https://gitlab.com/lvmteam/lvm2/-/blob/v2_03_40/WHATS_NEW_DM
Signed-off-by: Daniel Golle <redacted>
utils/lvm2/Makefile
utils/lvm2/patches/002-const-stdio.patch
utils/lvm2/patches/003-no-mallinfo.patch

index 7f6bdbf15c3f0f8abed3659f3fc8bb7efec3aad2..cf6f396b22481cc83cf82f62c213a2a352242b65 100644 (file)
@@ -9,15 +9,15 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=LVM2
-PKG_VERSION:=2.03.33
-PKG_VERSION_DM:=1.02.207
-PKG_RELEASE:=2
+PKG_VERSION:=2.03.40
+PKG_VERSION_DM:=1.02.209
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME).$(PKG_VERSION).tgz
 PKG_SOURCE_URL:=https://sourceware.org/pub/lvm2 \
                 https://www.mirrorservice.org/sites/sourceware.org/pub/lvm2
 
-PKG_HASH:=be4babd8a986d73279f1e75fbb1d33cb41559b75c2063611781bfeb8c2def139
+PKG_HASH:=60c9bb5c0a109f20267bb40ba50c00c84a110fc14c129f21afb5566929bf5645
 PKG_BUILD_DIR:=$(BUILD_DIR)/lvm2-$(BUILD_VARIANT)/$(PKG_NAME).$(PKG_VERSION)
 
 PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
index 6eebc9a89d93c819fe34d717b59059d0dbc61949..c8d7d38544a8982aea0d159c5cad31125d220ef0 100644 (file)
@@ -1,6 +1,6 @@
 --- a/lib/commands/toolcontext.c
 +++ b/lib/commands/toolcontext.c
-@@ -1669,6 +1669,7 @@ struct cmd_context *create_toolcontext(u
+@@ -1668,6 +1668,7 @@ struct cmd_context *create_toolcontext(u
        /* FIXME Make this configurable? */
        reset_lvm_errno(1);
  
@@ -8,7 +8,7 @@
        /* Set in/out stream buffering before glibc */
        if (set_buffering
            && !cmd->running_on_valgrind /* Skipping within valgrind execution. */
-@@ -1713,6 +1714,7 @@ struct cmd_context *create_toolcontext(u
+@@ -1712,6 +1713,7 @@ struct cmd_context *create_toolcontext(u
        } else if (!set_buffering)
                /* Without buffering, must not use stdin/stdout */
                init_silent(1);
@@ -16,7 +16,7 @@
  
        /*
         * Environment variable LVM_SYSTEM_DIR overrides this below.
-@@ -2047,6 +2049,7 @@ void destroy_toolcontext(struct cmd_cont
+@@ -2050,6 +2052,7 @@ void destroy_toolcontext(struct cmd_cont
        if (cmd->cft_def_hash)
                dm_hash_destroy(cmd->cft_def_hash);
  
@@ -24,7 +24,7 @@
        if (!cmd->running_on_valgrind && cmd->linebuffer) {
                int flags;
                /* Reset stream buffering to defaults */
-@@ -2070,6 +2073,7 @@ void destroy_toolcontext(struct cmd_cont
+@@ -2073,6 +2076,7 @@ void destroy_toolcontext(struct cmd_cont
  
                free(cmd->linebuffer);
        }
@@ -34,7 +34,7 @@
  
 --- a/tools/lvmcmdline.c
 +++ b/tools/lvmcmdline.c
-@@ -3404,6 +3404,7 @@ int lvm_split(char *str, int *argc, char
+@@ -3394,6 +3394,7 @@ int lvm_split(char *str, int *argc, char
  /* Make sure we have always valid filedescriptors 0,1,2 */
  static int _check_standard_fds(void)
  {
@@ -42,7 +42,7 @@
        int err = is_valid_fd(STDERR_FILENO);
  
        if (!is_valid_fd(STDIN_FILENO) &&
-@@ -3430,6 +3431,12 @@ static int _check_standard_fds(void)
+@@ -3420,6 +3421,12 @@ static int _check_standard_fds(void)
                       strerror(errno));
                return 0;
        }
index 66450bf0bc89c037defbe93de5f5eb3f0fe6b4a3..77fe1b162555a115989ea6c2c115d667de796de8 100644 (file)
@@ -1,6 +1,6 @@
 --- a/lib/mm/memlock.c
 +++ b/lib/mm/memlock.c
-@@ -199,12 +199,15 @@ static void _allocate_memory(void)
+@@ -201,12 +201,15 @@ static void _allocate_memory(void)
         *  memory on free(), this is good enough for our purposes.
         */
        while (missing > 0) {
@@ -16,7 +16,7 @@
                inf = MALLINFO();
  
                if (hblks < inf.hblks) {
-@@ -214,9 +217,12 @@ static void _allocate_memory(void)
+@@ -216,9 +219,12 @@ static void _allocate_memory(void)
                        free(areas[area]);
                        _size_malloc_tmp /= 2;
                } else {
@@ -27,9 +27,9 @@
                }
 +#endif
  
-               if (area == max_areas && missing > 0) {
+               if (area == MAX_AREAS && missing > 0) {
                        /* Too bad. Warn the user and proceed, as things are
-@@ -540,8 +546,13 @@ static void _lock_mem(struct cmd_context
+@@ -552,8 +558,13 @@ static void _lock_mem(struct cmd_context
         * will not block memory locked thread
         * Note: assuming _memlock_count_daemon is updated before _memlock_count
         */
git clone https://git.99rst.org/PROJECT