summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* toollib: Remove a spurious (debug) log_error.dev-dct-process-part3Petr Rockai2013-08-211-1/+0
|
* toollib: Report errors on non-PV arguments to process_each_label.Petr Rockai2013-08-211-1/+5
|
* reporter: Deal correctly with dummy PVs/labels.Petr Rockai2013-08-212-6/+10
|
* pv_label: NULL result is not always an internal error.Petr Rockai2013-08-211-1/+4
|
* toollib: Avoid a spurious orphan unlock.Petr Rockai2013-08-211-14/+22
|
* test: add process-each-pv and process-each-pvresizeDavid Teigland2013-08-202-0/+1846
| | | | Test the commands that use process_each_pv.
* toollib: rewrite process_each_pvDavid Teigland2013-08-209-363/+531
| | | | | | | | | | | | | | | | | | | | | | The purpose of the series reworking process_each functions is to split process_each into "breadth first" phases rather than "depth first". Instead of fully processing each item before starting to process the next, the same phase of processing is applied to all. This approach allows for cleaner, simpler, and smarter processing. It will also allow locks to be acquired more easily. This fourth patch in the series converts process_each_pv to the same model as the new versions of process_each_vg,lv: read a vg, process each pv in it. There is an extra loop at the end to process devs that are not pvs, for commands that want to include those. The process_single function for a specific command should just use the vg and pv args that are provided from the process_each loop.
* toollib: close vg devs after process_single_vgdev-dct-process-part2David Teigland2013-08-145-7/+58
| | | | | | | | | | | | | | | | | | | | This test was failing at vg1: vgsplit-stacked.sh: vgchange -a n $vg $vg1 because a pv in $vg was an lv from $vg1, and because the devs in $vg were still open after processing $vg, the lv from $vg1 was still open, causing vgchange to fail on $vg1 with: Can't deactivate volume group "@PREFIX@vg1" with 1 open logical volume(s) I'm not sure that closing the devs this way is correct, because I've not been able to make sense of the way devices are closed otherwise. There seems to be a liberal sprinkling of dev_close_all() through the code. I also don't see how the devs would have been closed before the recent changes, but apparently they were because this test was passing.
* toollib: read vgs before processingDavid Teigland2013-08-143-35/+168
| | | | | | | | | | | | | | | | | | | | | | | The purpose of the series reworking process_each functions is to split process_each into "breadth first" phases rather than "depth first". Instead of fully processing each item before starting to process the next, the same phase of processing is applied to all. This approach allows for cleaner, simpler, and smarter processing. It will also allow locks to be acquired more easily. This third patch in the series reads all vgs in a single stage before processing each one. Locking is currently hidden within vg_read, so another effect of this change is that all locks are acquired and held together at the start, rather than being acquired during the processing. This is a step toward the introduction of a new phase that acquires all locks explicitly before the phase that reads each vg.
* test: add process-each-vg and process-each-lvdev-dct-process-part1David Teigland2013-08-132-0/+1218
| | | | | | | These test the toollib functions that select vgs/lvs to process based on command line args: empty, vg name(s), lv names(s), vg tag(s), lv tags(s), and combinations of all.
* toollib: remove replicator wrappers in lv processingDavid Teigland2013-08-133-61/+14
| | | | | | | The cmd_vg wrappers were not serving any purpose because a single vg was only ever added to the cmd_vg set. Remove the cmd_vg layer in process_each_lv to simplify the code.
* toollib: remove replicator wrappers in vg processingDavid Teigland2013-08-131-57/+41
| | | | | | | | | | The cmd_vg wrappers were not serving any purpose because a single vg was only ever added to the cmd_vg set. Remove the cmd_vg layer in process_each_vg to simplify the code. Pull the previous _process_one_vg into the calling function and clarify some of the logic.
* toollib: rework process_each_lvDavid Teigland2013-08-135-209/+265
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The purpose of the series reworking process_each functions is to split process_each into "breadth first" phases rather than "depth first". Instead of fully processing each item before starting to process the next, the same phase of processing is applied to all. This approach allows for cleaner, simpler, and smarter processing. It will also allow locks to be acquired more easily. This second patch in the series mainly splits collecting the arguments from the processing of the arguments, like the previous patch to process_each_vg. A new flag from commands makes explicit when process_each_lv may query for "all vgs" and run the command on each. A command is run against all vgs only when this flag is provided and no vg/lv names or tags are provided. Different commands may or may not want "no args" to expand to "all vgs", so it is better to make the desired behavior explicit. The behavior of "no args" remains the same but is now explicit. As before, when vg/lv names or tags are explicitly named on the command line, the command is only run against named vgs/lvs, or vgs/lvs with tags matching one provided. There should be no functional change.
* toollib: rework process_each_vgDavid Teigland2013-08-1310-105/+174
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The purpose of the series reworking process_each functions is to split process_each into "breadth first" phases rather than "depth first". Instead of fully processing each item before starting to process the next, the same phase of processing is applied to all. This approach allows for cleaner, simpler, and smarter processing. It will also allow locks to be acquired more easily. This first patch in the series mainly splits collecting the arguments from the processing of the arguments. The existing code has slightly different process_each loops depending on how the arguments are derived. With a separation between collecting args and processing them, a single process_each loop is used. A new flag from commands makes explicit when process_each_vg may query for "all vgs" and run the command on each. A command is run against all vgs only when this flag is provided and no vg names or tags are provided. Different commands may or may not want "no args" to expand to "all vgs", so it is better to make the desired behavior explicit. The behavior of "no args" remains the same but is now explicit. As before, when vg names or tags are explicitly named on the command line, the command is only run against named vgs, or vgs with tags matching one provided. There should be no functional change.
* report: Make PV UUID into a "label" type field.Petr Rockai2013-07-293-2/+18
|
* report: Iterate over labels instead of PVs for label-only reports.Petr Rockai2013-07-291-2/+2
|
* report: Make PMdaFree into a "label" field.Petr Rockai2013-07-292-4/+3
|
* report: Adapt _pvfmt_disp to label-based reporting.Petr Rockai2013-07-292-5/+5
|
* report: Add a proper "label" field type.Petr Rockai2013-07-293-11/+25
|
* report: Make dev_size and dev_name columns' type "label".Petr Rockai2013-07-292-8/+4
|
* label: Track a device pointer in struct label.Petr Rockai2013-07-292-1/+4
|
* metadata: Add a pv_label accessor (go from a PV to its label).Petr Rockai2013-07-292-0/+11
|
* metadata: Add lvmcache_info_mda_free as a companion to pv_mda_free.Petr Rockai2013-07-292-5/+13
|
* toollib: Implement process_each_label.Petr Rockai2013-07-292-0/+65
|
* labeller: Make the use of "private" as "fmt" explicit.Petr Rockai2013-07-299-13/+13
| | | | | | | All labellers always use the "private" (void *) field as the fmt pointer. Making this fact explicit in the type of the labeller simplifies the label reporting code which needs to extract the format. Moreover, it removes a number of error-prone casts from the code.
* metadata: Nuke the exported "pv_read" function.Petr Rockai2013-07-292-39/+0
|
* metadata: Fix handling of orphan PV linking & re-linking.Petr Rockai2013-07-291-3/+28
|
* metadata: Avoid pv_read in find_pv_by_name.Petr Rockai2013-07-291-14/+20
|
* pvremove: Avoid using pv_read in favour of scanning.Petr Rockai2013-07-291-36/+39
|
* test: Fix fallout from pv_read changes.Petr Rockai2013-07-292-15/+22
|
* pvresize: Do not use pv_read (get the PV from orphan VG).Petr Rockai2013-07-291-33/+18
|
* test: Add a test for the failing pv_read optimisation.Petr Rockai2013-07-291-0/+26
|
* toollib: Drop the pv_read optimisation.Petr Rockai2013-07-291-47/+46
| | | | | | | Only reading a single PV works correctly only in very limited circumstances. Moreover, we can't rely on the MDA available on the PV either, since it may be out of date in some circumstances (until now, we believed that PVs that have an empty MDA are always orphans, but this is not 100% reliable either).
* metadata: Do not try to check vg_name of a NULL PV.Petr Rockai2013-07-291-1/+1
|
* pvscan: Respect lvmetad (global) filter in --cache w/ a device.Petr Rockai2013-07-222-3/+31
|
* systemd: lvm2-activation-generator: use LOG_DEBUG/ERR severity for kmsgPeter Rajnoha2013-07-222-15/+21
|
* lvconvert: drop limit on thin pool conversionZdenek Kabelac2013-07-221-7/+0
|
* python: make install to prefix dirZdenek Kabelac2013-07-221-2/+2
| | | | Respect $prefix and avoid install to live system.
* dumpconfig: check conf tree was createdZdenek Kabelac2013-07-221-2/+5
| | | | Missing error path.
* liblvm: check lvmetad cache return valuesZdenek Kabelac2013-07-221-2/+6
| | | | Missing error path.
* cleanup: do not return stack contentZdenek Kabelac2013-07-221-3/+4
| | | | Return initialized struct in error path.
* coverity: pointer validationZdenek Kabelac2013-07-222-1/+11
| | | | | | Check for metadata_lv and make sure we have got proper thin pool segment. Check we are working with merging snapshot when adding merging target.
* liblvm: check extents_from_sizeZdenek Kabelac2013-07-221-12/+22
| | | | | Since the function may fail, check for error. (in release fix)
* cleanup: lvm complient styleZdenek Kabelac2013-07-221-650/+511
| | | | drop unused assignments.
* cleanup: simplier string resetZdenek Kabelac2013-07-221-1/+1
|
* cleanup: remove unused headersZdenek Kabelac2013-07-222-2/+0
|
* metadata: Fix tracking of read_status flags in _vg_make_handle.Petr Rockai2013-07-221-3/+3
|
* metadata: Do not ignore errors in _vg_update_vg_ondisk.Petr Rockai2013-07-221-9/+7
|
* TEST: Add a regression test for the ondisk/orphan bug.Petr Rockai2013-07-221-0/+15
|
* metadata: Do not try to maintain an ondisk copy of orphan VGs.Petr Rockai2013-07-221-5/+7
|