mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-22 17:35:59 +03:00
thin: do not create reserved LVs
When creating pool's metadata - create initial LV for clearing with some generic name and after the volume is create & cleared - rename it to reserved name '_tmeta/_cmeta'. We should not expose 'reserved' names for public LVs.
This commit is contained in:
parent
eadcea2dae
commit
6da14a82c6
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.108 -
|
Version 2.02.108 -
|
||||||
=================================
|
=================================
|
||||||
|
Do not use reserved _[tc]meta volumes for temporary LVs.
|
||||||
Leave backup pool metadata with _meta%d suffix instead of reserved _tmeta%d.
|
Leave backup pool metadata with _meta%d suffix instead of reserved _tmeta%d.
|
||||||
Allow RAID repair to reuse PVs from same image that suffered a failure.
|
Allow RAID repair to reuse PVs from same image that suffered a failure.
|
||||||
New RAID images now avoid allocation on any PVs in the same parent RAID LV.
|
New RAID images now avoid allocation on any PVs in the same parent RAID LV.
|
||||||
|
@ -552,7 +552,6 @@ struct logical_volume *alloc_pool_metadata(struct logical_volume *pool_lv,
|
|||||||
struct lvcreate_params lvc = {
|
struct lvcreate_params lvc = {
|
||||||
.activate = CHANGE_ALY,
|
.activate = CHANGE_ALY,
|
||||||
.alloc = alloc,
|
.alloc = alloc,
|
||||||
.lv_name = name,
|
|
||||||
.major = -1,
|
.major = -1,
|
||||||
.minor = -1,
|
.minor = -1,
|
||||||
.permission = LVM_READ | LVM_WRITE,
|
.permission = LVM_READ | LVM_WRITE,
|
||||||
@ -578,6 +577,9 @@ struct logical_volume *alloc_pool_metadata(struct logical_volume *pool_lv,
|
|||||||
if (!(metadata_lv = lv_create_single(pool_lv->vg, &lvc)))
|
if (!(metadata_lv = lv_create_single(pool_lv->vg, &lvc)))
|
||||||
return_0;
|
return_0;
|
||||||
|
|
||||||
|
if (!lv_rename_update(pool_lv->vg->cmd, metadata_lv, name, 0))
|
||||||
|
return_0;
|
||||||
|
|
||||||
return metadata_lv;
|
return metadata_lv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user