diff --git a/0004-bugfix-lvm2-add-SSD.patch b/0003-bugfix-lvm2-add-SSD.patch similarity index 100% rename from 0004-bugfix-lvm2-add-SSD.patch rename to 0003-bugfix-lvm2-add-SSD.patch diff --git a/0003-devs-check-for-no-dev-when-dropping-aliases.patch b/0003-devs-check-for-no-dev-when-dropping-aliases.patch deleted file mode 100644 index fe703bafa305905adf55f994d4330bd7ad56c955..0000000000000000000000000000000000000000 --- a/0003-devs-check-for-no-dev-when-dropping-aliases.patch +++ /dev/null @@ -1,31 +0,0 @@ -From f50af80199f723f7b1970ee33ddf959ea79fcbef Mon Sep 17 00:00:00 2001 -From: David Teigland -Date: Wed, 16 Oct 2019 13:32:28 -0500 -Subject: [PATCH 134/180] devs: check for no dev when dropping aliases - -When scanning fails to find a device path and -looks for device aliases, check if the device -itself still exists to avoid a potential segfault. ---- - lib/label/label.c | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/lib/label/label.c b/lib/label/label.c -index 8107e33..e4a1068 100644 ---- a/lib/label/label.c -+++ b/lib/label/label.c -@@ -734,6 +734,11 @@ static int _scan_list(struct cmd_context *cmd, struct dev_filter *f, - retried_open = 1; - - dm_list_iterate_items_safe(devl, devl2, &reopen_devs) { -+ if (!devl->dev) { -+ dm_list_del(&devl->list); -+ continue; -+ } -+ - _drop_bad_aliases(devl->dev); - - if (dm_list_empty(&devl->dev->aliases)) { --- -1.8.3.1 - diff --git a/0005-bugfix-add-timeout-when-fail-to-wait-udev.patch b/0004-bugfix-add-timeout-when-fail-to-wait-udev.patch similarity index 100% rename from 0005-bugfix-add-timeout-when-fail-to-wait-udev.patch rename to 0004-bugfix-add-timeout-when-fail-to-wait-udev.patch diff --git a/0006-bugfix-fix-the-code-maybe-lead-to-buffer-over-bound-access.patch b/0005-bugfix-fix-the-code-maybe-lead-to-buffer-over-bound-access.patch similarity index 100% rename from 0006-bugfix-fix-the-code-maybe-lead-to-buffer-over-bound-access.patch rename to 0005-bugfix-fix-the-code-maybe-lead-to-buffer-over-bound-access.patch diff --git a/0007-enhancement-modify-default-log-level-to-error-level.patch b/0006-enhancement-modify-default-log-level-to-error-level.patch similarity index 100% rename from 0007-enhancement-modify-default-log-level-to-error-level.patch rename to 0006-enhancement-modify-default-log-level-to-error-level.patch diff --git a/0008-enhancement-add-dfx-log.patch b/0007-enhancement-add-dfx-log.patch similarity index 93% rename from 0008-enhancement-add-dfx-log.patch rename to 0007-enhancement-add-dfx-log.patch index 9a51bea588f3ceded12400166adf881fb2ce7405..95a75358182274626803a684445099b08e133d71 100644 --- a/0008-enhancement-add-dfx-log.patch +++ b/0007-enhancement-add-dfx-log.patch @@ -1,4 +1,4 @@ -From c27b54c522543bc44030a0c1ecd414dc2523d331 Mon Sep 17 00:00:00 2001 +From 8ad1c3ae7c08a4edbe597e058e07f09d86a03df3 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 19 Mar 2019 16:43:16 +0800 Subject: [PATCH] add dfx log when error occur, or lvm resource change, it will @@ -18,7 +18,7 @@ Signed-off-by: wangjufeng 9 files changed, 66 insertions(+), 3 deletions(-) diff --git a/conf/example.conf.in b/conf/example.conf.in -index a60b595..09200ab 100644 +index 09aa8b5..7fa6731 100644 --- a/conf/example.conf.in +++ b/conf/example.conf.in @@ -862,6 +862,11 @@ log { @@ -34,7 +34,7 @@ index a60b595..09200ab 100644 # Indent messages according to their severity. # This configuration option has an automatic default value. diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c -index 105aecd..2a9618a 100644 +index 4cb81bf..69a2e20 100644 --- a/lib/commands/toolcontext.c +++ b/lib/commands/toolcontext.c @@ -51,6 +51,8 @@ @@ -56,15 +56,15 @@ index 105aecd..2a9618a 100644 /* Verbose level for tty output */ cmd->default_settings.verbose = find_config_tree_int(cmd, log_verbose_CFG, NULL); init_verbose(cmd->default_settings.verbose + VERBOSE_BASE_LEVEL); -@@ -2045,6 +2050,7 @@ void destroy_toolcontext(struct cmd_context *cmd) +@@ -2034,6 +2039,7 @@ void destroy_toolcontext(struct cmd_context *cmd) _destroy_segtypes(&cmd->segtypes); _destroy_formats(cmd, &cmd->formats); _destroy_filters(cmd); -+ set_global_cmdline(NULL); - if (cmd->mem) - dm_pool_destroy(cmd->mem); ++ set_global_cmdline(NULL); devices_file_exit(cmd); -@@ -2098,3 +2104,13 @@ void destroy_toolcontext(struct cmd_context *cmd) + dev_cache_exit(); + _destroy_dev_types(cmd); +@@ -2080,3 +2086,13 @@ void destroy_toolcontext(struct cmd_context *cmd) fin_syslog(); reset_lvm_errno(0); } @@ -79,7 +79,7 @@ index 105aecd..2a9618a 100644 + global_cmdline = cmdline; +} diff --git a/lib/commands/toolcontext.h b/lib/commands/toolcontext.h -index 701b7a7..957ab7f 100644 +index f16322d..bc935b1 100644 --- a/lib/commands/toolcontext.h +++ b/lib/commands/toolcontext.h @@ -50,6 +50,7 @@ struct config_info { @@ -90,7 +90,7 @@ index 701b7a7..957ab7f 100644 }; struct dm_config_tree; -@@ -299,4 +300,7 @@ struct format_type *get_format_by_name(struct cmd_context *cmd, const char *form +@@ -303,4 +304,7 @@ struct format_type *get_format_by_name(struct cmd_context *cmd, const char *form const char *system_id_from_string(struct cmd_context *cmd, const char *str); @@ -99,7 +99,7 @@ index 701b7a7..957ab7f 100644 +void set_global_cmdline(char *cmdline); #endif diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h -index ab7d0d5..a83c034 100644 +index ea12957..33ceb1a 100644 --- a/lib/config/config_settings.h +++ b/lib/config/config_settings.h @@ -887,6 +887,11 @@ cfg(log_level_CFG, "level", log_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_INT @@ -115,7 +115,7 @@ index ab7d0d5..a83c034 100644 "Indent messages according to their severity.\n") diff --git a/lib/log/log.c b/lib/log/log.c -index 7b4d537..e8a16e0 100644 +index 5771a1d..f185109 100644 --- a/lib/log/log.c +++ b/lib/log/log.c @@ -19,6 +19,7 @@ @@ -237,10 +237,10 @@ index a54001c..8ae55f6 100644 +int get_log_unless_silent(void); #endif diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c -index 1e12bed..ee9288b 100644 +index 1e3547e..9d47399 100644 --- a/tools/lvmcmdline.c +++ b/tools/lvmcmdline.c -@@ -3116,6 +3116,7 @@ int lvm_run_command(struct cmd_context *cmd, int argc, char **argv) +@@ -3119,6 +3119,7 @@ int lvm_run_command(struct cmd_context *cmd, int argc, char **argv) /* The cmd_line string is only used for logging, not processing. */ if (!(cmd->cmd_line = _copy_command_line(cmd, argc, argv))) return_ECMD_FAILED; @@ -249,5 +249,5 @@ index 1e12bed..ee9288b 100644 /* Look up command - will be NULL if not recognised */ if (!(cmd->cname = find_command_name(cmd->name))) -- -1.8.3.1 +2.27.0 diff --git a/0009-enhancement-syslog-more-when-use-libdevmapper-so.patch b/0008-enhancement-syslog-more-when-use-libdevmapper-so.patch similarity index 100% rename from 0009-enhancement-syslog-more-when-use-libdevmapper-so.patch rename to 0008-enhancement-syslog-more-when-use-libdevmapper-so.patch diff --git a/0010-enhancement-log-it-when-disk-slow.patch b/0009-enhancement-log-it-when-disk-slow.patch similarity index 100% rename from 0010-enhancement-log-it-when-disk-slow.patch rename to 0009-enhancement-log-it-when-disk-slow.patch diff --git a/0011-bugfix-lvm2-fix-the-reuse-of-va_list.patch b/0010-bugfix-lvm2-fix-the-reuse-of-va_list.patch similarity index 100% rename from 0011-bugfix-lvm2-fix-the-reuse-of-va_list.patch rename to 0010-bugfix-lvm2-fix-the-reuse-of-va_list.patch diff --git a/0012-13-dm-disk.rules-check-DM_NAME-before-create-symlink.patch b/0011-13-dm-disk.rules-check-DM_NAME-before-create-symlink.patch similarity index 84% rename from 0012-13-dm-disk.rules-check-DM_NAME-before-create-symlink.patch rename to 0011-13-dm-disk.rules-check-DM_NAME-before-create-symlink.patch index 2fb79ac80443ad702ad501d1ae24f22236a3c1db..a3d3cf371ce5c5d0651e1b60aca6949256af5e7f 100644 --- a/0012-13-dm-disk.rules-check-DM_NAME-before-create-symlink.patch +++ b/0011-13-dm-disk.rules-check-DM_NAME-before-create-symlink.patch @@ -1,4 +1,4 @@ -From cec542e471201e5cd82667a3ec39dc75441d65eb Mon Sep 17 00:00:00 2001 +From 871b58be305b5f6176925fe862fdecd13861e495 Mon Sep 17 00:00:00 2001 From: Zhiqiang Liu Date: Sun, 30 Jan 2022 11:14:01 +0800 Subject: [PATCH] 13-dm-disk.rules: check DM_NAME before create symlink @@ -14,7 +14,7 @@ Signed-off-by: Zhiqiang Liu 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/udev/13-dm-disk.rules.in b/udev/13-dm-disk.rules.in -index 5355810..fcb2f37 100644 +index 5cc0812..18254b4 100644 --- a/udev/13-dm-disk.rules.in +++ b/udev/13-dm-disk.rules.in @@ -14,7 +14,7 @@ ACTION!="add|change", GOTO="dm_end" @@ -25,7 +25,7 @@ index 5355810..fcb2f37 100644 +ENV{DM_NAME}=="?*", SYMLINK+="disk/by-id/dm-name-$env{DM_NAME}" ENV{DM_UUID}=="?*", SYMLINK+="disk/by-id/dm-uuid-$env{DM_UUID}" - ENV{DM_SUSPENDED}=="1", GOTO="dm_end" + ENV{DM_SUSPENDED}=="1", ENV{DM_UDEV_PRIMARY_SOURCE_FLAG}=="1", GOTO="dm_link" -- -1.8.3.1 +2.27.0 diff --git a/0014-lvm-code-reduce-cyclomatic-complexity.patch b/0012-lvm-code-reduce-cyclomatic-complexity.patch similarity index 100% rename from 0014-lvm-code-reduce-cyclomatic-complexity.patch rename to 0012-lvm-code-reduce-cyclomatic-complexity.patch diff --git a/0015-_vg_read_raw_area-fix-segfault-caused-by-using-null-.patch b/0013-_vg_read_raw_area-fix-segfault-caused-by-using-null-.patch similarity index 100% rename from 0015-_vg_read_raw_area-fix-segfault-caused-by-using-null-.patch rename to 0013-_vg_read_raw_area-fix-segfault-caused-by-using-null-.patch diff --git a/0013-dev_name-determine-whether-the-dev-aliases-linked-li.patch b/0013-dev_name-determine-whether-the-dev-aliases-linked-li.patch deleted file mode 100644 index cc17babbdd40e39714d83c629752ba98468cc174..0000000000000000000000000000000000000000 --- a/0013-dev_name-determine-whether-the-dev-aliases-linked-li.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 472dd53a091e0e4b0d2db8fcd10da3f408873633 Mon Sep 17 00:00:00 2001 -From: Zhiqiang Liu -Date: Sun, 30 Jan 2022 11:37:51 +0800 -Subject: [PATCH] dev_name() determine whether the dev->aliases linked list is - empty before obtaining the dev name - -If dev->aliases linked list is empty, then directly obtain the str -address of dm_str_list saved in dev_aliases.n, an unknown address -will be returned, which may cause segfault. - -So we need to judge whether the dev->aliases linked list is empty before -getting it to avoid returning unknown address. - -Signed-off-by: Zhiqiang Liu ---- - lib/device/dev-cache.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/lib/device/dev-cache.c b/lib/device/dev-cache.c -index 33b75a9..1263820 100644 ---- a/lib/device/dev-cache.c -+++ b/lib/device/dev-cache.c -@@ -1703,8 +1703,8 @@ int dev_fd(struct device *dev) - - const char *dev_name(const struct device *dev) - { -- return (dev && dev->aliases.n) ? dm_list_item(dev->aliases.n, struct dm_str_list)->str : -- unknown_device_name(); -+ return (dev && dev->aliases.n && !dm_list_empty(&dev->aliases)) ?\ -+ dm_list_item(dev->aliases.n, struct dm_str_list)->str : unknown_device_name(); - } - - bool dev_cache_has_md_with_end_superblock(struct dev_types *dt) --- -1.8.3.1 - diff --git a/0016-Move-nolocking-warning-to-man-page.patch b/0016-Move-nolocking-warning-to-man-page.patch deleted file mode 100644 index 08d24cfde76339c4f145db3f1075723beb7fd82a..0000000000000000000000000000000000000000 --- a/0016-Move-nolocking-warning-to-man-page.patch +++ /dev/null @@ -1,49 +0,0 @@ -From f1578b4a5d0bf49ab2b07c86c982cfa5aaa60a84 Mon Sep 17 00:00:00 2001 -From: David Teigland -Date: Fri, 25 Mar 2022 15:43:53 -0500 -Subject: [PATCH] Move nolocking warning to man page - -Conflict:NA -Reference:https://sourceware.org/git/?p=lvm2.git;a=commit;h=f1578b4a5d0bf49ab2b07c86c982cfa5aaa60a84 - -It's more logical to warn about --nolocking in the man page -before it's used rather than after it's used and too late. -Also, warnings are usually for things the user may not know. ---- - tools/args.h | 3 ++- - tools/lvmcmdline.c | 5 +---- - 2 files changed, 3 insertions(+), 5 deletions(-) - -diff --git a/tools/args.h b/tools/args.h -index 56669645d..ecb650234 100644 ---- a/tools/args.h -+++ b/tools/args.h -@@ -499,7 +499,8 @@ arg(nohistory_ARG, '\0', "nohistory", 0, 0, 0, - "metadata/record_lvs_history is enabled.\n") - - arg(nolocking_ARG, '\0', "nolocking", 0, 0, 0, -- "Disable locking.\n") -+ "Disable locking. Use with caution, concurrent commands may produce\n") -+ "incorrect results.\n") - - arg(norestorefile_ARG, '\0', "norestorefile", 0, 0, 0, - "In conjunction with --uuid, this allows a uuid to be specified\n" -diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c -index 241c6df18..1e3547ed7 100644 ---- a/tools/lvmcmdline.c -+++ b/tools/lvmcmdline.c -@@ -3267,10 +3267,7 @@ int lvm_run_command(struct cmd_context *cmd, int argc, char **argv) - if (arg_is_set(cmd, readonly_ARG)) - readonly = 1; - -- if (cmd->nolocking) { -- if (!_cmd_no_meta_proc(cmd)) -- log_warn("WARNING: File locking is disabled."); -- } else { -+ if (!cmd->nolocking) { - if (!init_locking(cmd, sysinit, readonly, cmd->ignorelockingfailure)) { - ret = ECMD_FAILED; - goto_out; --- -2.27.0 - diff --git a/0017-fix-args-entry-for-nolocking.patch b/0017-fix-args-entry-for-nolocking.patch deleted file mode 100644 index 6468261057303b0d0df5638f18e0dab7468d134b..0000000000000000000000000000000000000000 --- a/0017-fix-args-entry-for-nolocking.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 86a0a652a9eedd932c7428ed82656f3fd40d13f8 Mon Sep 17 00:00:00 2001 -From: David Teigland -Date: Fri, 25 Mar 2022 17:25:29 -0500 -Subject: [PATCH] fix args entry for nolocking - -Conflict:NA -Reference:https://sourceware.org/git/?p=lvm2.git;a=commit;h=86a0a652a9eedd932c7428ed82656f3fd40d13f8 - -typo in previous commit ---- - tools/args.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tools/args.h b/tools/args.h -index ecb650234..03fe24556 100644 ---- a/tools/args.h -+++ b/tools/args.h -@@ -499,7 +499,7 @@ arg(nohistory_ARG, '\0', "nohistory", 0, 0, 0, - "metadata/record_lvs_history is enabled.\n") - - arg(nolocking_ARG, '\0', "nolocking", 0, 0, 0, -- "Disable locking. Use with caution, concurrent commands may produce\n") -+ "Disable locking. Use with caution, concurrent commands may produce\n" - "incorrect results.\n") - - arg(norestorefile_ARG, '\0', "norestorefile", 0, 0, 0, --- -2.27.0 - diff --git a/LVM2.2.03.14.tgz b/LVM2.2.03.14.tgz deleted file mode 100644 index 0c93d9104e0b81255c51433d10210aaf51891550..0000000000000000000000000000000000000000 Binary files a/LVM2.2.03.14.tgz and /dev/null differ diff --git a/LVM2.2.03.16.tgz b/LVM2.2.03.16.tgz new file mode 100644 index 0000000000000000000000000000000000000000..0bc9a9e655dcb222dc212fa22a2c40fe0f3a3c1d Binary files /dev/null and b/LVM2.2.03.16.tgz differ diff --git a/lvm2.spec b/lvm2.spec index 188f443f6f31c8f09ef4044238103312c8441829..5b60a732aee10c99fc9aec9318ee9e46da0b6b5a 100644 --- a/lvm2.spec +++ b/lvm2.spec @@ -32,7 +32,7 @@ %global libselinux_version 1.30.19-4 %global persistent_data_version 0.7.0-0.1.rc6 %global sanlock_version 3.3.0-2 -%global device_mapper_version 1.02.181 +%global device_mapper_version 1.02.182 %global systemd_version 189-3 %global dracut_version 002-18 %global util_linux_version 2.24 @@ -42,30 +42,26 @@ %global dlm_version 4.0.6-2 Name: lvm2 -Version: 2.03.14 -Release: 7 +Version: 2.03.16 +Release: 1 Epoch: 8 Summary: Tools for logical volume management License: GPLv2+ and LGPLv2.1 and BSD URL: http://sourceware.org/lvm2 -Source0: https://sourceware.org/pub/lvm2/releases/LVM2.2.03.14.tgz +Source0: https://sourceware.org/pub/lvm2/releases/LVM2.2.03.16.tgz Patch1: 0001-lvm2-set-default-preferred_names.patch Patch2: 0002-lvm2-default-allow-changes-with-duplicate-pvs.patch -Patch3: 0003-devs-check-for-no-dev-when-dropping-aliases.patch -Patch4: 0004-bugfix-lvm2-add-SSD.patch -Patch5: 0005-bugfix-add-timeout-when-fail-to-wait-udev.patch -Patch6: 0006-bugfix-fix-the-code-maybe-lead-to-buffer-over-bound-access.patch -Patch7: 0007-enhancement-modify-default-log-level-to-error-level.patch -Patch8: 0008-enhancement-add-dfx-log.patch -Patch9: 0009-enhancement-syslog-more-when-use-libdevmapper-so.patch -Patch10: 0010-enhancement-log-it-when-disk-slow.patch -Patch11: 0011-bugfix-lvm2-fix-the-reuse-of-va_list.patch -Patch12: 0012-13-dm-disk.rules-check-DM_NAME-before-create-symlink.patch -Patch13: 0013-dev_name-determine-whether-the-dev-aliases-linked-li.patch -Patch14: 0014-lvm-code-reduce-cyclomatic-complexity.patch -Patch15: 0015-_vg_read_raw_area-fix-segfault-caused-by-using-null-.patch -Patch16: 0016-Move-nolocking-warning-to-man-page.patch -Patch17: 0017-fix-args-entry-for-nolocking.patch +Patch3: 0003-bugfix-lvm2-add-SSD.patch +Patch4: 0004-bugfix-add-timeout-when-fail-to-wait-udev.patch +Patch5: 0005-bugfix-fix-the-code-maybe-lead-to-buffer-over-bound-access.patch +Patch6: 0006-enhancement-modify-default-log-level-to-error-level.patch +Patch7: 0007-enhancement-add-dfx-log.patch +Patch8: 0008-enhancement-syslog-more-when-use-libdevmapper-so.patch +Patch9: 0009-enhancement-log-it-when-disk-slow.patch +Patch10: 0010-bugfix-lvm2-fix-the-reuse-of-va_list.patch +Patch11: 0011-13-dm-disk.rules-check-DM_NAME-before-create-symlink.patch +Patch12: 0012-lvm-code-reduce-cyclomatic-complexity.patch +Patch13: 0013-_vg_read_raw_area-fix-segfault-caused-by-using-null-.patch BuildRequires: gcc BuildRequires: gcc-c++ @@ -405,7 +401,6 @@ fi %{_tmpfilesdir}/%{name}.conf %{_unitdir}/blk-availability.service %{_unitdir}/lvm2-monitor.service -%attr(555, -, -) %{_prefix}/lib/systemd/system-generators/lvm2-activation-generator %{_unitdir}/lvm2-lvmpolld.socket %{_unitdir}/lvm2-lvmpolld.service @@ -492,6 +487,9 @@ fi %changelog +* Sat Oct 15 2022 wuguanghao - 8:2.03.16-1 +- upgrade version to 2.03.16 + * Tue Oct 11 2022 miaoguanqin - 8:2.03.14-7 - lvm: remove no locking warning