1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
lvm2/lib
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
..
activate coverity: use same arithmetic for both major and minor 2016-02-23 21:40:17 +01:00
cache coverity: check for info pointer existance 2016-02-23 21:40:16 +01:00
cache_segtype doc: change fsf address 2016-01-21 12:11:37 +01:00
commands config: fix verbose type to int 2016-02-11 18:30:39 +01:00
config config: fix verbose type to int 2016-02-11 18:30:39 +01:00
datastruct doc: change fsf address 2016-01-21 12:11:37 +01:00
device cleanup: use braces around macro params 2016-02-23 21:40:17 +01:00
display doc: change fsf address 2016-01-21 12:11:37 +01:00
error doc: change fsf address 2016-01-21 12:11:37 +01:00
filters filter: do not check for suspended devs in filter-usable in lvmetad mode 2016-02-03 14:57:36 +01:00
format1 lvmcache/lvmetad: cache PV extension version 2016-02-15 12:44:46 +01:00
format_pool lvmcache/lvmetad: cache PV extension version 2016-02-15 12:44:46 +01:00
format_text vgconvert: refactor to avoid pvcreate code 2016-02-25 09:14:09 -06:00
freeseg doc: change fsf address 2016-01-21 12:11:37 +01:00
label doc: change fsf address 2016-01-21 12:11:37 +01:00
locking lvmlockd: fix sparse snapshot case 2016-02-23 15:45:25 -06:00
log gcc: cleanup some sign warnings 2016-02-23 12:25:25 +01:00
lvmpolld doc: change fsf address 2016-01-21 12:11:37 +01:00
metadata vgcreate: use the common toollib pv create 2016-02-25 09:14:09 -06:00
mirror doc: change fsf address 2016-01-21 12:11:37 +01:00
misc coverity: check for zero length buffer 2016-02-23 21:40:16 +01:00
mm doc: change fsf address 2016-01-21 12:11:37 +01:00
properties doc: change fsf address 2016-01-21 12:11:37 +01:00
raid gcc: cleanup some sign warnings 2016-02-23 12:25:25 +01:00
replicator doc: change fsf address 2016-01-21 12:11:37 +01:00
report coverity: check for dm_snprintf 2016-02-23 21:40:17 +01:00
snapshot doc: change fsf address 2016-01-21 12:11:37 +01:00
striped doc: change fsf address 2016-01-21 12:11:37 +01:00
thin thin: report PERCENT_INVALID for failed pool 2016-02-18 16:45:42 +01:00
unknown doc: change fsf address 2016-01-21 12:11:37 +01:00
uuid doc: change fsf address 2016-01-21 12:11:37 +01:00
zero doc: change fsf address 2016-01-21 12:11:37 +01:00
Makefile.in doc: change fsf address 2016-01-21 12:11:37 +01:00