| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Test the commands that use process_each_pv.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
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).
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Respect $prefix and avoid install to live system.
|
|
|
|
| |
Missing error path.
|
|
|
|
| |
Missing error path.
|
|
|
|
| |
Return initialized struct in error path.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Since the function may fail, check for error.
(in release fix)
|
|
|
|
| |
drop unused assignments.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|