1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-15 11:53:59 +02:00
openwrt-packages/utils/lvm2/patches/003-no-mallinfo.patch

46 lines
1.2 KiB
Diff
Raw Normal View History

--- a/lib/mm/memlock.c
+++ b/lib/mm/memlock.c
lvm2: update LVM2 to 2.03.22 and DM to 1.02.196 Remove downstream patch 004-missing-includes.patch which was merged upstream in version 2.03.19 LVM2 changelog since version 2.03.17 version 2.03.22 - 02nd August 2023 ================================== Fix pv_major/pv_minor report field types so they are integers, not strings. Add lvmdevices --delnotfound to delete entries for missing devices. Always use cachepool name for metadata backup LV for lvconvert --repair. Make metadata backup LVs read-only after pool's lvconvert --repair. Improve VDO and Thin support with lvmlockd. Handle 'lvextend --usepolicies' for pools for all activation variants. Fix memleak in vgchange autoactivation setup. Update py-compile building script. Support conversion from thick to fully provisioned thin LV. Cache/Thin-pool can use error and zero volumes for testing. Individual thin volume can be cached, but cannot take snapshot. Better internal support for handling error and zero target (for testing). Resize COW above trimmed maximal size is does not return error. Support parsing of vdo geometry format version 4. Add lvm.conf thin_restore and cache_restore settings. Handle multiple mounts while resizing volume with a FS. Handle leading/trailing spaces in sys_wwid and sys_serial used by deivce_id. Enhance lvm_import_vdo and use snapshot when converting VDO volume. Fix parsing of VDO metadata. Fix failing -S|--select for non-reporting cmds if using LV info/status fields. Allow snapshots of raid+integrity LV. Fix multisegment RAID1 allocator to prevent using single disk for more legs. version 2.03.21 - 21st April 2023 ================================= Fix activation of vdo-pool for with 0 length headers (converted pools). Avoid printing internal init messages when creation integration devices. Allow (write)cache over raid+integrity LV. version 2.03.20 - 21st March 2023 ================================= Fix segfault if using -S|--select with log/report_command_log=1 setting. Configure now fails when requested lvmlockd dependencies are missing. Add some configure Gentoo enhancements for static builds. version 2.03.19 - 21st February 2023 ==================================== Configure supports --with-systemd-run executed from udev rules. Enhancement for build with MuslC systemd and non-bash system shells (dash). Do not reset SYSTEMD_READY variable in udev for PVs on MD and loop devices. Ensure udev is processing origin LV before its thick snapshots LVs. Fix and improve runtime memory size detection for VDO volumes. version 2.03.18 - 22nd December 2022 ==================================== Fix issues reported by coverity scan. Fix warning for thin pool overprovisioning on lvextend (2.03.17). Add support for writecache metadata_only and pause_writeback settings. Fix missing error messages in lvmdbusd. DM changelog since version 1.02.187: Version 1.02.196 - 02nd August 2023 =================================== Version 1.02.195 - 21st April 2023 ================================== Version 1.02.193 - 21st March 2023 ================================== Version 1.02.191 - 21st February 2023 ===================================== Improve parallel creation of /dev/mapper/control device node. Import previous ID_FS_* udev records in 13-dm-disk.rules for suspended DM dev. Remove NAME="mapper/control" rule from 10-dm.rules to avoid udev warnings. Version 1.02.189 - 22nd December 2022 ===================================== Improve 'dmsetup create' without given table line with new kernels. (Version 1.02.188 is missing) Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-08-05 02:47:18 +02:00
@@ -199,12 +199,15 @@ static void _allocate_memory(void)
* memory on free(), this is good enough for our purposes.
*/
while (missing > 0) {
+#ifdef __GLIBC__
struct MALLINFO inf = MALLINFO();
hblks = inf.hblks;
+#endif
if ((areas[area] = malloc(_size_malloc_tmp)))
_touch_memory(areas[area], _size_malloc_tmp);
+#ifdef __GLIBC__
inf = MALLINFO();
if (hblks < inf.hblks) {
lvm2: update LVM2 to 2.03.22 and DM to 1.02.196 Remove downstream patch 004-missing-includes.patch which was merged upstream in version 2.03.19 LVM2 changelog since version 2.03.17 version 2.03.22 - 02nd August 2023 ================================== Fix pv_major/pv_minor report field types so they are integers, not strings. Add lvmdevices --delnotfound to delete entries for missing devices. Always use cachepool name for metadata backup LV for lvconvert --repair. Make metadata backup LVs read-only after pool's lvconvert --repair. Improve VDO and Thin support with lvmlockd. Handle 'lvextend --usepolicies' for pools for all activation variants. Fix memleak in vgchange autoactivation setup. Update py-compile building script. Support conversion from thick to fully provisioned thin LV. Cache/Thin-pool can use error and zero volumes for testing. Individual thin volume can be cached, but cannot take snapshot. Better internal support for handling error and zero target (for testing). Resize COW above trimmed maximal size is does not return error. Support parsing of vdo geometry format version 4. Add lvm.conf thin_restore and cache_restore settings. Handle multiple mounts while resizing volume with a FS. Handle leading/trailing spaces in sys_wwid and sys_serial used by deivce_id. Enhance lvm_import_vdo and use snapshot when converting VDO volume. Fix parsing of VDO metadata. Fix failing -S|--select for non-reporting cmds if using LV info/status fields. Allow snapshots of raid+integrity LV. Fix multisegment RAID1 allocator to prevent using single disk for more legs. version 2.03.21 - 21st April 2023 ================================= Fix activation of vdo-pool for with 0 length headers (converted pools). Avoid printing internal init messages when creation integration devices. Allow (write)cache over raid+integrity LV. version 2.03.20 - 21st March 2023 ================================= Fix segfault if using -S|--select with log/report_command_log=1 setting. Configure now fails when requested lvmlockd dependencies are missing. Add some configure Gentoo enhancements for static builds. version 2.03.19 - 21st February 2023 ==================================== Configure supports --with-systemd-run executed from udev rules. Enhancement for build with MuslC systemd and non-bash system shells (dash). Do not reset SYSTEMD_READY variable in udev for PVs on MD and loop devices. Ensure udev is processing origin LV before its thick snapshots LVs. Fix and improve runtime memory size detection for VDO volumes. version 2.03.18 - 22nd December 2022 ==================================== Fix issues reported by coverity scan. Fix warning for thin pool overprovisioning on lvextend (2.03.17). Add support for writecache metadata_only and pause_writeback settings. Fix missing error messages in lvmdbusd. DM changelog since version 1.02.187: Version 1.02.196 - 02nd August 2023 =================================== Version 1.02.195 - 21st April 2023 ================================== Version 1.02.193 - 21st March 2023 ================================== Version 1.02.191 - 21st February 2023 ===================================== Improve parallel creation of /dev/mapper/control device node. Import previous ID_FS_* udev records in 13-dm-disk.rules for suspended DM dev. Remove NAME="mapper/control" rule from 10-dm.rules to avoid udev warnings. Version 1.02.189 - 22nd December 2022 ===================================== Improve 'dmsetup create' without given table line with new kernels. (Version 1.02.188 is missing) Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-08-05 02:47:18 +02:00
@@ -214,9 +217,12 @@ static void _allocate_memory(void)
free(areas[area]);
_size_malloc_tmp /= 2;
} else {
+#endif
++ area;
missing -= _size_malloc_tmp;
+#ifdef __GLIBC__
}
+#endif
if (area == max_areas && missing > 0) {
/* Too bad. Warn the user and proceed, as things are
lvm2: update LVM2 to 2.03.22 and DM to 1.02.196 Remove downstream patch 004-missing-includes.patch which was merged upstream in version 2.03.19 LVM2 changelog since version 2.03.17 version 2.03.22 - 02nd August 2023 ================================== Fix pv_major/pv_minor report field types so they are integers, not strings. Add lvmdevices --delnotfound to delete entries for missing devices. Always use cachepool name for metadata backup LV for lvconvert --repair. Make metadata backup LVs read-only after pool's lvconvert --repair. Improve VDO and Thin support with lvmlockd. Handle 'lvextend --usepolicies' for pools for all activation variants. Fix memleak in vgchange autoactivation setup. Update py-compile building script. Support conversion from thick to fully provisioned thin LV. Cache/Thin-pool can use error and zero volumes for testing. Individual thin volume can be cached, but cannot take snapshot. Better internal support for handling error and zero target (for testing). Resize COW above trimmed maximal size is does not return error. Support parsing of vdo geometry format version 4. Add lvm.conf thin_restore and cache_restore settings. Handle multiple mounts while resizing volume with a FS. Handle leading/trailing spaces in sys_wwid and sys_serial used by deivce_id. Enhance lvm_import_vdo and use snapshot when converting VDO volume. Fix parsing of VDO metadata. Fix failing -S|--select for non-reporting cmds if using LV info/status fields. Allow snapshots of raid+integrity LV. Fix multisegment RAID1 allocator to prevent using single disk for more legs. version 2.03.21 - 21st April 2023 ================================= Fix activation of vdo-pool for with 0 length headers (converted pools). Avoid printing internal init messages when creation integration devices. Allow (write)cache over raid+integrity LV. version 2.03.20 - 21st March 2023 ================================= Fix segfault if using -S|--select with log/report_command_log=1 setting. Configure now fails when requested lvmlockd dependencies are missing. Add some configure Gentoo enhancements for static builds. version 2.03.19 - 21st February 2023 ==================================== Configure supports --with-systemd-run executed from udev rules. Enhancement for build with MuslC systemd and non-bash system shells (dash). Do not reset SYSTEMD_READY variable in udev for PVs on MD and loop devices. Ensure udev is processing origin LV before its thick snapshots LVs. Fix and improve runtime memory size detection for VDO volumes. version 2.03.18 - 22nd December 2022 ==================================== Fix issues reported by coverity scan. Fix warning for thin pool overprovisioning on lvextend (2.03.17). Add support for writecache metadata_only and pause_writeback settings. Fix missing error messages in lvmdbusd. DM changelog since version 1.02.187: Version 1.02.196 - 02nd August 2023 =================================== Version 1.02.195 - 21st April 2023 ================================== Version 1.02.193 - 21st March 2023 ================================== Version 1.02.191 - 21st February 2023 ===================================== Improve parallel creation of /dev/mapper/control device node. Import previous ID_FS_* udev records in 13-dm-disk.rules for suspended DM dev. Remove NAME="mapper/control" rule from 10-dm.rules to avoid udev warnings. Version 1.02.189 - 22nd December 2022 ===================================== Improve 'dmsetup create' without given table line with new kernels. (Version 1.02.188 is missing) Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2023-08-05 02:47:18 +02:00
@@ -537,8 +543,13 @@ static void _lock_mem(struct cmd_context
* will not block memory locked thread
* Note: assuming _memlock_count_daemon is updated before _memlock_count
*/
+#ifdef __GLIBC__
_use_mlockall = _memlock_count_daemon ? 1 :
find_config_tree_bool(cmd, activation_use_mlockall_CFG, NULL);
+#else
+ /* always use mlockall on musl */
+ _use_mlockall = 1;
+#endif
if (!_use_mlockall) {
if (!*_procselfmaps &&