mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
thin: add extra protection
Check explicitely created LV already has thin segment. As currenlty it's the only user - this patch should have no impact.
This commit is contained in:
parent
d682ad619a
commit
8cbe4a171e
@ -8500,8 +8500,9 @@ static struct logical_volume *_lv_create_an_lv(struct volume_group *vg,
|
||||
}
|
||||
if (lp->error_when_full)
|
||||
lv->status |= LV_ERROR_WHEN_FULL;
|
||||
} else if (pool_lv && lv_is_virtual(lv)) { /* going to be a thin volume */
|
||||
seg = first_seg(lv);
|
||||
} else if (pool_lv && lv_is_virtual(lv) && /* not yet thin LV */
|
||||
(seg = first_seg(lv)) &&
|
||||
seg_is_thin(seg)) { /* going to be a thin volume */
|
||||
pool_seg = first_seg(pool_lv);
|
||||
if (!(seg->device_id = get_free_pool_device_id(pool_seg)))
|
||||
return_NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user