| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The "warnings" arg was used to enable logging of warnings
when reading a pv. This arg is turned into a set of flags
with the WARN_PV_READ flag matching the existing behavior.
A new flag WARN_INCONSISTENT is added that will cause
vg_read_internal() to log the "vg is not consistent"
warning, and the various callers do not need to log
this warning themselves.
A new vg_read flag READ_WARN_INCONSISTENT is used from
reporting to enable the WARN_INCONSISTENT flag in
vg_read_internal.
|
|
|
|
| |
In the non-repair case.
|
|
|
|
|
|
| |
process_each_pv now passes the orphan vg into
process_single, so the reporting code now needs
to cope with orphan vgs.
|
|
|
|
|
| |
When a pv is explicitly named for reduce, and is
not found in the vg, report and return an error.
|
|
|
|
|
|
|
|
| |
Technically this flag is only used by process_each_pv,
which lvmdiskscan does not use at the moment. But add
the flag to the lvmdiskscan command definition anyway
as "documentation", and in case the implementation is
changed to use process_each_pv.
|
| |
|
|
|
|
| |
Use a more descriptive name.
|
|
|
|
| |
toollib rework hadn't enabled "all vgs" for vgimport.
|
|
|
|
| |
to avoid conflict with any global definition.
|
| |
|
| |
|
|
|
|
|
|
| |
Process pvs by iterating through vgs, then iterating through
devs if the command wants to process non-pv devices. The
process_single function can always use the vg and pv args.
|
|
|
|
|
|
|
| |
The ENABLE_ALL_DEVS flag is added to the command structure
for commands that should process all devs (pvs and non-pvs)
when they call process_each_pv and the command includes the
--all arg. This will be used in a later process_each_pv patch.
|
|
|
|
|
| |
The failed_lvnames arg is no longer used since the
cmd_vg replicator wrapper was removed.
|
|
|
|
| |
Include in the error message the lv name args that were not found.
|
|
|
|
|
|
| |
- Copy the same form as the new process_each_vg.
- Replace unused struct cmd_vg and cmd_vg_read() replicator
code with struct vg and vg_read() directly.
|
|
|
|
|
|
|
|
| |
- Split the collecting of arguments from processing them.
- The split allows the two different loops through vgs to
be replaced by a single loop.
- Replace unused struct cmd_vg and cmd_vg_read() replicator
code with struct vg and vg_read() directly.
|
|
|
|
|
|
|
| |
The ENABLE_ALL_VGS flag is added to the command structure
for commands that should process all vgs when they call
process_each_vg or process_each_lv with no args.
This will be used in later patches to process_each functions.
|
|
|
|
|
| |
- test for Bug 1088153
- test lvextend does not reduce nor lvreduce extend LV
|
|
|
|
|
|
| |
Since we already check every characted in the message,
skip extra callback to strlen, and do the implicit
message length checking.
|
|
|
|
| |
Size is not used when msg->data is NULL.
|
|
|
|
|
| |
Let the compiler resolve cmd lookup and leave it to optimize it as it
needs.
|
|
|
|
|
|
|
| |
Switch to allocate buffer from heap, since it might be potentially
bigger when extremaly large set of volumes would be monitored.
In case of allocation failure send ENOMEM message.
Also implicitelly ignore msg->size when msg->data is NULL.
|
|
|
|
| |
Don't change next_time, when thread is already registered.
|
|
|
|
|
|
| |
Use directly dm_asprintf() to allocate buffer with message,
and properly detect failing on replacement of snprintf()
which also returns -1 on error.
|
| |
|
|
|
|
| |
Since we always know the string length, use simplier memcpy.
|
|
|
|
| |
Just simplify the function.
|
|
|
|
|
|
| |
Keep lvm2cmd interface hidden inside dmeventd_lvm
and use regular 1/0 return codes, this we may
avoid using lvm2cmd.h in other lvm2 plugins.
|
|
|
|
| |
Just cleanup things
|
|
|
|
| |
Zalloc mem is already zeroed.
|
|
|
|
|
|
| |
Use same way of setting _REENTRANT as in other
files - set it in the first included header file
(clvmd-common.h)
|
| |
|
|
|
|
|
| |
Remove those file which are not needed by .c files
or already include because the headers already needs them.
|
|
|
|
|
| |
Avoid dependency on implicit inclusion of stdarg.h with
libdevmapper.h.
|
|
|
|
|
|
|
| |
Ensure daemon-io.h is used as a generic header included
with configure defines before other headers.
(In future all lvm2 libraries should settle on a single lib.h header)
Rename couple defines to better match header file names.
|
|
|
|
| |
Just shift few lines
|
|
|
|
| |
Daemon lib is linked into lvm2cmd library.
|
|
|
|
| |
Make install should install already compiled/generated files.
|
|
|
|
|
| |
Make clean usually cleans all compiled files.
Make distclean cleans configure generated files
|
|
|
|
| |
Since libdaemon needs configure.h header, wait forl links.
|
|
|
|
| |
Before calling select, always set all struct members of timeout.
|
|
|
|
|
| |
Move check for _thread_registry list size behind mutex.
Use alloca() instead of buffer[count] (they are the same anyway)
|
|
|
|
|
| |
On error this function returns -1. Since the functions however
do not propagate error upward, it's rather cleanup change.
|
|
|
|
|
| |
Kernel supports upto 1M (20bit) minors.
TODO: convert to hash to reduce memory requirements
|
|
|
|
|
| |
Use cmd libmem mempool for name allocation, since mem mempool
is released after each clvmd command.
|
|
|
|
|
| |
Offer lock-free access to display virtual machine or clustered VG metadata
while it might be in use.
|
|
|
|
| |
If lock conversion failed it tried to unlock VG that was no longer locked.
|
|
|
|
| |
It's safer not to tell people an LV is inactive when we aren't sure.
|
|
|
|
|
|
|
|
|
| |
Config variables that are processed during setup prior to calling into
particular tools must not be accessed directly afterwards in case the
values already got overridden.
_process_config() already used the tests I'm removing here to call
lvmetad_set_active() and set up lvmetad_used().
|