1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-28 20:25:52 +03:00
lvm2/lib/metadata
David Teigland a9940bd3c9 vgcreate: use the common toollib pv create
Use the new pvcreate_each_device() function from
toollib, previously added for pvcreate, in place
of the old pvcreate_vol().

This also requires shifting the location where the
lock is acquired for the new VG name.  The lock for
the new VG is supposed to be acquired before pvcreate.
This means splitting the vg_lock_newname() out of
vg_create(), and calling vg_lock_newname() directly
before pvcreate, and then calling the remainder of
vg_create() after pvcreate.

The new function vg_lock_and_create() now does
vg_lock_newname() + vg_create(), like the previous
version of vg_create().

The lock on the new VG name is released before the
pvcreate and reacquired after the pvcreate because
pvcreate needs to reset lvmcache, which doesn't work
when locks are held.  An exception could likely be
made for the new VG name lock, which would allow
vgcreate to hold the new VG name lock across the
pvcreate step.
2016-02-25 09:14:09 -06:00
..
cache_manip.c doc: change fsf address 2016-01-21 12:11:37 +01:00
lv_alloc.h doc: change fsf address 2016-01-21 12:11:37 +01:00
lv_manip.c coverity: ensure thin_pool_seg is not NULL 2016-02-23 21:40:17 +01:00
lv.c thin: report needs_check and fail state 2016-02-18 16:49:34 +01:00
lv.h doc: change fsf address 2016-01-21 12:11:37 +01:00
merge.c doc: change fsf address 2016-01-21 12:11:37 +01:00
metadata-exported.h vgcreate: use the common toollib pv create 2016-02-25 09:14:09 -06:00
metadata.c vgcreate: use the common toollib pv create 2016-02-25 09:14:09 -06:00
metadata.h metadata: refactor part of add_pv_to_vg 2016-02-25 09:14:09 -06:00
mirror.c doc: change fsf address 2016-01-21 12:11:37 +01:00
pool_manip.c doc: change fsf address 2016-01-21 12:11:37 +01:00
pv_alloc.h doc: change fsf address 2016-01-21 12:11:37 +01:00
pv_manip.c pvremove: add warn when removing PV in use 2016-02-23 14:40:30 +01:00
pv_map.c doc: change fsf address 2016-01-21 12:11:37 +01:00
pv_map.h doc: change fsf address 2016-01-21 12:11:37 +01:00
pv.c pv: use pv->fmt to check for fake PVs, not pv->vg 2016-02-15 15:52:13 +01:00
pv.h pv: add is_used_pv fn 2016-02-15 12:44:46 +01:00
raid_manip.c gcc: cleanup some sign warnings 2016-02-23 12:25:25 +01:00
replicator_manip.c doc: change fsf address 2016-01-21 12:11:37 +01:00
segtype.c doc: change fsf address 2016-01-21 12:11:37 +01:00
segtype.h doc: change fsf address 2016-01-21 12:11:37 +01:00
snapshot_manip.c doc: change fsf address 2016-01-21 12:11:37 +01:00
thin_manip.c gcc: cleanup some sign warnings 2016-02-23 12:25:25 +01:00
vg.c vg_write: add list of pvs to write 2016-02-25 09:14:09 -06:00
vg.h vg_write: add list of pvs to write 2016-02-25 09:14:09 -06:00