mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
thin: external origins across thin-pool
Fix/support creation and usage of the external origin across thin-pools - so thin LV can use thin LV from some other thin-pool as external origin (read-only).
This commit is contained in:
parent
27bdd038a8
commit
edc91caffb
@ -9587,8 +9587,11 @@ static struct logical_volume *_lv_create_an_lv(struct volume_group *vg,
|
||||
/* Cache pool cannot be actived and zeroed */
|
||||
log_very_verbose("Cache pool is prepared.");
|
||||
} else if (lv_is_thin_volume(lv)) {
|
||||
/* For snapshot, suspend active thin origin first */
|
||||
if (origin_lv && lv_is_thin_volume(origin_lv) && lv_is_active(origin_lv)) {
|
||||
/* Optimize the case when taking a snapshot within same pool and thin origin
|
||||
* is an active LV, so we can pass thin message with suspend/resume of this LV. */
|
||||
if (origin_lv && lv_is_thin_volume(origin_lv) &&
|
||||
(first_seg(origin_lv)->pool_lv == pool_lv) &&
|
||||
lv_is_active(origin_lv)) {
|
||||
if (!(ret = suspend_lv_origin(cmd, origin_lv))) {
|
||||
log_error("Failed to suspend thin snapshot origin %s.",
|
||||
display_lvname(origin_lv));
|
||||
|
Loading…
Reference in New Issue
Block a user