mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-04 09:18:36 +03:00
metadata: vg: alloc lvm1_system_id in alloc_vg sooner
This commit is contained in:
parent
eeaf3f2e88
commit
1a41e649a6
@ -41,6 +41,12 @@ struct volume_group *alloc_vg(const char *pool_name, struct cmd_context *cmd,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!(vg->lvm1_system_id = dm_pool_zalloc(vgmem, NAME_LEN + 1))) {
|
||||||
|
log_error("Failed to allocate VG systemd id.");
|
||||||
|
dm_pool_destroy(vgmem);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
vg->cmd = cmd;
|
vg->cmd = cmd;
|
||||||
vg->vgmem = vgmem;
|
vg->vgmem = vgmem;
|
||||||
vg->alloc = ALLOC_NORMAL;
|
vg->alloc = ALLOC_NORMAL;
|
||||||
@ -57,12 +63,6 @@ struct volume_group *alloc_vg(const char *pool_name, struct cmd_context *cmd,
|
|||||||
dm_list_init(&vg->tags);
|
dm_list_init(&vg->tags);
|
||||||
dm_list_init(&vg->removed_pvs);
|
dm_list_init(&vg->removed_pvs);
|
||||||
|
|
||||||
if (!(vg->lvm1_system_id = dm_pool_zalloc(vg->vgmem, NAME_LEN + 1))) {
|
|
||||||
log_error("Failed to allocate VG systemd id.");
|
|
||||||
dm_pool_destroy(vgmem);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
log_debug_mem("Allocated VG %s at %p.", vg->name, vg);
|
log_debug_mem("Allocated VG %s at %p.", vg->name, vg);
|
||||||
|
|
||||||
return vg;
|
return vg;
|
||||||
|
Loading…
Reference in New Issue
Block a user