From 35a342cfb7b3861dd2a320c9d60ccbbf03c949da Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Jun 23 2016 14:51:53 +0000 Subject: import lvm2-2.02.130-5.el7_2.4 --- diff --git a/SOURCES/lvm2-2_02_140-restore-background-polling-processing-during-auto-activation.patch b/SOURCES/lvm2-2_02_140-restore-background-polling-processing-during-auto-activation.patch new file mode 100644 index 0000000..0ef7cb7 --- /dev/null +++ b/SOURCES/lvm2-2_02_140-restore-background-polling-processing-during-auto-activation.patch @@ -0,0 +1,74 @@ + WHATS_NEW | 4 ++++ + tools/pvscan.c | 9 +++++++++ + tools/tools.h | 2 ++ + tools/vgchange.c | 4 ++-- + 4 files changed, 17 insertions(+), 2 deletions(-) + +diff --git a/WHATS_NEW b/WHATS_NEW +index 945b282..8c87a92 100644 +--- a/WHATS_NEW ++++ b/WHATS_NEW +@@ -2,6 +2,10 @@ Version 2.02.142 - + ==================================== + Do not check for suspended devices if scanning for lvmetad update. + ++Version 2.02.140 - ++=================================== ++ Restore background polling processing during auto-activation (2.02.119). ++ + Version 2.02.133 - + ====================================== + Check for enough space in thin-pool in command before creating new thin. +diff --git a/tools/pvscan.c b/tools/pvscan.c +index 3adb91c..b3b5911 100644 +--- a/tools/pvscan.c ++++ b/tools/pvscan.c +@@ -154,6 +154,15 @@ static int _auto_activation_handler(struct cmd_context *cmd, + goto out; + } + ++ /* ++ * After sucessfull activation we need to initialise polling ++ * for all activated LVs in a VG. Possible enhancement would ++ * be adding --poll y|n cmdline option for pvscan and call ++ * init_background_polling routine in autoactivation handler. ++ */ ++ if (!(vgchange_background_polling(vg->cmd, vg))) ++ goto_out; ++ + r = 1; + + out: +diff --git a/tools/tools.h b/tools/tools.h +index 4ed893f..634b101 100644 +--- a/tools/tools.h ++++ b/tools/tools.h +@@ -183,4 +183,6 @@ int mirror_remove_missing(struct cmd_context *cmd, + int vgchange_activate(struct cmd_context *cmd, struct volume_group *vg, + activation_change_t activate); + ++int vgchange_background_polling(struct cmd_context *cmd, struct volume_group *vg); ++ + #endif +diff --git a/tools/vgchange.c b/tools/vgchange.c +index 1d3c64a..d572220 100644 +--- a/tools/vgchange.c ++++ b/tools/vgchange.c +@@ -174,7 +174,7 @@ static int _vgchange_monitoring(struct cmd_context *cmd, struct volume_group *vg + return r; + } + +-static int _vgchange_background_polling(struct cmd_context *cmd, struct volume_group *vg) ++int vgchange_background_polling(struct cmd_context *cmd, struct volume_group *vg) + { + int polled; + +@@ -999,7 +999,7 @@ static int vgchange_single(struct cmd_context *cmd, const char *vg_name, + + if (!arg_count(cmd, refresh_ARG) && + background_polling()) +- if (!_vgchange_background_polling(cmd, vg)) ++ if (!vgchange_background_polling(cmd, vg)) + return_ECMD_FAILED; + + if (arg_is_set(cmd, lockstart_ARG)) { diff --git a/SOURCES/lvm2-2_02_155-fix-flushing-for-mirror-target.patch b/SOURCES/lvm2-2_02_155-fix-flushing-for-mirror-target.patch new file mode 100644 index 0000000..5ecd0a8 --- /dev/null +++ b/SOURCES/lvm2-2_02_155-fix-flushing-for-mirror-target.patch @@ -0,0 +1,77 @@ + WHATS_NEW | 4 ++++ + lib/activate/activate.c | 10 ++++++++++ + lib/activate/dev_manager.c | 13 +++++++------ + 3 files changed, 21 insertions(+), 6 deletions(-) + +diff --git a/WHATS_NEW b/WHATS_NEW +index 8c87a92..6441cc1 100644 +--- a/WHATS_NEW ++++ b/WHATS_NEW +@@ -1,3 +1,7 @@ ++Version 2.02.155 - ++==================================== ++ Fix flushing for mirror target. ++ + Version 2.02.142 - + ==================================== + Do not check for suspended devices if scanning for lvmetad update. +diff --git a/lib/activate/activate.c b/lib/activate/activate.c +index 7d2adf1..8b0fcb3 100644 +--- a/lib/activate/activate.c ++++ b/lib/activate/activate.c +@@ -1900,6 +1900,16 @@ static int _lv_suspend(struct cmd_context *cmd, const char *lvid_s, + } + } + ++ /* Flush is ATM required for the tested cases ++ * NOTE: Mirror repair requires noflush for proper repair! ++ * TODO: Relax this limiting condition further */ ++ if (!flush_required && ++ (lv_is_pvmove(ondisk_lv) || ++ (!lv_is_mirror(ondisk_lv) && !lv_is_thin_pool(ondisk_lv) && !lv_is_thin_volume(ondisk_lv)))) { ++ log_debug("Requiring flush for LV %s.", display_lvname(ondisk_lv)); ++ flush_required = 1; ++ } ++ + if (!monitor_dev_for_events(cmd, ondisk_lv, laopts, 0)) + /* FIXME Consider aborting here */ + stack; +diff --git a/lib/activate/dev_manager.c b/lib/activate/dev_manager.c +index e1f547f..c95dfbe 100644 +--- a/lib/activate/dev_manager.c ++++ b/lib/activate/dev_manager.c +@@ -3277,7 +3277,7 @@ static int _tree_action(struct dev_manager *dm, const struct logical_volume *lv, + break; + case SUSPEND: + dm_tree_skip_lockfs(root); +- if (!dm->flush_required && !lv_is_pvmove(lv)) ++ if (!dm->flush_required) + dm_tree_use_no_flush_suspend(root); + /* Fall through */ + case SUSPEND_WITH_LOCKFS: +@@ -3298,12 +3298,11 @@ static int _tree_action(struct dev_manager *dm, const struct logical_volume *lv, + + if ((dm_tree_node_size_changed(root) < 0)) + dm->flush_required = 1; +- + /* Currently keep the code require flush for any +- * non 'thin pool/volume, mirror' or with any size change */ +- if (!lv_is_thin_volume(lv) && +- !lv_is_thin_pool(lv) && +- (!lv_is_mirror(lv) || dm_tree_node_size_changed(root))) ++ * non 'thin pool/volume' and size increase */ ++ else if (!lv_is_thin_volume(lv) && ++ !lv_is_thin_pool(lv) && ++ dm_tree_node_size_changed(root)) + dm->flush_required = 1; + + if (action == ACTIVATE) { +@@ -3347,6 +3346,8 @@ int dev_manager_activate(struct dev_manager *dm, const struct logical_volume *lv + int dev_manager_preload(struct dev_manager *dm, const struct logical_volume *lv, + struct lv_activate_opts *laopts, int *flush_required) + { ++ dm->flush_required = *flush_required; ++ + if (!_tree_action(dm, lv, laopts, PRELOAD)) + return_0; + diff --git a/SOURCES/lvm2-rhel7.patch b/SOURCES/lvm2-rhel7.patch index a671864..af0ec98 100644 --- a/SOURCES/lvm2-rhel7.patch +++ b/SOURCES/lvm2-rhel7.patch @@ -8,11 +8,11 @@ index dd4e60e..39d6c15 100644 +++ b/VERSION @@ -1 +1 @@ -2.02.130(2) (2015-09-05) -+2.02.130(2)-RHEL7 (2015-12-01) ++2.02.130(2)-RHEL7 (2016-06-09) diff --git a/VERSION_DM b/VERSION_DM index d53f47a..005fbd4 100644 --- a/VERSION_DM +++ b/VERSION_DM @@ -1 +1 @@ -1.02.107 (2015-09-05) -+1.02.107-RHEL7 (2015-12-01) ++1.02.107-RHEL7 (2016-06-09) diff --git a/SPECS/lvm2.spec b/SPECS/lvm2.spec index ef6513b..6f8761c 100644 --- a/SPECS/lvm2.spec +++ b/SPECS/lvm2.spec @@ -52,7 +52,7 @@ Summary: Userland logical volume management tools Name: lvm2 Epoch: 7 Version: 2.02.130 -Release: 5%{?dist}.2 +Release: 5%{?dist}.4 License: GPLv2 Group: System Environment/Base URL: http://sources.redhat.com/lvm2 @@ -74,6 +74,8 @@ Patch13: lvm2-2_02_133-check-for-space-in-thin-pool-before-creating-new-thin.pat Patch14: lvm2-2_02_133-enforce-writethrough-mode-for-cleaner-policy.patch Patch15: lvm2-2_02_135-fix-resize-of-full-thin-pool-causing-data-loss.patch Patch16: lvm2-2_02_142-do-not-check-for-suspended-devices-if-scanning-for-lvmetad-update.patch +Patch17: lvm2-2_02_140-restore-background-polling-processing-during-auto-activation.patch +Patch18: lvm2-2_02_155-fix-flushing-for-mirror-target.patch BuildRequires: libselinux-devel >= %{libselinux_version}, libsepol-devel BuildRequires: libblkid-devel >= %{util_linux_version} @@ -136,6 +138,8 @@ or more physical volumes and creating one or more logical volumes %patch14 -p1 -b .writethrough_cleaner_policy %patch15 -p1 -b .thin_pool_resize_data_loss %patch16 -p1 -b .susp_devs_lvmetad_update +%patch17 -p1 -b .background_polling_auto_activation +%patch18 -p1 -b .flushing_mirror %build %define _default_pid_dir /run @@ -834,6 +838,12 @@ the device-mapper event library. %{_libdir}/pkgconfig/devmapper-event.pc %changelog +* Thu Jun 09 2016 Peter Rajnoha - 7:2.02.130-5.el7_2.4 +- Fix flushing for mirror target. + +* Tue May 03 2016 Peter Rajnoha - 7:2.02.130-5.el7_2.3 +- Restore background polling processing during auto-activation (2.02.119). + * Thu Mar 24 2016 Peter Rajnoha - 7:2.02.130-5.el7_2.2 - Do not check for suspended devices if scanning for lvmetad update.