diff --git a/LVM2.2.02.114.tgz b/LVM2.2.02.114.tgz deleted file mode 100644 index 924ca00..0000000 --- a/LVM2.2.02.114.tgz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:de9cb0acfb9c5a6afa6184160c9e066f19043677f91a72c741d153efcd2874a5 -size 1524844 diff --git a/LVM2.2.02.114.tgz.asc b/LVM2.2.02.114.tgz.asc deleted file mode 100644 index c47d571..0000000 --- a/LVM2.2.02.114.tgz.asc +++ /dev/null @@ -1,7 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.14 (GNU/Linux) - -iEYEABECAAYFAlR5ALcACgkQIoGRwVZ+LBfcYACfcsCo+Im/tR2gbHDpSA5Qg9Vo -iqIAoOjwTzT8Mcwgz7cpUdl7iLhoaola -=BmR+ ------END PGP SIGNATURE----- diff --git a/LVM2.2.02.120.tgz b/LVM2.2.02.120.tgz new file mode 100644 index 0000000..264ca5d --- /dev/null +++ b/LVM2.2.02.120.tgz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8d6bd02f7d00315482538ece3e831cd81709c29d74ce71229c60192fb166081a +size 1653183 diff --git a/LVM2.2.02.120.tgz.asc b/LVM2.2.02.120.tgz.asc new file mode 100644 index 0000000..ba84589 --- /dev/null +++ b/LVM2.2.02.120.tgz.asc @@ -0,0 +1,7 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.14 (GNU/Linux) + +iEYEABECAAYFAlVWcqQACgkQIoGRwVZ+LBeiKgCg6vIAWhC7AZcf01Qf505sty3A +HOwAoJGo8JYHscwGMo3FSIkLWHjbcRq0 +=96gn +-----END PGP SIGNATURE----- diff --git a/cluster_support_mirrord_log.diff b/cluster_support_mirrord_log.diff index c94d4f0..a15671a 100644 --- a/cluster_support_mirrord_log.diff +++ b/cluster_support_mirrord_log.diff @@ -456,7 +456,7 @@ Subject: Parallelize dispatching - if (!lv_is_pvmove(lv) && !lv_is_locked(lv) && - lv_is_active(lv) && - !lv_is_active_exclusive_locally(lv) && /* lv_is_active_remotely */ -- !_cluster_mirror_is_available(lv)) { +- !cluster_mirror_is_available(lv->vg->cmd)) { - log_error("Shared cluster mirrors are not available."); - return 0; - } diff --git a/dab3ebce-devices-Do-not-support-unpartitioned-DASD.patch b/dab3ebce-devices-Do-not-support-unpartitioned-DASD.patch deleted file mode 100644 index 93ced8f..0000000 --- a/dab3ebce-devices-Do-not-support-unpartitioned-DASD.patch +++ /dev/null @@ -1,58 +0,0 @@ -Index: LVM2.2.02.114/lib/device/dev-type.c -=================================================================== ---- LVM2.2.02.114.orig/lib/device/dev-type.c -+++ LVM2.2.02.114/lib/device/dev-type.c -@@ -112,6 +112,10 @@ struct dev_types *create_dev_types(const - if (!strncmp("drbd", line + i, 4) && isspace(*(line + i + 4))) - dt->drbd_major = line_maj; - -+ /* Look for DASD */ -+ if (!strncmp("dasd", line + i, 4) && isspace(*(line + i + 4))) -+ dt->dasd_major = line_maj; -+ - /* Look for EMC powerpath */ - if (!strncmp("emcpower", line + i, 8) && isspace(*(line + i + 8))) - dt->emcpower_major = line_maj; -@@ -203,6 +207,9 @@ int dev_subsystem_part_major(struct dev_ - if (MAJOR(dev->dev) == dt->emcpower_major) - return 1; - -+ if (MAJOR(dev->dev) == dt->dasd_major) -+ return 1; -+ - if (MAJOR(dev->dev) == dt->power2_major) - return 1; - -@@ -222,6 +229,9 @@ const char *dev_subsystem_name(struct de - if (MAJOR(dev->dev) == dt->drbd_major) - return "DRBD"; - -+ if (MAJOR(dev->dev) == dt->dasd_major) -+ return "DASD"; -+ - if (MAJOR(dev->dev) == dt->emcpower_major) - return "EMCPOWER"; - -@@ -319,6 +329,10 @@ int dev_is_partitioned(struct dev_types - if (!_is_partitionable(dt, dev)) - return 0; - -+ /* Unpartitioned DASD devices are not supported. */ -+ if (MAJOR(dev->dev) == dt->dasd_major) -+ return 1; -+ - return _has_partition_table(dev); - } - -Index: LVM2.2.02.114/lib/device/dev-type.h -=================================================================== ---- LVM2.2.02.114.orig/lib/device/dev-type.h -+++ LVM2.2.02.114/lib/device/dev-type.h -@@ -44,6 +44,7 @@ struct dev_types { - int device_mapper_major; - int emcpower_major; - int power2_major; -+ int dasd_major; - struct dev_type_def dev_type_array[NUMBER_OF_MAJORS]; - }; - diff --git a/device-mapper-static.patch b/device-mapper-static.patch index b7aae56..e32a108 100644 --- a/device-mapper-static.patch +++ b/device-mapper-static.patch @@ -3,8 +3,8 @@ Index: LVM2.2.02.109/libdm/Makefile.in --- LVM2.2.02.109.orig/libdm/Makefile.in +++ LVM2.2.02.109/libdm/Makefile.in @@ -39,9 +39,9 @@ INCLUDES += @VALGRIND_CFLAGS@ - endif - CFLAGS += $(UDEV_CFLAGS) + + INCLUDES = -I$(srcdir)/$(interface) -ifeq ("@STATIC_LINK@", "yes") +#ifeq ("@STATIC_LINK@", "yes") diff --git a/display-dm-name-for-lv-name.diff b/display-dm-name-for-lv-name.diff index e225f5b..7e0c303 100644 --- a/display-dm-name-for-lv-name.diff +++ b/display-dm-name-for-lv-name.diff @@ -1,33 +1,34 @@ --- - lib/config/config_settings.h | 1 + + lib/config/config_settings.h | 3 +++ lib/config/defaults.h | 1 + - lib/display/display.c | 14 ++++++++++---- - lib/display/display.h | 1 + - 4 files changed, 13 insertions(+), 4 deletions(-) + lib/display/display.c | 13 +++++++++---- + 3 files changed, 13 insertions(+), 4 deletions(-) --- a/lib/config/config_settings.h +++ b/lib/config/config_settings.h -@@ -187,6 +187,7 @@ cfg_array(global_cache_check_options_CFG - cfg(global_cache_dump_executable_CFG, "cache_dump_executable", global_CFG_SECTION, CFG_ALLOW_EMPTY, CFG_TYPE_STRING, CACHE_DUMP_CMD, vsn(2, 2, 108), NULL) - cfg(global_cache_repair_executable_CFG, "cache_repair_executable", global_CFG_SECTION, CFG_ALLOW_EMPTY, CFG_TYPE_STRING, CACHE_REPAIR_CMD, vsn(2, 2, 108), NULL) - cfg_array(global_cache_repair_options_CFG, "cache_repair_options", global_CFG_SECTION, 0, CFG_TYPE_STRING, "#S" DEFAULT_CACHE_REPAIR_OPTIONS, vsn(2, 2, 108), NULL) -+cfg(global_display_dm_name_for_lv_name_CFG, "display_dm_name_for_lv_name", global_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_DISPLAY_DM_NAME_FOR_LV_NAME, vsn(2, 2, 98), NULL) +@@ -905,6 +905,9 @@ cfg_array(global_cache_check_options_CFG + cfg_array(global_cache_repair_options_CFG, "cache_repair_options", global_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_STRING, "#S" DEFAULT_CACHE_REPAIR_OPTIONS, vsn(2, 2, 108), NULL, 0, NULL, + "List of options passed to the cache_repair command.\n") - cfg(activation_checks_CFG, "checks", activation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_ACTIVATION_CHECKS, vsn(2, 2, 86), NULL) - cfg(activation_udev_sync_CFG, "udev_sync", activation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_UDEV_SYNC, vsn(2, 2, 51), NULL) ++cfg(global_display_dm_name_for_lv_name_CFG, "display_dm_name_for_lv_name", global_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_BOOL, DEFAULT_DISPLAY_DM_NAME_FOR_LV_NAME, vsn(2, 2, 98), NULL, 0, NULL, ++ "Display dm name for lv name.\n") ++ + cfg(global_system_id_source_CFG, "system_id_source", global_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_SYSTEM_ID_SOURCE, vsn(2, 2, 117), NULL, 0, NULL, + "The method LVM uses to set the local system ID.\n" + "Volume Groups can also be given a system ID (by\n" --- a/lib/config/defaults.h +++ b/lib/config/defaults.h -@@ -31,6 +31,7 @@ - #define DEFAULT_PROC_DIR "/proc" +@@ -33,6 +33,7 @@ #define DEFAULT_OBTAIN_DEVICE_LIST_FROM_UDEV 1 + #define DEFAULT_EXTERNAL_DEVICE_INFO_SOURCE "none" #define DEFAULT_SYSFS_SCAN 1 +#define DEFAULT_DISPLAY_DM_NAME_FOR_LV_NAME 0 #define DEFAULT_MD_COMPONENT_DETECTION 1 + #define DEFAULT_FW_RAID_COMPONENT_DETECTION 0 #define DEFAULT_MD_CHUNK_ALIGNMENT 1 - #define DEFAULT_IGNORE_LVM_MIRRORS 1 --- a/lib/display/display.c +++ b/lib/display/display.c -@@ -461,10 +461,15 @@ int lvdisplay_full(struct cmd_context *c +@@ -462,10 +462,15 @@ int lvdisplay_full(struct cmd_context *c lv->vg->cmd->dev_dir, lv->vg->name, lv->name); else if (lv_is_visible(lv)) { /* Thin pool does not have /dev/vg/name link */ diff --git a/improve-mirror-legs-on-different-tag-pvs.patch b/improve-mirror-legs-on-different-tag-pvs.patch index ecef5a9..955bad8 100644 --- a/improve-mirror-legs-on-different-tag-pvs.patch +++ b/improve-mirror-legs-on-different-tag-pvs.patch @@ -18,7 +18,7 @@ Signed-off-by: Guangliang Zhao --- a/lib/metadata/lv_manip.c +++ b/lib/metadata/lv_manip.c -@@ -2481,6 +2481,25 @@ static uint32_t _calc_required_extents(s +@@ -2455,6 +2455,25 @@ static uint32_t _calc_required_extents(s return required; } @@ -37,14 +37,14 @@ Signed-off-by: Guangliang Zhao + * the alloc_state and reserved areas every time. + */ + if (required > alloc_state->areas[ix_pva - 1].used) -+ _reserve_area(alloc_state, pva, required, ix_pva - 1, ++ _reserve_area(ah, alloc_state, pva, required, ix_pva - 1, + pva->unreserved); +} + static void _clear_areas(struct alloc_state *alloc_state) { uint32_t s; -@@ -2575,6 +2594,7 @@ static int _find_some_parallel_space(str +@@ -2580,6 +2599,7 @@ static int _find_some_parallel_space(str const struct alloc_parms *alloc_parms = alloc_state->alloc_parms; unsigned ix = 0; unsigned last_ix; @@ -52,7 +52,7 @@ Signed-off-by: Guangliang Zhao struct pv_map *pvm; struct pv_area *pva; unsigned preferred_count = 0; -@@ -2695,9 +2715,17 @@ static int _find_some_parallel_space(str +@@ -2700,9 +2720,17 @@ static int _find_some_parallel_space(str continue; case USE_AREA: diff --git a/lvm2.changes b/lvm2.changes index 8f054dd..78f3493 100644 --- a/lvm2.changes +++ b/lvm2.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue May 19 16:30:47 UTC 2015 - jeffm@suse.com + +- Update to 2.02.120 + - Fixed numerous bugs(see WHATS_NEW for full details) + - Deleted dab3ebce-devices-Do-not-support-unpartitioned-DASD.patch (upstream) + ------------------------------------------------------------------- Fri Apr 3 02:45:02 UTC 2015 - lzhong@suse.com diff --git a/lvm2.spec b/lvm2.spec index d46c34d..7bbfde0 100644 --- a/lvm2.spec +++ b/lvm2.spec @@ -16,8 +16,8 @@ # -%define lvm2_version 2.02.114 -%define device_mapper_version 1.02.92 +%define lvm2_version 2.02.120 +%define device_mapper_version 1.02.97 %define thin_provisioning_version 0.4.1 Name: lvm2 @@ -38,8 +38,6 @@ Source16: csm-converter.tar.gz Source50: thin-provisioning-tools-v%{thin_provisioning_version}.tar.gz # Upstream patches first -# bsc#894202 -Patch1: dab3ebce-devices-Do-not-support-unpartitioned-DASD.patch # SUSE patches 1000- for LVM, 2000- for device mapper Patch1001: improve_probing.diff @@ -124,7 +122,6 @@ Volume Manager. %prep %setup -q -n LVM2.%{version} -a 50 -a 16 -%patch1 -p1 %patch1001 -p1 %patch1002 -p1 %patch1003 -p1 @@ -287,6 +284,7 @@ popd %dir /usr/lib/tmpfiles.d %ghost %{_sysconfdir}/lvm/cache/.cache %{_sysconfdir}/lvm/profile/*.profile +%{_sysconfdir}/lvm/lvmlocal.conf %{_udevdir}/rules.d/11-dm-lvm.rules %{_udevdir}/rules.d/69-dm-lvm-metad.rules %{_unitdir}/blk-availability.service diff --git a/make-mirror-legs-on-different-tag-pvs.patch b/make-mirror-legs-on-different-tag-pvs.patch index 8a47475..d88f6b7 100644 --- a/make-mirror-legs-on-different-tag-pvs.patch +++ b/make-mirror-legs-on-different-tag-pvs.patch @@ -19,51 +19,53 @@ always be placed on pvs with differnt tags. Signed-off-by: Guangliang Zhao --- conf/example.conf.in | 17 +++++++++++++++++ - lib/config/config_settings.h | 1 + + lib/config/config_settings.h | 3 +++ lib/config/defaults.h | 1 + - lib/metadata/lv_manip.c | 36 ++++++++++++++++++++++++++++++++++++ + lib/metadata/lv_manip.c | 35 +++++++++++++++++++++++++++++++++++ man/lvcreate.8.in | 4 ++++ - 5 files changed, 59 insertions(+) + 5 files changed, 60 insertions(+) --- a/conf/example.conf.in +++ b/conf/example.conf.in -@@ -315,6 +315,23 @@ allocation { - # - wipe_signatures_when_zeroing_new_lvs = 1 +@@ -359,6 +359,23 @@ allocation { + # option is used directly. + wipe_signatures_when_zeroing_new_lvs = 1 -+ # Set to 1 to guarantee that mirror leg will always be placed on -+ # different PVs(with different tags) from the other mirror legs. -+ # -+ # If you want to enable this feature, the following conditions -+ # must be met: -+ # 1) The mirror_legs_require_separate_pvs must be set to 1, the -+ # default value is 0. -+ # 2) The cling_tag_list must be activated. -+ # 3) The length of all pvs with same tag must greater than or equal -+ # to the mirror's. ++ # Set to 1 to guarantee that mirror leg will always be placed on ++ # different PVs(with different tags) from the other mirror legs. ++ # ++ # If you want to enable this feature, the following conditions ++ # must be met: ++ # 1) The mirror_legs_require_separate_pvs must be set to 1, the ++ # default value is 0. ++ # 2) The cling_tag_list must be activated. ++ # 3) The length of all pvs with same tag must greater than or equal ++ # to the mirror's. + -+ # This feature is only for the first allocation, on the other hand -+ # when creating new mirrored lvs. -+ # Please note that the commond may fail if the number of all tags -+ # on the pvs less than the mirror legs number. -+ mirror_legs_require_separate_pvs = 0 ++ # This feature is only for the first allocation, on the other hand ++ # when creating new mirrored lvs. ++ # Please note that the commond may fail if the number of all tags ++ # on the pvs less than the mirror legs number. ++ mirror_legs_require_separate_pvs = 0 + - # Set to 1 to guarantee that mirror logs will always be placed on - # different PVs from the mirror images. This was the default - # until version 2.02.85. + # Configuration option allocation/mirror_logs_require_separate_pvs. + # Mirror logs and images will always use different PVs. + # The default setting changed in version 2.02.85. --- a/lib/config/config_settings.h +++ b/lib/config/config_settings.h -@@ -119,6 +119,7 @@ cfg(allocation_maximise_cling_CFG, "maxi - cfg(allocation_use_blkid_wiping_CFG, "use_blkid_wiping", allocation_CFG_SECTION, 0, CFG_TYPE_BOOL, 1, vsn(2, 2, 105), NULL) - cfg(allocation_wipe_signatures_when_zeroing_new_lvs_CFG, "wipe_signatures_when_zeroing_new_lvs", allocation_CFG_SECTION, 0, CFG_TYPE_BOOL, 1, vsn(2, 2, 105), NULL) - cfg(allocation_mirror_logs_require_separate_pvs_CFG, "mirror_logs_require_separate_pvs", allocation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_MIRROR_LOGS_REQUIRE_SEPARATE_PVS, vsn(2, 2, 85), NULL) -+cfg(allocation_mirror_legs_require_separate_pvs_CFG, "mirror_legs_require_separate_pvs", allocation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_MIRROR_LEGS_REQUIRE_SEPARATE_PVS, vsn(2, 2, 98), NULL) - cfg(allocation_cache_pool_metadata_require_separate_pvs_CFG, "cache_pool_metadata_require_separate_pvs", allocation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_CACHE_POOL_METADATA_REQUIRE_SEPARATE_PVS, vsn(2, 2, 106), NULL) - cfg(allocation_cache_pool_cachemode_CFG, "cache_pool_cachemode", allocation_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_CACHE_POOL_CACHEMODE, vsn(2, 2, 113), NULL) - cfg_runtime(allocation_cache_pool_chunk_size_CFG, "cache_pool_chunk_size", allocation_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_INT, vsn(2, 2, 106), NULL) +@@ -457,6 +457,9 @@ cfg(allocation_mirror_logs_require_separ + "Mirror logs and images will always use different PVs.\n" + "The default setting changed in version 2.02.85.\n") + ++cfg(allocation_mirror_legs_require_separate_pvs_CFG, "mirror_legs_require_separate_pvs", allocation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_MIRROR_LEGS_REQUIRE_SEPARATE_PVS, vsn(2, 2, 98), NULL, 0, NULL, ++ "Mirror legs will always use different PVs.\n") ++ + cfg(allocation_cache_pool_metadata_require_separate_pvs_CFG, "cache_pool_metadata_require_separate_pvs", allocation_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_CACHE_POOL_METADATA_REQUIRE_SEPARATE_PVS, vsn(2, 2, 106), NULL, 0, NULL, + "Cache pool metadata and data will always use different PVs.\n") + --- a/lib/config/defaults.h +++ b/lib/config/defaults.h -@@ -125,6 +125,7 @@ +@@ -132,6 +132,7 @@ #define DEFAULT_MAX_LV 0 #define DEFAULT_ALLOC_POLICY ALLOC_NORMAL #define DEFAULT_MIRROR_LOGS_REQUIRE_SEPARATE_PVS 0 @@ -73,7 +75,7 @@ Signed-off-by: Guangliang Zhao --- a/lib/metadata/lv_manip.c +++ b/lib/metadata/lv_manip.c -@@ -1409,6 +1409,9 @@ struct alloc_handle { +@@ -1447,6 +1447,9 @@ struct alloc_handle { unsigned maximise_cling; unsigned mirror_logs_separate; /* Force mirror logs on separate PVs? */ @@ -83,28 +85,10 @@ Signed-off-by: Guangliang Zhao /* * RAID devices require a metadata area that accompanies each -@@ -1598,6 +1601,7 @@ static struct alloc_handle *_alloc_init( - ah->parity_count = parity_count; - ah->region_size = region_size; - ah->alloc = alloc; -+ ah->segtype = segtype; - - /* - * For the purposes of allocation, area_count and parity_count are -@@ -1609,6 +1613,7 @@ static struct alloc_handle *_alloc_init( - ah->area_multiple = _calc_area_multiple(segtype, area_count + parity_count, stripes); - //FIXME: s/mirror_logs_separate/metadata_separate/ so it can be used by others? - ah->mirror_logs_separate = find_config_tree_bool(cmd, allocation_mirror_logs_require_separate_pvs_CFG, NULL); -+ ah->mirror_legs_separate = find_config_tree_bool(cmd, allocation_mirror_legs_require_separate_pvs_CFG, NULL); - - if (mirrors || stripes) - total_extents = new_extents; -@@ -2533,6 +2538,33 @@ static void _report_needed_allocation_sp - (metadata_count == 1) ? "" : "s", - metadata_size); +@@ -2542,6 +2545,32 @@ static int _limit_to_one_area_per_tag(st } -+ -+/* + + /* + * Return -1 if we don't need check tags, or there aren't any areas in alloc_status + * have the same tag with pva, the index otherwise. + */ @@ -130,10 +114,11 @@ Signed-off-by: Guangliang Zhao + return -1; +} + - /* ++/* * Returns 1 regardless of whether any space was found, except on error. */ -@@ -2663,6 +2695,10 @@ static int _find_some_parallel_space(str + static int _find_some_parallel_space(struct alloc_handle *ah, +@@ -2671,6 +2700,10 @@ static int _find_some_parallel_space(str continue; case USE_AREA: @@ -144,16 +129,32 @@ Signed-off-by: Guangliang Zhao /* * Except with ALLOC_ANYWHERE, replace first area with this * one which is smaller but still big enough. +@@ -3151,6 +3184,7 @@ static struct alloc_handle *_alloc_init( + ah->parity_count = parity_count; + ah->region_size = region_size; + ah->alloc = alloc; ++ ah->segtype = segtype; + + /* + * For the purposes of allocation, area_count and parity_count are +@@ -3162,6 +3196,7 @@ static struct alloc_handle *_alloc_init( + ah->area_multiple = _calc_area_multiple(segtype, area_count + parity_count, stripes); + //FIXME: s/mirror_logs_separate/metadata_separate/ so it can be used by others? + ah->mirror_logs_separate = find_config_tree_bool(cmd, allocation_mirror_logs_require_separate_pvs_CFG, NULL); ++ ah->mirror_legs_separate = find_config_tree_bool(cmd, allocation_mirror_legs_require_separate_pvs_CFG, NULL); + + if (mirrors || stripes) + total_extents = new_extents; --- a/man/lvcreate.8.in +++ b/man/lvcreate.8.in -@@ -284,6 +284,10 @@ will create a persistent log that is its - Using \fIcore\fP means the mirror is regenerated by copying the data +@@ -333,6 +333,10 @@ Using \fIcore\fP means the mirror is reg from the first device each time the logical volume is activated, like after every reboot. -+.br + .br +Every leg of the mirrored logical volume could be placed on the pvs with +same tag, see details(mirror_legs_require_separate_pvs) in lvm.conf. + - .br ++.br Using \fImirrored\fP will create a persistent log that is itself mirrored. .TP + .BR \-\-monitor " {" \fIy | \fIn }