mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
lvresize: check external origin with new size
Instead of checking with existing size of external origin LV, use correctly the new 'wanted' size of this LV whether it fits the limitiation requirements for older thin-pool target. Otherwise code started to the the resize, updates metadata and just fails during 'resize' in case the LV was active. For inactive LV operation could have actually passed.
This commit is contained in:
parent
b09ea3b6f7
commit
052f28746d
@ -1,5 +1,6 @@
|
||||
Version 2.02.178 -
|
||||
=====================================
|
||||
Fix compatibility size test of extended external origin.
|
||||
Add external_origin visiting in for_each_sub_lv().
|
||||
Ensure cluster commands drop their device cache before locking VG.
|
||||
Do not report LV as remotely active when it's locally exclusive in cluster.
|
||||
|
@ -5334,7 +5334,7 @@ static int _lvresize_check_type(const struct logical_volume *lv,
|
||||
|
||||
/* Validate thin target supports bigger size of thin volume then external origin */
|
||||
if (lv_is_thin_volume(lv) && first_seg(lv)->external_lv &&
|
||||
(lv->size > first_seg(lv)->external_lv->size) &&
|
||||
(lp->extents > first_seg(lv)->external_lv->le_count) &&
|
||||
!thin_pool_feature_supported(first_seg(lv)->pool_lv, THIN_FEATURE_EXTERNAL_ORIGIN_EXTEND)) {
|
||||
log_error("Thin target does not support external origin smaller then thin volume.");
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user