Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=052f28746d1d90883f63e…
Commit: 052f28746d1d90883f63e9fb1ef86efb03133fe7
Parent: b09ea3b6f764f6a853b816da65aeb3d0d351f77c
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Feb 28 17:04:26 2018 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Feb 28 21:15:55 2018 +0100
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.
---
WHATS_NEW | 1 +
lib/metadata/lv_manip.c | 2 +-
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/WHATS_NEW b/WHATS_NEW
index 6a0a0dc..46f66b0 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -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.
diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c
index 12f444b..28f00ab 100644
--- a/lib/metadata/lv_manip.c
+++ b/lib/metadata/lv_manip.c
@@ -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;
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=b09ea3b6f764f6a853b81…
Commit: b09ea3b6f764f6a853b816da65aeb3d0d351f77c
Parent: 749372caf3e977f2e3f69848e8535fea397695e6
Author: Zdenek Kabelac <zkabelac(a)redhat.com>
AuthorDate: Wed Feb 28 17:37:03 2018 +0100
Committer: Zdenek Kabelac <zkabelac(a)redhat.com>
CommitterDate: Wed Feb 28 21:08:40 2018 +0100
lvremove: drop unneded check
Checking here for cache_pool is not necessary and in effect
the check is not even right - since there are internal
states that do allow to active such LV.
---
lib/metadata/lv_manip.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c
index 35c805c..12f444b 100644
--- a/lib/metadata/lv_manip.c
+++ b/lib/metadata/lv_manip.c
@@ -6033,8 +6033,7 @@ int lv_remove_single(struct cmd_context *cmd, struct logical_volume *lv,
/* FIXME Ensure not referred to by another existing LVs */
ask_discard = find_config_tree_bool(cmd, devices_issue_discards_CFG, NULL);
- if (!lv_is_cache_pool(lv) && /* cache pool cannot be active */
- lv_is_active(lv)) {
+ if (lv_is_active(lv)) {
if (!lv_check_not_in_use(lv, 1))
return_0;