1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00

thin: no delete message for device_id 0

Since we always use device_id > 0, we could use
device_id == 0 to actually mark thinLV as an
LV we want to remove without delete message.
This commit is contained in:
Zdenek Kabelac 2020-09-25 22:42:53 +02:00
parent fc9e732811
commit e2eb1dc501

View File

@ -310,7 +310,8 @@ int detach_pool_lv(struct lv_segment *seg)
if (!detach_thin_external_origin(seg))
return_0;
if (!attach_pool_message(first_seg(seg->pool_lv),
if (seg->device_id && /* Only thins with device_id > 0 can be deleted */
!attach_pool_message(first_seg(seg->pool_lv),
DM_THIN_MESSAGE_DELETE,
NULL, seg->device_id, no_update))
return_0;