diff --git a/0001-lvm2-set-default-preferred_names.patch b/0001-lvm2-set-default-preferred_names.patch index 811c42ca46bf0bcd555d34cd9cbf693b38f335bc..122dcb554b2b4ffe4236694135f19787a265e474 100644 --- a/0001-lvm2-set-default-preferred_names.patch +++ b/0001-lvm2-set-default-preferred_names.patch @@ -1,21 +1,21 @@ diff --git a/conf/example.conf.in b/conf/example.conf.in -index 05b0857..7f0a687 100644 +index a78ed73..245973a 100644 --- a/conf/example.conf.in +++ b/conf/example.conf.in -@@ -122,7 +122,7 @@ devices { +@@ -117,7 +117,7 @@ devices { # Example # preferred_names = [ "^/dev/mpath/", "^/dev/mapper/mpath", "^/dev/[hs]d" ] - # + # - # This configuration option does not have a default value defined. + preferred_names = [ "^/dev/mpath/", "^/dev/mapper/mpath", "^/dev/[hs]d" ] - # Configuration option devices/filter. - # Limit the block devices that are used by LVM commands. + # Configuration option devices/use_devicesfile. + # Enable or disable the use of a devices file. diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h -index 2bb72ba..f280156 100644 +index d280e7a..ab7d0d5 100644 --- a/lib/config/config_settings.h +++ b/lib/config/config_settings.h -@@ -269,7 +269,7 @@ cfg(devices_hints_CFG, "hints", devices_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_ +@@ -257,7 +257,7 @@ cfg(devices_hints_CFG, "hints", devices_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_ " Use no hints.\n" "#\n") @@ -24,3 +24,6 @@ index 2bb72ba..f280156 100644 "Select which path name to display for a block device.\n" "If multiple path names exist for a block device, and LVM needs to\n" "display a name for the device, the path names are matched against\n" +-- +1.8.3.1 + diff --git a/0002-lvm2-default-allow-changes-with-duplicate-pvs.patch b/0002-lvm2-default-allow-changes-with-duplicate-pvs.patch index fa3cf0f5fa418093ea90a6b25a3a3f4587a97c82..3313529525cf6e759b87ed90a64ddc4770318397 100644 --- a/0002-lvm2-default-allow-changes-with-duplicate-pvs.patch +++ b/0002-lvm2-default-allow-changes-with-duplicate-pvs.patch @@ -1,18 +1,19 @@ diff --git a/conf/example.conf.in b/conf/example.conf.in -index 7f0a687..39b5507 100644 +index 245973a..3d08b30 100644 --- a/conf/example.conf.in +++ b/conf/example.conf.in -@@ -346,7 +346,7 @@ devices { +@@ -393,8 +393,7 @@ devices { # or activating LVs in it while a PV appears on multiple devices. # Enabling this setting allows the VG to be used as usual even with # uncertain devices. -- allow_changes_with_duplicate_pvs = 0 +- # This configuration option has an automatic default value. +- # allow_changes_with_duplicate_pvs = 0 + allow_changes_with_duplicate_pvs = 1 # Configuration option devices/allow_mixed_block_sizes. # Allow PVs in the same VG with different logical block sizes. diff --git a/lib/config/defaults.h b/lib/config/defaults.h -index be4f5ff..3f0539e 100644 +index 1b1568a..4d6d40f 100644 --- a/lib/config/defaults.h +++ b/lib/config/defaults.h @@ -56,7 +56,7 @@ @@ -24,3 +25,6 @@ index be4f5ff..3f0539e 100644 #define DEFAULT_LOCKING_LIB "liblvm2clusterlock.so" #define DEFAULT_ERROR_WHEN_FULL 0 +-- +1.8.3.1 + diff --git a/0003-cov-check-result-of-dev_read_bytes.patch b/0003-cov-check-result-of-dev_read_bytes.patch deleted file mode 100644 index 5142119a8762a0bc6c07f75a2eaa6185ff10a291..0000000000000000000000000000000000000000 --- a/0003-cov-check-result-of-dev_read_bytes.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 10d448be7aa5dcdafcd4dabc782ce7308af89c30 Mon Sep 17 00:00:00 2001 -From: Zdenek Kabelac -Date: Tue, 25 Jun 2019 14:50:05 +0200 -Subject: [PATCH] cov: check result of dev_read_bytes - ---- - lib/format_text/format-text.c | 10 +++++++--- - 1 file changed, 7 insertions(+), 3 deletions(-) - -diff --git a/lib/format_text/format-text.c b/lib/format_text/format-text.c -index 268bd64..7385da5 100644 ---- a/lib/format_text/format-text.c -+++ b/lib/format_text/format-text.c -@@ -1545,9 +1545,13 @@ int read_metadata_location_summary(const struct format_type *fmt, - - memset(namebuf, 0, sizeof(namebuf)); - -- if (!dev_read_bytes(dev_area->dev, dev_area->start + rlocn->offset, NAME_LEN, namebuf)) -- stack; -- -+ if (!dev_read_bytes(dev_area->dev, dev_area->start + rlocn->offset, NAME_LEN, namebuf)) { -+ log_error("Can't read metadata location on %s at %llu.", -+ dev_name(dev_area->dev), -+ (unsigned long long)(dev_area->start + rlocn->offset)); -+ return 0; -+ } -+ - while (namebuf[len] && !isspace(namebuf[len]) && namebuf[len] != '{' && - len < (NAME_LEN - 1)) - len++; --- -1.8.3.1 - diff --git a/0004-devs-check-for-no-dev-when-dropping-aliases.patch b/0003-devs-check-for-no-dev-when-dropping-aliases.patch similarity index 100% rename from 0004-devs-check-for-no-dev-when-dropping-aliases.patch rename to 0003-devs-check-for-no-dev-when-dropping-aliases.patch diff --git a/0005-bugfix-lvm2-add-SSD.patch b/0004-bugfix-lvm2-add-SSD.patch similarity index 100% rename from 0005-bugfix-lvm2-add-SSD.patch rename to 0004-bugfix-lvm2-add-SSD.patch diff --git a/0006-bugfix-add-timeout-when-fail-to-wait-udev.patch b/0005-bugfix-add-timeout-when-fail-to-wait-udev.patch similarity index 100% rename from 0006-bugfix-add-timeout-when-fail-to-wait-udev.patch rename to 0005-bugfix-add-timeout-when-fail-to-wait-udev.patch diff --git a/0007-bugfix-fix-the-code-maybe-lead-to-buffer-over-bound-access.patch b/0006-bugfix-fix-the-code-maybe-lead-to-buffer-over-bound-access.patch similarity index 100% rename from 0007-bugfix-fix-the-code-maybe-lead-to-buffer-over-bound-access.patch rename to 0006-bugfix-fix-the-code-maybe-lead-to-buffer-over-bound-access.patch diff --git a/0008-enhancement-modify-default-log-level-to-error-level.patch b/0007-enhancement-modify-default-log-level-to-error-level.patch similarity index 66% rename from 0008-enhancement-modify-default-log-level-to-error-level.patch rename to 0007-enhancement-modify-default-log-level-to-error-level.patch index 033d08d8d319d574f176f07f8090a45e703e9cc4..1b0a40c6a8d357c9599178b82ab1a35b4c168059 100644 --- a/0008-enhancement-modify-default-log-level-to-error-level.patch +++ b/0007-enhancement-modify-default-log-level-to-error-level.patch @@ -1,7 +1,7 @@ -From 2a0100ad8fd91ff367948fb79d7a2430380e1cb8 Mon Sep 17 00:00:00 2001 +From 28d86e18c53d93cf2958eb8de0c8452070405eb7 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 19 Mar 2019 15:44:17 +0800 -Subject: [PATCH 1/2] modify default log level to error level +Subject: [PATCH] modify default log level to error level Signed-off-by: wangjufeng --- @@ -9,18 +9,18 @@ Signed-off-by: wangjufeng 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/example.conf.in b/conf/example.conf.in -index 1f7b264..9a465ca 100644 +index 7e52d36..a60b595 100644 --- a/conf/example.conf.in +++ b/conf/example.conf.in -@@ -585,7 +585,7 @@ log { - # The level of log messages that are sent to the log file or syslog. +@@ -860,7 +860,7 @@ log { # There are 6 syslog-like log levels currently in use: 2 to 7 inclusive. # 7 is the most verbose (LOG_DEBUG). -- level = 0 + # This configuration option has an automatic default value. +- # level = 0 + level = 3 # Configuration option log/indent. # Indent messages according to their severity. -- -2.19.1 +1.8.3.1 diff --git a/0009-enhancement-add-dfx-log.patch b/0008-enhancement-add-dfx-log.patch similarity index 79% rename from 0009-enhancement-add-dfx-log.patch rename to 0008-enhancement-add-dfx-log.patch index c32c181e616c8d132e97e1c3dcfd6757e829438e..9a51bea588f3ceded12400166adf881fb2ce7405 100644 --- a/0009-enhancement-add-dfx-log.patch +++ b/0008-enhancement-add-dfx-log.patch @@ -1,4 +1,4 @@ -From fd36f54943e58db6483472519c118bde68b6ee60 Mon Sep 17 00:00:00 2001 +From c27b54c522543bc44030a0c1ecd414dc2523d331 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 @@ -6,59 +6,38 @@ Subject: [PATCH] add dfx log when error occur, or lvm resource change, it will Signed-off-by: wangjufeng --- - conf/example.conf.in | 4 ++++ - conf/example.conf.in.rej | 13 +++++++++++++ + conf/example.conf.in | 5 +++++ lib/commands/toolcontext.c | 16 ++++++++++++++++ lib/commands/toolcontext.h | 4 ++++ lib/config/config_settings.h | 5 +++++ lib/log/log.c | 21 +++++++++++++++++++-- lib/log/log.h | 4 +++- - lib/misc/lvm-globals.c | 12 ++++++++++++ + lib/misc/lvm-globals.c | 11 +++++++++++ lib/misc/lvm-globals.h | 2 ++ tools/lvmcmdline.c | 1 + - - 10 files changed, 78 insertions(+), 3 deletions(-) - create mode 100644 conf/example.conf.in.rej + 9 files changed, 66 insertions(+), 3 deletions(-) diff --git a/conf/example.conf.in b/conf/example.conf.in -index f310789..d715d12 100644 +index a60b595..09200ab 100644 --- a/conf/example.conf.in +++ b/conf/example.conf.in -@@ -775,6 +775,10 @@ log { - # There are 6 syslog-like log levels currently in use: 2 to 7 inclusive. - # 7 is the most verbose (LOG_DEBUG). +@@ -862,6 +862,11 @@ log { + # This configuration option has an automatic default value. level = 3 + + #When the level of log messages is set as 2 or 3, set log_unless_silent + #to 1, it will also log some important warning level messages, such as, + #create/delete/change a lv/vg/pv, 0 is close this option. + log_unless_silent = 1 - ++ # Configuration option log/indent. # Indent messages according to their severity. -diff --git a/conf/example.conf.in.rej b/conf/example.conf.in.rej -new file mode 100644 -index 0000000..d90332a ---- /dev/null -+++ b/conf/example.conf.in.rej -@@ -0,0 +1,13 @@ -+diff a/conf/example.conf.in b/conf/example.conf.in (rejected hunks) -+@@ -587,6 +587,11 @@ log { -+ # 7 is the most verbose (LOG_DEBUG). -+ level = 3 -+ -++ #When the level of log messages is set as 2 or 3, set log_unless_silent -++ #to 1, it will also log some important warning level messages, such as, -++ #create/delete/change a lv/vg/pv, 0 is close this option. -++ log_unless_silent = 1 -++ -+ # Configuration option log/indent. -+ # Indent messages according to their severity. -+ indent = 1 + # This configuration option has an automatic default value. diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c -index 479d499..894c91d 100644 +index 105aecd..2a9618a 100644 --- a/lib/commands/toolcontext.c +++ b/lib/commands/toolcontext.c -@@ -46,6 +46,8 @@ +@@ -51,6 +51,8 @@ static const size_t _linebuffer_size = 4096; @@ -67,7 +46,7 @@ index 479d499..894c91d 100644 /* * Copy the input string, removing invalid characters. */ -@@ -348,6 +350,9 @@ static void _init_logging(struct cmd_context *cmd) +@@ -397,6 +399,9 @@ static void _init_logging(struct cmd_context *cmd) find_config_tree_bool(cmd, log_silent_CFG, NULL); init_silent(cmd->default_settings.silent); @@ -77,15 +56,15 @@ index 479d499..894c91d 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); -@@ -1962,6 +1967,7 @@ void destroy_toolcontext(struct cmd_context *cmd) +@@ -2045,6 +2050,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); - dev_cache_exit(); -@@ -2014,3 +2020,13 @@ void destroy_toolcontext(struct cmd_context *cmd) + devices_file_exit(cmd); +@@ -2098,3 +2104,13 @@ void destroy_toolcontext(struct cmd_context *cmd) fin_syslog(); reset_lvm_errno(0); } @@ -100,10 +79,10 @@ index 479d499..894c91d 100644 + global_cmdline = cmdline; +} diff --git a/lib/commands/toolcontext.h b/lib/commands/toolcontext.h -index c09558a..a91174d 100644 +index 701b7a7..957ab7f 100644 --- a/lib/commands/toolcontext.h +++ b/lib/commands/toolcontext.h -@@ -47,6 +47,7 @@ struct config_info { +@@ -50,6 +50,7 @@ struct config_info { mode_t umask; char unit_type; char _padding[1]; @@ -111,7 +90,7 @@ index c09558a..a91174d 100644 }; struct dm_config_tree; -@@ -275,4 +276,7 @@ struct format_type *get_format_by_name(struct cmd_context *cmd, const char *form +@@ -299,4 +300,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); @@ -120,10 +99,10 @@ index c09558a..a91174d 100644 +void set_global_cmdline(char *cmdline); #endif diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h -index f280156..1b05163 100644 +index ab7d0d5..a83c034 100644 --- a/lib/config/config_settings.h +++ b/lib/config/config_settings.h -@@ -850,6 +850,11 @@ cfg(log_level_CFG, "level", log_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_LOGLEVEL, +@@ -887,6 +887,11 @@ cfg(log_level_CFG, "level", log_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_INT "There are 6 syslog-like log levels currently in use: 2 to 7 inclusive.\n" "7 is the most verbose (LOG_DEBUG).\n") @@ -136,7 +115,7 @@ index f280156..1b05163 100644 "Indent messages according to their severity.\n") diff --git a/lib/log/log.c b/lib/log/log.c -index ebf26b4..136959e 100644 +index 7b4d537..e8a16e0 100644 --- a/lib/log/log.c +++ b/lib/log/log.c @@ -19,6 +19,7 @@ @@ -147,7 +126,7 @@ index ebf26b4..136959e 100644 #include #include -@@ -494,6 +495,7 @@ static void _vprint_log(int level, const char *file, int line, int dm_errno_or_c +@@ -509,6 +510,7 @@ static void _vprint_log(int level, const char *file, int line, int dm_errno_or_c const char *trformat; /* Translated format string */ char *newbuf; int use_stderr = log_stderr(level); @@ -155,7 +134,7 @@ index ebf26b4..136959e 100644 int log_once = log_once(level); int log_bypass_report = log_bypass_report(level); int fatal_internal_error = 0; -@@ -506,7 +508,9 @@ static void _vprint_log(int level, const char *file, int line, int dm_errno_or_c +@@ -521,7 +523,9 @@ static void _vprint_log(int level, const char *file, int line, int dm_errno_or_c struct dm_report *orig_report; int logged_via_report = 0; @@ -165,7 +144,7 @@ index ebf26b4..136959e 100644 if (_abort_on_internal_errors_env_present < 0) { if ((env_str = getenv("DM_ABORT_ON_INTERNAL_ERRORS"))) { -@@ -670,8 +674,8 @@ static void _vprint_log(int level, const char *file, int line, int dm_errno_or_c +@@ -714,8 +718,8 @@ static void _vprint_log(int level, const char *file, int line, int dm_errno_or_c va_end(ap); } @@ -176,7 +155,7 @@ index ebf26b4..136959e 100644 if (fatal_internal_error) abort(); return; -@@ -714,6 +718,19 @@ static void _vprint_log(int level, const char *file, int line, int dm_errno_or_c +@@ -758,6 +762,19 @@ static void _vprint_log(int level, const char *file, int line, int dm_errno_or_c if (_syslog && (_log_while_suspended || !critical_section())) { va_copy(ap, orig_ap); @@ -197,7 +176,7 @@ index ebf26b4..136959e 100644 va_end(ap); } diff --git a/lib/log/log.h b/lib/log/log.h -index d3848a4..07f2eb4 100644 +index b5f05f2..fc5d589 100644 --- a/lib/log/log.h +++ b/lib/log/log.h @@ -50,6 +50,8 @@ @@ -209,7 +188,7 @@ index d3848a4..07f2eb4 100644 #define log_level(x) ((x) & 0x0f) /* obtain message level */ #define log_stderr(x) ((x) & _LOG_STDERR) /* obtain stderr bit */ #define log_once(x) ((x) & _LOG_ONCE) /* obtain once bit */ -@@ -107,7 +109,7 @@ +@@ -111,7 +113,7 @@ #define log_very_verbose(args...) log_info(args) #define log_verbose(args...) log_notice(args) #define log_print(args...) LOG_LINE(_LOG_WARN, args) @@ -258,17 +237,17 @@ index a54001c..8ae55f6 100644 +int get_log_unless_silent(void); #endif diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c -index f147be3..650eff8 100644 +index 1e12bed..ee9288b 100644 --- a/tools/lvmcmdline.c +++ b/tools/lvmcmdline.c -@@ -2973,6 +2973,7 @@ int lvm_run_command(struct cmd_context *cmd, int argc, char **argv) +@@ -3116,6 +3116,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; + set_global_cmdline(cmd->cmd_line); /* Look up command - will be NULL if not recognised */ - if (!(cmd->cname = _find_command_name(cmd->name))) + if (!(cmd->cname = find_command_name(cmd->name))) -- 1.8.3.1 diff --git a/0010-enhancement-syslog-more-when-use-libdevmapper-so.patch b/0009-enhancement-syslog-more-when-use-libdevmapper-so.patch similarity index 100% rename from 0010-enhancement-syslog-more-when-use-libdevmapper-so.patch rename to 0009-enhancement-syslog-more-when-use-libdevmapper-so.patch diff --git a/0011-enhancement-log-it-when-disk-slow.patch b/0010-enhancement-log-it-when-disk-slow.patch similarity index 100% rename from 0011-enhancement-log-it-when-disk-slow.patch rename to 0010-enhancement-log-it-when-disk-slow.patch diff --git a/0012-bugfix-lvm2-fix-the-reuse-of-va_list.patch b/0011-bugfix-lvm2-fix-the-reuse-of-va_list.patch similarity index 100% rename from 0012-bugfix-lvm2-fix-the-reuse-of-va_list.patch rename to 0011-bugfix-lvm2-fix-the-reuse-of-va_list.patch diff --git a/0013-lvreduce-support-yes.patch b/0013-lvreduce-support-yes.patch deleted file mode 100644 index e762126a5414d1529df479c703b6ee282062f0db..0000000000000000000000000000000000000000 --- a/0013-lvreduce-support-yes.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 287565fd5dd5f49f1a51c6cd9ebdc9c20ebc7730 Mon Sep 17 00:00:00 2001 -From: Zdenek Kabelac -Date: Tue, 6 Apr 2021 12:26:42 +0200 -Subject: [PATCH] lvreduce: support --yes - -Missed support for --yes with 'lvreduce' to answer 'y' to prompt. ---- - lib/metadata/lv_manip.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c -index 81346bd..b38acf8 100644 ---- a/lib/metadata/lv_manip.c -+++ b/lib/metadata/lv_manip.c -@@ -4970,7 +4970,7 @@ static int _request_confirmation(const struct logical_volume *lv, - - log_warn("THIS MAY DESTROY YOUR DATA (filesystem etc.)"); - -- if (!lp->force) { -+ if (!lp->force && !lp->yes) { - if (yes_no_prompt("Do you really want to reduce %s? [y/n]: ", - display_lvname(lv)) == 'n') { - log_error("Logical volume %s NOT reduced.", --- -1.8.3.1 - diff --git a/0014-unit-test-modify-for-systems-with-PGSIZE-of-64K.patch b/0014-unit-test-modify-for-systems-with-PGSIZE-of-64K.patch deleted file mode 100644 index 3bd243483d8093a53e52e79802cbb96185caf788..0000000000000000000000000000000000000000 --- a/0014-unit-test-modify-for-systems-with-PGSIZE-of-64K.patch +++ /dev/null @@ -1,119 +0,0 @@ -From 262008f1ceb050a9eed64f2fa50b1bc9366b9e75 Mon Sep 17 00:00:00 2001 -From: Wu Guanghao -Date: Tue, 23 Feb 2021 17:39:29 +0800 -Subject: [PATCH] unit-test: modify for systems with PGSIZE of 64K - -This modification supports dynamically obtaining the value of PAGE_SIZE, -which is compatible with systems with PAGE_SIZE of (4K/64K) - -Signed-off-by: wuguanghao ---- - test/unit/bcache_t.c | 7 ++++--- - test/unit/bcache_utils_t.c | 2 +- - test/unit/io_engine_t.c | 11 +++++++---- - 3 files changed, 12 insertions(+), 8 deletions(-) - -diff --git a/test/unit/bcache_t.c b/test/unit/bcache_t.c -index 9c4d102..399468a 100644 ---- a/test/unit/bcache_t.c -+++ b/test/unit/bcache_t.c -@@ -360,6 +360,7 @@ static void _large_fixture_exit(void *context) - *--------------------------------------------------------------*/ - #define MEG 2048 - #define SECTOR_SHIFT 9 -+#define PAGE_SIZE_SECTORS (sysconf(_SC_PAGE_SIZE) >> SECTOR_SHIFT) - - static void good_create(sector_t block_size, unsigned nr_cache_blocks) - { -@@ -389,12 +390,12 @@ static void bad_create(sector_t block_size, unsigned nr_cache_blocks) - - static void test_create(void *fixture) - { -- good_create(8, 16); -+ good_create(PAGE_SIZE_SECTORS, 16); - } - - static void test_nr_cache_blocks_must_be_positive(void *fixture) - { -- bad_create(8, 0); -+ bad_create(PAGE_SIZE_SECTORS, 0); - } - - static void test_block_size_must_be_positive(void *fixture) -@@ -412,7 +413,7 @@ static void test_block_size_must_be_multiple_of_page_size(void *fixture) - bad_create(_bad_examples[i], 16); - - for (i = 1; i < 100; i++) -- good_create(i * 8, 16); -+ good_create(i * PAGE_SIZE_SECTORS, 16); - } - - static void test_get_triggers_read(void *context) -diff --git a/test/unit/bcache_utils_t.c b/test/unit/bcache_utils_t.c -index 69c5101..ecc3ebb 100644 ---- a/test/unit/bcache_utils_t.c -+++ b/test/unit/bcache_utils_t.c -@@ -26,7 +26,7 @@ - - //---------------------------------------------------------------- - --#define T_BLOCK_SIZE 4096 -+#define T_BLOCK_SIZE sysconf(_SC_PAGESIZE) - #define NR_BLOCKS 64 - #define INIT_PATTERN 123 - -diff --git a/test/unit/io_engine_t.c b/test/unit/io_engine_t.c -index 349df25..431cca6 100644 ---- a/test/unit/io_engine_t.c -+++ b/test/unit/io_engine_t.c -@@ -25,8 +25,11 @@ - - //---------------------------------------------------------------- - -+#define SECTOR_SHIFT 9 - #define SECTOR_SIZE 512 - #define BLOCK_SIZE_SECTORS 8 -+#define PAGE_SIZE sysconf(_SC_PAGESIZE) -+#define PAGE_SIZE_SECTORS (PAGE_SIZE >> SECTOR_SHIFT) - #define NR_BLOCKS 64 - - struct fixture { -@@ -83,7 +86,7 @@ static void *_fix_init(void) - T_ASSERT(f); - f->e = create_async_io_engine(); - T_ASSERT(f->e); -- if (posix_memalign((void **) &f->data, 4096, SECTOR_SIZE * BLOCK_SIZE_SECTORS)) -+ if (posix_memalign((void **) &f->data, PAGE_SIZE, SECTOR_SIZE * BLOCK_SIZE_SECTORS)) - test_fail("posix_memalign failed"); - - snprintf(f->fname, sizeof(f->fname), "unit-test-XXXXXX"); -@@ -138,7 +141,7 @@ static void _test_read(void *fixture) - { - struct fixture *f = fixture; - struct io io; -- struct bcache *cache = bcache_create(8, BLOCK_SIZE_SECTORS, f->e); -+ struct bcache *cache = bcache_create(PAGE_SIZE_SECTORS, BLOCK_SIZE_SECTORS, f->e); - T_ASSERT(cache); - - f->di = bcache_set_fd(f->fd); -@@ -156,7 +159,7 @@ static void _test_write(void *fixture) - { - struct fixture *f = fixture; - struct io io; -- struct bcache *cache = bcache_create(8, BLOCK_SIZE_SECTORS, f->e); -+ struct bcache *cache = bcache_create(PAGE_SIZE_SECTORS, BLOCK_SIZE_SECTORS, f->e); - T_ASSERT(cache); - - f->di = bcache_set_fd(f->fd); -@@ -175,7 +178,7 @@ static void _test_write_bytes(void *fixture) - unsigned offset = 345; - char buf_out[32]; - char buf_in[32]; -- struct bcache *cache = bcache_create(8, BLOCK_SIZE_SECTORS, f->e); -+ struct bcache *cache = bcache_create(PAGE_SIZE_SECTORS, BLOCK_SIZE_SECTORS, f->e); - T_ASSERT(cache); - - f->di = bcache_set_fd(f->fd); --- -1.8.3.1 - diff --git a/LVM2.2.03.11.tgz b/LVM2.2.03.11.tgz deleted file mode 100644 index a89ca8bae64fbc2051f095c62a1e11fffa724d3b..0000000000000000000000000000000000000000 Binary files a/LVM2.2.03.11.tgz and /dev/null differ diff --git a/LVM2.2.03.14.tgz b/LVM2.2.03.14.tgz new file mode 100644 index 0000000000000000000000000000000000000000..0c93d9104e0b81255c51433d10210aaf51891550 Binary files /dev/null and b/LVM2.2.03.14.tgz differ diff --git a/lvm2.spec b/lvm2.spec index 6b87ed0af62a9544b91d03fbc3923b1dea3233ba..797a297dcb135ac4226dae30057250157daffbd9 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.172 +%global device_mapper_version 1.02.181 %global systemd_version 189-3 %global dracut_version 002-18 %global util_linux_version 2.24 @@ -42,27 +42,24 @@ %global dlm_version 4.0.6-2 Name: lvm2 -Version: 2.03.11 -Release: 5 +Version: 2.03.14 +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.11.tgz +Source0: https://sourceware.org/pub/lvm2/releases/LVM2.2.03.14.tgz Patch1: 0001-lvm2-set-default-preferred_names.patch Patch2: 0002-lvm2-default-allow-changes-with-duplicate-pvs.patch -Patch3: 0003-cov-check-result-of-dev_read_bytes.patch -Patch4: 0004-devs-check-for-no-dev-when-dropping-aliases.patch -Patch5: 0005-bugfix-lvm2-add-SSD.patch -Patch6: 0006-bugfix-add-timeout-when-fail-to-wait-udev.patch -Patch7: 0007-bugfix-fix-the-code-maybe-lead-to-buffer-over-bound-access.patch -Patch8: 0008-enhancement-modify-default-log-level-to-error-level.patch -Patch9: 0009-enhancement-add-dfx-log.patch -Patch10: 0010-enhancement-syslog-more-when-use-libdevmapper-so.patch -Patch11: 0011-enhancement-log-it-when-disk-slow.patch -Patch12: 0012-bugfix-lvm2-fix-the-reuse-of-va_list.patch -Patch13: 0013-lvreduce-support-yes.patch -Patch14: 0014-unit-test-modify-for-systems-with-PGSIZE-of-64K.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 BuildRequires: gcc BuildRequires: gcc-c++ @@ -80,6 +77,7 @@ BuildRequires: python3-setuptools BuildRequires: python3-dbus BuildRequires: python3-pyudev BuildRequires: device-mapper-persistent-data >= %{persistent_data_version} +BuildRequires: device-mapper-event %if %{use_cluster} BuildRequires: corosynclib-devel >= %{corosync_version} @@ -243,7 +241,7 @@ It contains tthe event monitoring daemon for device-mapper devices. Library plu can register and carryout actions triggered when particular events occur. %build -%configure --with-default-dm-run-dir=/run --with-default-run-dir=/run/lvm --with-default-pid-dir=/run --with-default-locking-dir=/run/lock/lvm --with-usrlibdir=%{_libdir} --enable-fsadm --enable-write_install --with-user= --with-group= --with-device-uid=0 --with-device-gid=6 --with-device-mode=0660 --enable-pkgconfig --enable-applib --enable-cmdlib --enable-dmeventd --enable-blkid_wiping --enable-python3-bindings %{?configure_cluster} %{?configure_cmirror} --with-udevdir=%{_prefix}/lib/udev/rules.d --enable-udev_sync --with-thin=internal --enable-lvmetad --with-thin=internal --enable-lvmpolld %{?configure_lockd_dlm} %{?configure_lockd_sanlock} --enable-dbus-service --enable-notify-dbus --enable-dmfilemapd +%configure --with-default-dm-run-dir=/run --with-default-run-dir=/run/lvm --with-default-pid-dir=/run --with-default-locking-dir=/run/lock/lvm --with-usrlibdir=%{_libdir} --enable-fsadm --enable-write_install --with-user= --with-group= --with-device-uid=0 --with-device-gid=6 --with-device-mode=0660 --enable-pkgconfig --enable-applib --enable-cmdlib --enable-dmeventd --enable-blkid_wiping %{?configure_cluster} %{?configure_cmirror} --with-udevdir=%{_prefix}/lib/udev/rules.d --enable-udev_sync --with-thin=internal --with-thin=internal --enable-lvmpolld %{?configure_lockd_dlm} %{?configure_lockd_sanlock} --enable-dbus-service --enable-notify-dbus --enable-dmfilemapd make %{?_smp_mflags} %check @@ -374,8 +372,10 @@ fi %{_sbindir}/lvscan %{_sbindir}/pv* %{_sbindir}/vg* +%{_sbindir}/lvmdevices +%{_sbindir}/lvm_import_vdo -%{_prefix}/lib/udev/rules.d/69-dm-lvm-metad.rules +%{_prefix}/lib/udev/rules.d/69-dm-lvm.rules %{_prefix}/lib/udev/rules.d/11-dm-lvm.rules %dir %{_sysconfdir}/lvm @@ -400,7 +400,6 @@ fi %{_unitdir}/blk-availability.service %{_unitdir}/lvm2-monitor.service %attr(555, -, -) %{_prefix}/lib/systemd/system-generators/lvm2-activation-generator -%{_unitdir}/lvm2-pvscan@.service %{_unitdir}/lvm2-lvmpolld.socket %{_unitdir}/lvm2-lvmpolld.service @@ -487,6 +486,9 @@ fi %changelog +* Mon Nov 22 2021 wuguanghao - 8:2.03.14-1 +- upgrade to 2.03.14 + * Wed Jul 28 2021 wuguanghao - 8.2.03.11-5 - %check modified to make run-unit-test