mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
thin: check and use layered origin lv
Code needs to check if the layer origin device is suspended, It's valid to create thinvolume snapshot of thinvolume which is also used as an old-style snapshot. In this case we need to check -real is suspended. When adding origin_only - add only layer thin volume. (in case it's also old-snapshot add only -real device)
This commit is contained in:
parent
925701d9f3
commit
97d36d5750
@ -1,5 +1,6 @@
|
||||
Version 2.02.99 -
|
||||
===================================
|
||||
Properly use snapshot layer for origin which is also thin volume.
|
||||
Avoid generating metadata backup when calling update_pool_lv().
|
||||
Send thin messages also for active thin pool and inactive thin volume.
|
||||
Add activation/auto_set_activation_skip to control activation skip flagging.
|
||||
|
@ -1681,7 +1681,7 @@ static int _add_lv_to_dtree(struct dev_manager *dm, struct dm_tree *dtree,
|
||||
return_0;
|
||||
|
||||
if (origin_only && lv_is_thin_volume(lv)) {
|
||||
if (!_add_dev_to_dtree(dm, dtree, lv, NULL))
|
||||
if (!_add_dev_to_dtree(dm, dtree, lv, lv_layer(lv)))
|
||||
return_0;
|
||||
#if 0
|
||||
/* ? Use origin_only to avoid 'deep' thin pool suspend ? */
|
||||
|
@ -298,7 +298,7 @@ static int _thin_pool_add_target_line(struct dev_manager *dm,
|
||||
case DM_THIN_MESSAGE_CREATE_THIN:
|
||||
origin = first_seg(lmsg->u.lv)->origin;
|
||||
/* Check if the origin is suspended */
|
||||
if (origin && lv_info(cmd, origin, 0, &info, 0, 0) &&
|
||||
if (origin && lv_info(cmd, origin, 1, &info, 0, 0) &&
|
||||
info.exists && !info.suspended) {
|
||||
/* Origin is not suspended, but the transaction may have been
|
||||
* already transfered, so test for transaction_id and
|
||||
|
Loading…
Reference in New Issue
Block a user