Version 2.03.17 - 10th November 2022 ==================================== Add new options (--fs, --fsmode) for FS handling when resizing LVs. Fix 'lvremove -S|--select LV' to not also remove its historical LV right away. Fix lv_active field type to binary so --select and --binary applies properly. Switch to use mallinfo2 and use it only with glibc. Error out in lvm shell if using a cmd argument not supported in the shell. Fix lvm shell's lastlog command to report previous pre-command failures. Extend VDO and VDOPOOL without flushing and locking fs. Add --valuesonly option to lvmconfig to print only values without keys. Updates configure with recent autoconf tooling. Fix lvconvert --test --type vdo-pool execution. Add json_std output format for more JSON standard compliant version of output. Fix vdo_slab_size_mb value for converted VDO volume. Fix many corner cases in device_id, including handling of S/N duplicates. Fix various issues in lvmdbusd. libdm changes: Version 1.02.187 - 10th November 2022 ===================================== Add DM_REPORT_GROUP_JSON_STD for more JSON standard compliant output format. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
45 lines
1.2 KiB
Diff
45 lines
1.2 KiB
Diff
--- a/lib/mm/memlock.c
|
|
+++ b/lib/mm/memlock.c
|
|
@@ -198,12 +198,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) {
|
|
@@ -213,9 +216,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
|
|
@@ -536,8 +542,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 &&
|