1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00
LVM2 mirror repository https://sourceware.org/lvm2/
Go to file
David Teigland 71671778ab toollib: add two phase pv processing code
This is common code for handling PV create/remove
that can be shared by pvcreate/vgcreate/vgextend/pvremove.
This does not change any commands to use the new code.

- Pull out the hidden equivalent of process_each_pv
  into an actual top level process_each_pv.

- Pull the prompts to the top level, and do not
  run any prompts while locks are held.
  The orphan lock is reacquired after any prompts are
  done, and the devices being created are checked for
  any change made while the lock was not held.

Previously, pvcreate_vol() was the shared function for
creating a PV for pvcreate, vgcreate, vgextend.
Now, it will be toollib function pvcreate_each_device().

pvcreate_vol() was called effectively as a helper, from
within vgcreate and vgextend code paths.
pvcreate_each_device() will be called at the same level
as other process_each functions.

One of the main problems with pvcreate_vol() is that
it included a hidden equivalent of process_each_pv for
each device being created:

  pvcreate_vol() -> _pvcreate_check() ->

   find_pv_by_name() -> get_pvs() ->

     get_pvs_internal() -> _get_pvs() -> get_vgids() ->

       /* equivalent to process_each_pv */
       dm_list_iterate_items(vgids)
         vg = vg_read_internal()
         dm_list_iterate_items(&vg->pvs)

pvcreate_each_device() reorganizes the code so that
each-VG-each-PV loop is done once, and uses the standard
process_each_pv function at the top level of the function.
2016-02-25 09:14:09 -06:00
autoconf autoconf: Fix py-compile permissions 2016-02-18 01:05:05 +00:00
conf conf: add metadata/check_pv_device_sizes 2016-01-22 14:16:00 +01:00
coverity doc: change fsf address 2016-01-21 12:11:37 +01:00
daemons lvmlockd: use new sanlock flag to avoid blocking 2016-02-24 10:10:59 -06:00
doc doc: change fsf address 2016-01-21 12:11:37 +01:00
include doc: change fsf address 2016-01-21 12:11:37 +01:00
lib toollib: add two phase pv processing code 2016-02-25 09:14:09 -06:00
libdaemon gcc: logical-op warning go away 2016-02-23 14:41:24 +01:00
libdm cleanup: use sizeof instead of macro. 2016-02-23 21:40:17 +01:00
liblvm doc: change fsf address 2016-01-21 12:11:37 +01:00
man man: lvs updates 2016-02-18 16:49:38 +01:00
nix lockd: Clean up spec 2015-07-04 14:36:57 +02:00
old-tests doc: change fsf address 2016-01-21 12:11:37 +01:00
po doc: change fsf address 2016-01-21 12:11:37 +01:00
python lvmdbus: Add new daemon. 2016-02-17 23:53:35 +00:00
report-generators doc: change fsf address 2016-01-21 12:11:37 +01:00
reports [REPORT-GENERATORS] cut down stylsheet.css to what we actually use 2010-07-21 10:00:38 +00:00
scripts lvmdbus: Add new daemon. 2016-02-17 23:53:35 +00:00
spec spec: Fix 04ab1fa572: Remove left-overs 2016-02-22 17:50:35 +01:00
test tests: include lvmlockd in default make check 2016-02-23 16:34:46 -06:00
tools toollib: add two phase pv processing code 2016-02-25 09:14:09 -06:00
udev doc: change fsf address 2016-01-21 12:11:37 +01:00
unit-tests doc: change fsf address 2016-01-21 12:11:37 +01:00
.gitignore lvmdbus: Add new daemon. 2016-02-17 23:53:35 +00:00
acinclude.m4 configure: detect st_ctim 2015-03-18 13:42:24 +01:00
aclocal.m4 lvmdbus: Add new daemon. 2016-02-17 23:53:35 +00:00
configure configure 2016-02-25 13:58:48 +00:00
configure.in configure: require sanlock 3.3.0 2016-02-24 13:22:23 -06:00
COPYING doc: change fsf address 2016-01-21 12:11:37 +01:00
COPYING.LIB Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1. 2007-08-20 20:55:30 +00:00
INSTALL quick review of docs 2008-11-04 17:49:22 +00:00
make.tmpl.in lvmdbus: Add new daemon. 2016-02-17 23:53:35 +00:00
Makefile.in make: Add check_lvmlockd_* targets to top-level 2016-02-23 18:34:46 +01:00
README README: fix link to lvm-devel mailing list 2015-03-31 15:44:00 +02:00
VERSION post-release 2016-02-21 23:37:48 +00:00
VERSION_DM post-release 2016-02-21 23:37:48 +00:00
WHATS_NEW pvremove: add warn when removing PV in use 2016-02-23 14:40:30 +01:00
WHATS_NEW_DM libdm: fix string boundary 2016-02-23 21:38:52 +01:00

This tree contains the LVM2 and device-mapper tools and libraries.

For more information about LVM2 read the changelog in the WHATS_NEW file.
Installation instructions are in INSTALL.

There is no warranty - see COPYING and COPYING.LIB.

Tarballs are available from:
  ftp://sources.redhat.com/pub/lvm2/

The source code is stored in git:
  http://git.fedorahosted.org/git/lvm2.git
  git clone git://git.fedorahosted.org/git/lvm2.git

Mailing list for general discussion related to LVM2:
  linux-lvm@redhat.com
  Subscribe from https://www.redhat.com/mailman/listinfo/linux-lvm

Mailing lists for LVM2 development, patches and commits:
  lvm-devel@redhat.com
  Subscribe from https://www.redhat.com/mailman/listinfo/lvm-devel

  lvm2-commits@lists.fedorahosted.org (Read-only archive of commits)
  Subscribe from https://fedorahosted.org/mailman/listinfo/lvm2-commits

Mailing list for device-mapper development, including kernel patches
and multipath-tools:
  dm-devel@redhat.com
  Subscribe from https://www.redhat.com/mailman/listinfo/dm-devel

The source code repository used until 7th June 2012 is accessible here:
  http://sources.redhat.com/cgi-bin/cvsweb.cgi/LVM2/?cvsroot=lvm2.