summaryrefslogtreecommitdiff
path: root/tools/archive.h
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2015-12-15 12:55:48 -0600
committerDavid Teigland <teigland@redhat.com>2015-12-15 13:49:29 -0600
commit5ee14eb0f200b7a8e8fd04c782c8d4177f054677 (patch)
tree82819d34a4b404fcbce3916833398da8c82efb43 /tools/archive.h
parent796461a9125a8324a63be154fc998245617e5990 (diff)
downloadlvm2-dev-dct-pvcreate-1.tar.gz
pvcreate: restructuring to use toollibdev-dct-pvcreate-1
- 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 out from under the VG locks. 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.
Diffstat (limited to 'tools/archive.h')
0 files changed, 0 insertions, 0 deletions