diff --git a/SOURCES/lvm2-2_02_188-blkdeactivate-add-missing-VDO_AVAILABLE-check-in-dea.patch b/SOURCES/lvm2-2_02_188-blkdeactivate-add-missing-VDO_AVAILABLE-check-in-dea.patch new file mode 100644 index 0000000..6d7d696 --- /dev/null +++ b/SOURCES/lvm2-2_02_188-blkdeactivate-add-missing-VDO_AVAILABLE-check-in-dea.patch @@ -0,0 +1,20 @@ + scripts/blkdeactivate.sh.in | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/scripts/blkdeactivate.sh.in b/scripts/blkdeactivate.sh.in +index 57b3e58..7c517b8 100644 +--- a/scripts/blkdeactivate.sh.in ++++ b/scripts/blkdeactivate.sh.in +@@ -330,6 +330,12 @@ deactivate_vdo() { + test -b "$DEV_DIR/mapper/$xname" || return 0 + test -z "${SKIP_DEVICE_LIST["$kname"]}" || return 1 + ++ # Skip VDO device deactivation if VDO tools missing. ++ test "$VDO_AVAILABLE" -eq 0 && { ++ add_device_to_skip_list ++ return 1 ++ } ++ + deactivate_holders "$DEV_DIR/mapper/$xname" || return 1 + + echo -n " [VDO]: deactivating VDO volume $xname... " diff --git a/SOURCES/lvm2-2_02_188-config-drop-reading-file-with-mmap.patch b/SOURCES/lvm2-2_02_188-config-drop-reading-file-with-mmap.patch new file mode 100644 index 0000000..3ed414c --- /dev/null +++ b/SOURCES/lvm2-2_02_188-config-drop-reading-file-with-mmap.patch @@ -0,0 +1,96 @@ + lib/config/config.c | 54 ++++++++++++++++++++++++----------------------------- + 1 file changed, 24 insertions(+), 30 deletions(-) + +diff --git a/lib/config/config.c b/lib/config/config.c +index ad816c2..96fdac5 100644 +--- a/lib/config/config.c ++++ b/lib/config/config.c +@@ -502,10 +502,10 @@ int config_file_read_fd(struct dm_config_tree *cft, struct device *dev, dev_io_r + { + char *fb, *fe; + int r = 0; +- int use_mmap = 1; +- off_t mmap_offset = 0; ++ int sz, use_plain_read = 1; + char *buf = NULL; + struct config_source *cs = dm_config_get_custom(cft); ++ size_t rsize; + + if (!_is_file_based_config_source(cs->type)) { + log_error(INTERNAL_ERROR "config_file_read_fd: expected file, special file " +@@ -514,26 +514,28 @@ int config_file_read_fd(struct dm_config_tree *cft, struct device *dev, dev_io_r + return 0; + } + +- /* Only use mmap with regular files */ ++ /* Only use plain read with regular files */ + if (!(dev->flags & DEV_REGULAR) || size2) +- use_mmap = 0; +- +- if (use_mmap) { +- mmap_offset = offset % lvm_getpagesize(); +- /* memory map the file */ +- fb = mmap((caddr_t) 0, size + mmap_offset, PROT_READ, +- MAP_PRIVATE, dev_fd(dev), offset - mmap_offset); +- if (fb == (caddr_t) (-1)) { +- log_sys_error("mmap", dev_name(dev)); +- goto out; ++ use_plain_read = 0; ++ ++ if (!(buf = dm_malloc(size + size2))) { ++ log_error("Failed to allocate circular buffer."); ++ return 0; ++ } ++ ++ if (use_plain_read) { ++ /* Note: also used for lvm.conf to read all settings */ ++ for (rsize = 0; rsize < size; rsize += sz) { ++ do { ++ sz = read(dev_fd(dev), buf + rsize, size - rsize); ++ } while ((sz < 0) && ((errno == EINTR) || (errno == EAGAIN))); ++ ++ if (sz < 0) { ++ log_sys_error("read", dev_name(dev)); ++ goto out; ++ } + } +- fb = fb + mmap_offset; + } else { +- if (!(buf = dm_malloc(size + size2))) { +- log_error("Failed to allocate circular buffer."); +- return 0; +- } +- + if (!dev_read_bytes(dev, offset, size, buf)) + goto out; + +@@ -541,10 +543,10 @@ int config_file_read_fd(struct dm_config_tree *cft, struct device *dev, dev_io_r + if (!dev_read_bytes(dev, offset2, size2, buf + size)) + goto out; + } +- +- fb = buf; + } + ++ fb = buf; ++ + /* + * The checksum passed in is the checksum from the mda_header + * preceding this metadata. They should always match. +@@ -572,15 +574,7 @@ int config_file_read_fd(struct dm_config_tree *cft, struct device *dev, dev_io_r + r = 1; + + out: +- if (!use_mmap) +- dm_free(buf); +- else { +- /* unmap the file */ +- if (munmap(fb - mmap_offset, size + mmap_offset)) { +- log_sys_error("munmap", dev_name(dev)); +- r = 0; +- } +- } ++ dm_free(buf); + + return r; + } diff --git a/SOURCES/lvm2-2_02_188-filters-persistent-filter-hides-rename-failure.patch b/SOURCES/lvm2-2_02_188-filters-persistent-filter-hides-rename-failure.patch new file mode 100644 index 0000000..8ae04fd --- /dev/null +++ b/SOURCES/lvm2-2_02_188-filters-persistent-filter-hides-rename-failure.patch @@ -0,0 +1,17 @@ + lib/filters/filter-persistent.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/lib/filters/filter-persistent.c b/lib/filters/filter-persistent.c +index 0586942..afd7eb5 100644 +--- a/lib/filters/filter-persistent.c ++++ b/lib/filters/filter-persistent.c +@@ -272,8 +272,7 @@ static int _persistent_filter_dump(struct dev_filter *f, int merge_existing) + goto_out; + + if (rename(tmp_file, pf->file)) +- log_error("%s: rename to %s failed: %s", tmp_file, pf->file, +- strerror(errno)); ++ log_sys_debug("rename", tmp_file); + + r = 1; + diff --git a/SOURCES/lvm2-2_02_188-fsadm-enhance-error-handling.patch b/SOURCES/lvm2-2_02_188-fsadm-enhance-error-handling.patch new file mode 100644 index 0000000..52f1e4c --- /dev/null +++ b/SOURCES/lvm2-2_02_188-fsadm-enhance-error-handling.patch @@ -0,0 +1,167 @@ +From d79c7a28521dc79275ca87737096bcee8c5121c8 Mon Sep 17 00:00:00 2001 +From: Zdenek Kabelac +Date: Sat, 24 Oct 2020 01:13:42 +0200 +Subject: [PATCH 2/2] fsadm: enhance error handling + +Set more secure bash failure mode for pipilines. +Avoid using unset variables. +Enhnace error reporting for failing command. +Avoid using error via 'case..esac || error'. + +(cherry picked from commit 9a2a59c0ed4320324e908be60693bac7ed507824) + +Conflicts: + scripts/fsadm.sh +--- + scripts/fsadm.sh | 51 ++++++++++++++++++++++++++++++--------------------- + 1 file changed, 30 insertions(+), 21 deletions(-) + +diff --git a/scripts/fsadm.sh b/scripts/fsadm.sh +index c4c7515..c59d7b6 100755 +--- a/scripts/fsadm.sh ++++ b/scripts/fsadm.sh +@@ -29,6 +29,8 @@ + # 2 break detected + # 3 unsupported online filesystem check for given mounted fs + ++set -euE -o pipefail ++ + TOOL=fsadm + + _SAVEPATH=$PATH +@@ -61,7 +63,7 @@ CRYPTSETUP=cryptsetup + # user may override lvm location by setting LVM_BINARY + LVM=${LVM_BINARY:-lvm} + +-YES=${_FSADM_YES} ++YES="${_FSADM_YES-}" + DRY=0 + VERB= + FORCE= +@@ -206,7 +208,7 @@ decode_major_minor() { + # detect filesystem on the given device + # dereference device name if it is symbolic link + detect_fs() { +- test -n "$VOLUME_ORIG" || VOLUME_ORIG=$1 ++ test -n "${VOLUME_ORIG-}" || VOLUME_ORIG=$1 + VOLUME=${1/#"${DM_DEV_DIR}/"/} + VOLUME=$("$READLINK" $READLINK_E "$DM_DEV_DIR/$VOLUME") + test -n "$VOLUME" || error "Cannot get readlink \"$1\"." +@@ -257,11 +259,11 @@ check_valid_mounted_device() { + local MOUNTEDMAJORMINOR + local VOL + local CURNAME +- local SUGGEST="Possibly device \"$1\" has been renamed to \"$CURNAME\"?" + + VOL=$("$READLINK" $READLINK_E "$1") + CURNAME=$(dmsetup info -c -j "$MAJOR" -m "$MINOR" -o name --noheadings) + # more confused, device is not DM.... ++ local SUGGEST="Possibly device \"$1\" has been renamed to \"$CURNAME\"?" + test -n "$CURNAME" || SUGGEST="Mounted volume is not a device mapper device???" + + test -n "$VOL" || +@@ -270,7 +272,7 @@ check_valid_mounted_device() { + "Filesystem utilities currently do not support renamed devices." + + case "$VOL" in +- # hardcoded /dev since udev does not create these entries elsewhere ++ # hardcoded /dev since kernel does not create these entries elsewhere + /dev/dm-[0-9]*) + read -r <"/sys/block/${VOL#/dev/}/dev" MOUNTEDMAJORMINOR 2>&1 || error "Cannot get major:minor for \"$VOLUME\"." + ;; +@@ -674,20 +676,23 @@ resize() { + # if the size parameter is missing use device size + #if [ -n "$NEWSIZE" -a $NEWSIZE < + test -z "$NEWSIZE" && NEWSIZE=${DEVSIZE}b +- test -n "$NEWSIZE_ORIG" || NEWSIZE_ORIG=$NEWSIZE ++ NEWSIZE_ORIG=${NEWSIZE_ORIG:-$NEWSIZE} + IFS=$NL +- test -z "$DO_CRYPTRESIZE" || detect_crypt_device "$VOLUME_ORIG" "$NEWSIZE_ORIG" +- test -z "$CRYPT_GROW" || resize_crypt "$VOLUME_ORIG" ++ test -z "${DO_CRYPTRESIZE-}" || detect_crypt_device "$VOLUME_ORIG" "$NEWSIZE_ORIG" ++ test -z "${CRYPT_GROW-}" || resize_crypt "$VOLUME_ORIG" ++ + case "$FSTYPE" in +- "ext3"|"ext2"|"ext4") resize_ext $NEWSIZE ;; +- "reiserfs") resize_reiser $NEWSIZE ;; +- "xfs") resize_xfs $NEWSIZE ;; ++ ext[234]) CMD=resize_ext ;; ++ "reiserfs") CMD=resize_reiser ;; ++ "xfs") CMD=resize_xfs ;; + "crypto_LUKS") +- which "$CRYPTSETUP" > /dev/null 2>&1 || error "$CRYPTSETUP utility required to resize LUKS volume" +- resize_luks $NEWSIZE ;; ++ which "$CRYPTSETUP" >"$NULL" 2>&1 || error "$CRYPTSETUP utility required to resize LUKS volume" ++ CMD=resize_luks ;; + *) error "Filesystem \"$FSTYPE\" on device \"$VOLUME\" is not supported by this tool." ;; +- esac || error "Resize $FSTYPE failed." +- test -z "$CRYPT_SHRINK" || resize_crypt "$VOLUME_ORIG" ++ esac ++ ++ $CMD $NEWSIZE || error "$FSTYPE resize failed." ++ test -z "${CRYPT_SHRINK-}" || resize_crypt "$VOLUME_ORIG" + } + + #################################### +@@ -716,7 +721,7 @@ check() { + fi + + case "$FSTYPE" in +- "ext2"|"ext3"|"ext4") ++ ext[234]) + IFS_CHECK=$IFS + IFS=$NL + for i in $(LC_ALL=C "$TUNE_EXT" -l "$VOLUME"); do +@@ -740,15 +745,15 @@ check() { + + case "$FSTYPE" in + "xfs") if which "$XFS_CHECK" >"$NULL" 2>&1 ; then +- dry "$XFS_CHECK" "$VOLUME" ++ dry "$XFS_CHECK" "$VOLUME" || error "Xfs check failed." + else + # Replacement for outdated xfs_check + # FIXME: for small devices we need to force_geometry, + # since we run in '-n' mode, it shouldn't be problem. + # Think about better way.... +- dry "$XFS_REPAIR" -n -o force_geometry "$VOLUME" ++ dry "$XFS_REPAIR" -n -o force_geometry "$VOLUME" || error "Xfs repair failed." + fi ;; +- "ext2"|"ext3"|"ext4"|"reiserfs") ++ ext[234]|"reiserfs") + # check if executed from interactive shell environment + case "$-" in + *i*) FLAG=$YES ;; +@@ -757,8 +762,9 @@ check() { + accept_0_1 dry "$FSCK" $FORCE $FLAG "$VOLUME" || error "Fsck $FSTYPE failed." + ;; + "crypto_LUKS") +- which "$CRYPTSETUP" > /dev/null 2>&1 || error "$CRYPTSETUP utility required." +- check_luks ;; ++ which "$CRYPTSETUP" >"$NULL" 2>&1 || error "$CRYPTSETUP utility required." ++ check_luks || error "Crypto luks check failed." ++ ;; + *) + error "Filesystem \"$FSTYPE\" on device \"$VOLUME\" is not supported by this tool." ;; + esac +@@ -771,7 +777,7 @@ check() { + trap "cleanup 2" 2 + + # test if we are not invoked recursively +-test -n "$FSADM_RUNNING" && exit 0 ++test -n "${FSADM_RUNNING-}" && exit 0 + + # test some prerequisities + for i in "$TUNE_EXT" "$RESIZE_EXT" "$TUNE_REISER" "$RESIZE_REISER" \ +@@ -793,6 +799,9 @@ if [ "$#" -eq 0 ] ; then + tool_usage + fi + ++CHECK="" ++RESIZE="" ++ + while [ "$#" -ne 0 ] + do + case "$1" in +-- +1.8.3.1 + diff --git a/SOURCES/lvm2-2_02_188-fsadm-handle-fsck-return-1-for-corrected-fs.patch b/SOURCES/lvm2-2_02_188-fsadm-handle-fsck-return-1-for-corrected-fs.patch new file mode 100644 index 0000000..b8872cb --- /dev/null +++ b/SOURCES/lvm2-2_02_188-fsadm-handle-fsck-return-1-for-corrected-fs.patch @@ -0,0 +1,70 @@ +From 3a10489b8c2c7438d4725bfa272fa04927f91ebd Mon Sep 17 00:00:00 2001 +From: Zdenek Kabelac +Date: Sat, 24 Oct 2020 00:42:31 +0200 +Subject: [PATCH 1/2] fsadm: handle fsck return 1 for corrected fs + +(cherry picked from commit ab99382d7a614c299e765ea4d1f02fe7282502a1) +--- + scripts/fsadm.sh | 25 ++++++++++++++++++------- + 1 file changed, 18 insertions(+), 7 deletions(-) + +diff --git a/scripts/fsadm.sh b/scripts/fsadm.sh +index 28ca670..c4c7515 100755 +--- a/scripts/fsadm.sh ++++ b/scripts/fsadm.sh +@@ -1,6 +1,6 @@ + #!/bin/bash + # +-# Copyright (C) 2007-2017 Red Hat, Inc. All rights reserved. ++# Copyright (C) 2007-2020 Red Hat, Inc. All rights reserved. + # + # This file is part of LVM2. + # +@@ -130,7 +130,15 @@ dry() { + return 0 + fi + verbose "Executing" "$@" +- "$@" ++ $@ ++} ++ ++# Accept as succss also return code 1 with fsck ++accept_0_1() { ++ $@ ++ local ret="$?" ++ test "$ret" -eq 1 || return "$ret" ++ # Filesystem was corrected + } + + cleanup() { +@@ -455,9 +463,10 @@ resize_ext() { + if test -n "$MOUNTED" ; then + # Forced fsck -f for umounted extX filesystem. + case "$-" in +- *i*) dry "$FSCK" $YES -f "$VOLUME" ;; +- *) dry "$FSCK" -f -p "$VOLUME" ;; ++ *i*) FLAG=$YES ;; ++ *) FLAG="-p" ;; + esac ++ accept_0_1 dry "$FSCK" -f $FLAG "$VOLUME" || error "Failed to fsck $VOLUME" + fi + fi + +@@ -742,9 +751,11 @@ check() { + "ext2"|"ext3"|"ext4"|"reiserfs") + # check if executed from interactive shell environment + case "$-" in +- *i*) dry "$FSCK" $YES $FORCE "$VOLUME" ;; +- *) dry "$FSCK" $FORCE -p "$VOLUME" ;; +- esac ;; ++ *i*) FLAG=$YES ;; ++ *) FLAG="-p" ;; ++ esac ++ accept_0_1 dry "$FSCK" $FORCE $FLAG "$VOLUME" || error "Fsck $FSTYPE failed." ++ ;; + "crypto_LUKS") + which "$CRYPTSETUP" > /dev/null 2>&1 || error "$CRYPTSETUP utility required." + check_luks ;; +-- +1.8.3.1 + diff --git a/SOURCES/lvm2-2_02_188-lvconvert-fix-conversion-to-mirrored-mirror-log-with.patch b/SOURCES/lvm2-2_02_188-lvconvert-fix-conversion-to-mirrored-mirror-log-with.patch new file mode 100644 index 0000000..6f2a4e8 --- /dev/null +++ b/SOURCES/lvm2-2_02_188-lvconvert-fix-conversion-to-mirrored-mirror-log-with.patch @@ -0,0 +1,31 @@ + WHATS_NEW | 5 +++++ + lib/metadata/merge.c | 3 ++- + 2 files changed, 7 insertions(+), 1 deletion(-) + +diff --git a/WHATS_NEW b/WHATS_NEW +index 80d71ac..846510b 100644 +--- a/WHATS_NEW ++++ b/WHATS_NEW +@@ -1,3 +1,8 @@ ++Version 2.02.188 - ++================================== ++ Fix conversion to 'mirrored' mirror log with larger regionsize. ++ Fix support for lvconvert --repair used by foreign apps (i.e. Docker). ++ + Version 2.02.187 - 24th March 2020 + ================================== + Avoid running cache input arg validation when creating vdo pool. +diff --git a/lib/metadata/merge.c b/lib/metadata/merge.c +index a024877..054f185 100644 +--- a/lib/metadata/merge.c ++++ b/lib/metadata/merge.c +@@ -424,7 +424,8 @@ static void _check_lv_segment(struct logical_volume *lv, struct lv_segment *seg, + if (seg_is_mirror(seg)) { + if (!seg->region_size) + seg_error("region size is zero"); +- else if (seg->region_size > seg->lv->size) ++ /* Avoid regionsize check in case of 'mirrored' mirror log or larger than mlog regionsize will fail */ ++ else if (!strstr(seg->lv->name, "_mlog") && (seg->region_size > seg->lv->size)) + seg_error("region size is bigger then LV itself"); + else if (!is_power_of_2(seg->region_size)) + seg_error("region size is non power of 2"); diff --git a/SOURCES/lvm2-2_02_188-lvmcmdlib-lvm2_init_threaded.patch b/SOURCES/lvm2-2_02_188-lvmcmdlib-lvm2_init_threaded.patch new file mode 100644 index 0000000..e380949 --- /dev/null +++ b/SOURCES/lvm2-2_02_188-lvmcmdlib-lvm2_init_threaded.patch @@ -0,0 +1,142 @@ + daemons/dmeventd/plugins/lvm2/dmeventd_lvm.c | 2 +- + tools/lvm2cmd-static.c | 7 ++++++- + tools/lvm2cmd.c | 7 ++++++- + tools/lvm2cmd.h | 6 ++++++ + tools/lvm2cmdline.h | 4 ++-- + tools/lvmcmdlib.c | 4 ++-- + tools/lvmcmdline.c | 8 +++++--- + 7 files changed, 28 insertions(+), 10 deletions(-) + +diff --git a/daemons/dmeventd/plugins/lvm2/dmeventd_lvm.c b/daemons/dmeventd/plugins/lvm2/dmeventd_lvm.c +index be58aac..5c52867 100644 +--- a/daemons/dmeventd/plugins/lvm2/dmeventd_lvm.c ++++ b/daemons/dmeventd/plugins/lvm2/dmeventd_lvm.c +@@ -71,7 +71,7 @@ int dmeventd_lvm2_init(void) + if (!_lvm_handle) { + lvm2_log_fn(_lvm2_print_log); + +- if (!(_lvm_handle = lvm2_init())) ++ if (!(_lvm_handle = lvm2_init_threaded())) + goto out; + + /* +diff --git a/tools/lvm2cmd-static.c b/tools/lvm2cmd-static.c +index 4fb109c..31c7515 100644 +--- a/tools/lvm2cmd-static.c ++++ b/tools/lvm2cmd-static.c +@@ -17,5 +17,10 @@ + + void *lvm2_init(void) + { +- return cmdlib_lvm2_init(1); ++ return cmdlib_lvm2_init(1, 0); ++} ++ ++void *lvm2_init_threaded(void) ++{ ++ return cmdlib_lvm2_init(1, 1); + } +diff --git a/tools/lvm2cmd.c b/tools/lvm2cmd.c +index 235540c..aca3e65 100644 +--- a/tools/lvm2cmd.c ++++ b/tools/lvm2cmd.c +@@ -17,7 +17,12 @@ + + void *lvm2_init(void) + { +- return cmdlib_lvm2_init(0); ++ return cmdlib_lvm2_init(0, 0); ++} ++ ++void *lvm2_init_threaded(void) ++{ ++ return cmdlib_lvm2_init(0, 1); + } + + int lvm_shell(struct cmd_context *cmd __attribute__((unused)), +diff --git a/tools/lvm2cmd.h b/tools/lvm2cmd.h +index cd2e0ec..39a8d60 100644 +--- a/tools/lvm2cmd.h ++++ b/tools/lvm2cmd.h +@@ -59,6 +59,12 @@ void lvm2_log_fn(lvm2_log_fn_t log_fn); + void *lvm2_init(void); + + /* ++ * Initialise library for threaded user ++ * Returns a handle so repeated use of lvm2_run is more efficient. ++ */ ++void *lvm2_init_threaded(void); ++ ++/* + * Disable any dmeventd calls that the library may otherwise do. Useful to avoid + * recursive calls from dmeventd to itself. + */ +diff --git a/tools/lvm2cmdline.h b/tools/lvm2cmdline.h +index 0073f90..84cab93 100644 +--- a/tools/lvm2cmdline.h ++++ b/tools/lvm2cmdline.h +@@ -28,10 +28,10 @@ struct cmdline_context { + + int lvm2_main(int argc, char **argv); + +-void *cmdlib_lvm2_init(unsigned static_compile); ++void *cmdlib_lvm2_init(unsigned static_compile, unsigned threaded); + void lvm_fin(struct cmd_context *cmd); + +-struct cmd_context *init_lvm(unsigned set_connections, unsigned set_filters); ++struct cmd_context *init_lvm(unsigned set_connections, unsigned set_filters, unsigned threaded); + int lvm_register_commands(struct cmd_context *cmdtool, const char *name); + int lvm_split(char *str, int *argc, char **argv, int max); + int lvm_run_command(struct cmd_context *cmd, int argc, char **argv); +diff --git a/tools/lvmcmdlib.c b/tools/lvmcmdlib.c +index 5944576..a2754ea 100644 +--- a/tools/lvmcmdlib.c ++++ b/tools/lvmcmdlib.c +@@ -26,12 +26,12 @@ + #include + #include + +-void *cmdlib_lvm2_init(unsigned static_compile) ++void *cmdlib_lvm2_init(unsigned static_compile, unsigned threaded) + { + struct cmd_context *cmd; + + init_is_static(static_compile); +- if (!(cmd = init_lvm(1, 1))) ++ if (!(cmd = init_lvm(1, 1, threaded))) + return NULL; + + if (!lvm_register_commands(cmd, NULL)) +diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c +index 75a0401..f6814ad 100644 +--- a/tools/lvmcmdline.c ++++ b/tools/lvmcmdline.c +@@ -3311,7 +3311,9 @@ static int _close_stray_fds(const char *command, struct custom_fds *custom_fds) + return 1; + } + +-struct cmd_context *init_lvm(unsigned set_connections, unsigned set_filters) ++struct cmd_context *init_lvm(unsigned set_connections, ++ unsigned set_filters, ++ unsigned threaded) + { + struct cmd_context *cmd; + +@@ -3325,7 +3327,7 @@ struct cmd_context *init_lvm(unsigned set_connections, unsigned set_filters) + */ + dm_set_name_mangling_mode(DM_STRING_MANGLING_NONE); + +- if (!(cmd = create_toolcontext(0, NULL, 1, 0, ++ if (!(cmd = create_toolcontext(0, NULL, 1, threaded, + set_connections, set_filters))) { + udev_fin_library_context(); + return_NULL; +@@ -3514,7 +3516,7 @@ int lvm2_main(int argc, char **argv) + if (!alias && (argc > 2) && !strcmp(argv[2], "-?")) + argv[2] = (char *)"-h"; + +- if (!(cmd = init_lvm(0, 0))) ++ if (!(cmd = init_lvm(0, 0, 0))) + return EINIT_FAILED; + + /* Store original argv location so we may customise it if we become a daemon */ diff --git a/SPECS/lvm2.spec b/SPECS/lvm2.spec index 51b71cb..3ffcfa3 100644 --- a/SPECS/lvm2.spec +++ b/SPECS/lvm2.spec @@ -33,6 +33,7 @@ %global boom_dir boom-%{boom_version} #%%global scratch .bz1628529_4 +%global scratch .3 %if 0%{?rhel} %ifnarch i686 x86_64 ppc64le s390x @@ -90,6 +91,18 @@ Patch9: lvm2-2_02_188-blkdeactivate-add-support-for-VDO-in-blkdeactivate-script. Patch10: lvm2-make-generate-2.patch # BZ 1842600: Patch11: lvm2-2_02_188-scanning-optimize-by-checking-text-offset-and-checks.patch +# BZ 1821970: +Patch12: lvm2-2_02_188-blkdeactivate-add-missing-VDO_AVAILABLE-check-in-dea.patch +# BZ 1712983: +Patch13: lvm2-2_02_188-lvconvert-fix-conversion-to-mirrored-mirror-log-with.patch +# BZ 1881235: +Patch14: lvm2-2_02_188-lvmcmdlib-lvm2_init_threaded.patch +# BZ 1872072: +Patch15: lvm2-2_02_188-config-drop-reading-file-with-mmap.patch +Patch16: lvm2-2_02_188-filters-persistent-filter-hides-rename-failure.patch +# BZ 1663473: +Patch17: lvm2-2_02_188-fsadm-handle-fsck-return-1-for-corrected-fs.patch +Patch18: lvm2-2_02_188-fsadm-enhance-error-handling.patch # BZ 1777364: Patch50: boom-etc-Remove-executable-permission-from-etc-default-bo.patch Patch51: boom-man-Fix-line-starting-with.patch @@ -159,6 +172,13 @@ or more physical volumes and creating one or more logical volumes %patch9 -p1 -b .add_support_for_VDO_in_blkdeactivate_script %patch10 -p1 -b .generate2 %patch11 -p1 -b .scanning_optimize_by_checking_text_offset_and_checks +%patch12 -p1 -b .blkdeactivate_add_missing_VDO_AVAILABLE_check +%patch13 -p1 -b .fix_conversion_to_mirrored_mirror_log +%patch14 -p1 -b .lvmcmdlib_lvm2_init_threaded +%patch15 -p1 -b .config_drop_reading_file_with_mmap +%patch16 -p1 -b .persistent_filter_hides_rename_failure +%patch17 -p1 -b .fsadm_handle_fsck_return_1_for_corrected_fs +%patch18 -p1 -b .fsadm_enhance_error_handling %build %global _default_pid_dir /run @@ -960,6 +980,16 @@ This package provides the python2 version of boom. %endif %changelog +* Thu Nov 26 2020 Marian Csontos - 7:2.02.187-6.el7_9.3 +- Fix lvresize handling of fsck exit code 1 - FS errors corrected. + +* Mon Oct 26 2020 Marian Csontos - 7:2.02.187-6.el7_9.2 +- Fix dmeventd crash with modified reserved_stack configuration option. +- Fix lvm crashing when .cache file is changed by external tools. + +* Mon Oct 19 2020 Marian Csontos - 7:2.02.187-6.el7_9.1 +- Fix conversion to mirrored mirror log with larger regionsize. + * Mon Jun 07 2020 Marian Csontos - 7:2.02.187-6 - Fix pvs/lvs/vgs failing due empty VG spotted in metadata when under load.