1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

lvconvert: fix conversion to 'mirrored' mirror log with larger regionsize

merge.c:_check_lv_segment() was checking regionsize vs. mirrored LV size on
any 'mirror/raid1/raid10' segment type including type 'mirrored' mirror logs.

Avoid the check only for 'mirrored' mirror logs to allow conversion from log
type 'disk' with regionsize > mirror log SubLV size.

As we disabled support for 'mirrored' mirror logs with
commit e82303fd6a which still conditionally
allows to enable it via global/support_mirrored_mirror_logs=1,
patch is mandatory for all distributions.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1712983
This commit is contained in:
Heinz Mauelshagen 2020-07-09 14:09:46 +02:00
parent d0faad0db3
commit 286a793c12
2 changed files with 3 additions and 1 deletions

View File

@ -1,5 +1,6 @@
Version 2.03.10 -
=================================
Fix conversion to 'mirrored' mirror log with larger regionsize.
Zero pool metadata on allocation (disable with allocation/zero_metadata=0).
Failure in zeroing or wiping will fail command (bypass with -Zn, -Wn).
Fix running out of free buffers for async writing for larger writes.

View File

@ -441,7 +441,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");