1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
lvm2/tools
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
..
.exported_symbols generate liblvm2cmd exported symbols too 2010-06-25 18:23:10 +00:00
.gitignore gitignore: Update for in-place build. 2015-07-27 13:18:35 +01:00
args.h cleanup: rename usepolicies 2016-02-11 18:35:06 +01:00
cmdnames.h doc: change fsf address 2016-01-21 12:11:37 +01:00
commands.h toollib: add two phase pv processing code 2016-02-25 09:14:09 -06:00
dmsetup.c coverity: check cmd pointer exists 2016-02-23 21:40:16 +01:00
dumpconfig.c doc: change fsf address 2016-01-21 12:11:37 +01:00
errors.h doc: change fsf address 2016-01-21 12:11:37 +01:00
formats.c doc: change fsf address 2016-01-21 12:11:37 +01:00
lvchange.c gcc: cleanup some sign warnings 2016-02-23 12:25:25 +01:00
lvconvert_poll.c doc: change fsf address 2016-01-21 12:11:37 +01:00
lvconvert_poll.h doc: change fsf address 2016-01-21 12:11:37 +01:00
lvconvert.c gcc: cleanup some sign warnings 2016-02-23 12:25:25 +01:00
lvcreate.c doc: change fsf address 2016-01-21 12:11:37 +01:00
lvdisplay.c doc: change fsf address 2016-01-21 12:11:37 +01:00
lvextend.c doc: change fsf address 2016-01-21 12:11:37 +01:00
lvm2cmd-static.c doc: change fsf address 2016-01-21 12:11:37 +01:00
lvm2cmd.c doc: change fsf address 2016-01-21 12:11:37 +01:00
lvm2cmd.h doc: change fsf address 2016-01-21 12:11:37 +01:00
lvm2cmdline.h doc: change fsf address 2016-01-21 12:11:37 +01:00
lvm-static.c doc: change fsf address 2016-01-21 12:11:37 +01:00
lvm.c doc: change fsf address 2016-01-21 12:11:37 +01:00
lvmchange.c doc: change fsf address 2016-01-21 12:11:37 +01:00
lvmcmdlib.c doc: change fsf address 2016-01-21 12:11:37 +01:00
lvmcmdline.c doc: change fsf address 2016-01-21 12:11:37 +01:00
lvmdiskscan.c doc: change fsf address 2016-01-21 12:11:37 +01:00
lvpoll.c doc: change fsf address 2016-01-21 12:11:37 +01:00
lvreduce.c doc: change fsf address 2016-01-21 12:11:37 +01:00
lvremove.c doc: change fsf address 2016-01-21 12:11:37 +01:00
lvrename.c coverity: drop unused assignments 2016-02-23 21:40:16 +01:00
lvresize.c coverity: drop unused assignments 2016-02-23 21:40:16 +01:00
lvscan.c 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
polldaemon.c doc: change fsf address 2016-01-21 12:11:37 +01:00
pvchange.c toollib: add two phase pv processing code 2016-02-25 09:14:09 -06:00
pvck.c doc: change fsf address 2016-01-21 12:11:37 +01:00
pvcreate.c pvcreate: use the common toollib pv create 2016-02-25 09:14:09 -06:00
pvdisplay.c toollib: add two phase pv processing code 2016-02-25 09:14:09 -06:00
pvmove_poll.c doc: change fsf address 2016-01-21 12:11:37 +01:00
pvmove_poll.h doc: change fsf address 2016-01-21 12:11:37 +01:00
pvmove.c toollib: add two phase pv processing code 2016-02-25 09:14:09 -06:00
pvremove.c doc: change fsf address 2016-01-21 12:11:37 +01:00
pvresize.c toollib: add two phase pv processing code 2016-02-25 09:14:09 -06:00
pvscan.c toollib: add two phase pv processing code 2016-02-25 09:14:09 -06:00
reporter.c toollib: add two phase pv processing code 2016-02-25 09:14:09 -06:00
segtypes.c doc: change fsf address 2016-01-21 12:11:37 +01:00
stub.h doc: change fsf address 2016-01-21 12:11:37 +01:00
tags.c doc: change fsf address 2016-01-21 12:11:37 +01:00
tool.h doc: change fsf address 2016-01-21 12:11:37 +01:00
toollib.c toollib: add two phase pv processing code 2016-02-25 09:14:09 -06:00
toollib.h toollib: add two phase pv processing code 2016-02-25 09:14:09 -06:00
tools.h toollib: add two phase pv processing code 2016-02-25 09:14:09 -06:00
vgcfgbackup.c doc: change fsf address 2016-01-21 12:11:37 +01:00
vgcfgrestore.c doc: change fsf address 2016-01-21 12:11:37 +01:00
vgchange.c doc: change fsf address 2016-01-21 12:11:37 +01:00
vgck.c doc: change fsf address 2016-01-21 12:11:37 +01:00
vgconvert.c vgconvert: refactor to avoid pvcreate code 2016-02-25 09:14:09 -06:00
vgcreate.c vgcreate: use the common toollib pv create 2016-02-25 09:14:09 -06:00
vgdisplay.c doc: change fsf address 2016-01-21 12:11:37 +01:00
vgexport.c doc: change fsf address 2016-01-21 12:11:37 +01:00
vgextend.c vgextend: use the common toollib pv create 2016-02-25 09:14:09 -06:00
vgimport.c doc: change fsf address 2016-01-21 12:11:37 +01:00
vgmerge.c doc: change fsf address 2016-01-21 12:11:37 +01:00
vgmknodes.c doc: change fsf address 2016-01-21 12:11:37 +01:00
vgreduce.c toollib: add two phase pv processing code 2016-02-25 09:14:09 -06:00
vgremove.c doc: change fsf address 2016-01-21 12:11:37 +01:00
vgrename.c coverity: drop unused assignments 2016-02-23 21:40:16 +01:00
vgscan.c doc: change fsf address 2016-01-21 12:11:37 +01:00
vgsplit.c vgcreate: use the common toollib pv create 2016-02-25 09:14:09 -06:00