1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-10-23 23:33:15 +03:00

vgcfgrestore: Retain allocatable PV attribute.

pvchange -xn was getting lost.
All PVs were set to allocatable again after restore.

Moved setting ALLOCATABLE_PV outside pv_setup().
This commit is contained in:
Alasdair G Kergon
2016-01-14 00:46:45 +00:00
parent 9e9c757541
commit 01228b692b
4 changed files with 6 additions and 9 deletions

View File

@@ -383,7 +383,6 @@ static int _format1_pv_setup(const struct format_type *fmt,
struct physical_volume *pv,
struct volume_group *vg)
{
int r;
struct pvcreate_restorable_params rp = {.restorefile = NULL,
.id = {{0}},
.idp = NULL,
@@ -393,10 +392,7 @@ static int _format1_pv_setup(const struct format_type *fmt,
.extent_count = 0,
.extent_size = vg->extent_size};
if ((r = _format1_pv_initialise(fmt, -1, 0, 0, &rp, pv)))
pv->status |= ALLOCATABLE_PV;
return r;
return _format1_pv_initialise(fmt, -1, 0, 0, &rp, pv);
}
static int _format1_lv_setup(struct format_instance *fid, struct logical_volume *lv)