| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
lvmetad cannot properly manage duplicate PVs, so
when they are present, commands revert to scanning
devices. When the scanning finds that no duplicate
PVs are present, commands go back to use lvmetad.
|
|
|
|
|
|
|
|
| |
A flag is set in lvmetad when duplicate PVs have
been found. Commands check this flag and print
a warning about duplicate PVs if it's set.
When devices are scanned, the flag is set or
cleared in lvmetad.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In commands and lvmetad, if a pvid already exists on
one device, and a second device appears with the same
pvid, then ignore the second device.
Previously, commands and lvmetad attempted to juggle both
devices for the same PV.
Commands using lvmetad will no longer see persistent
warnings about duplicates because they won't be seen.
In 'pvs -a' or 'pvs dev', an ignored duplicate device
now looks like a non-PV, and the chosen device in a
duplicate pair looks like the only device for the PV.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move checking the lvmetad state, and the possible rescan,
out of lvmetad_send() to the start of the command.
Previously, the token mismatch and rescan would occur
within lvmetad_send() for some other request. Now,
the token mismatch is detected earlier, so the
rescan can be done before the main command is in
progress. Rescanning deep within the processing of
another command will disturb the lvmcache state of
that other command.
A rescan already exists at the start of the command
for the case where foreign VGs are going to be read.
This same rescan is now also performed when there is
an lvmetad token mismatch (from a changed global_filter).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
New hash table functions are added that allow for
multiple entries with the same key. Use of the
vgname_to_vgid hash table is converted to these
new functions since there are multiple entries
in vgname_to_vgid that have the same key (vgname).
When multiple VGs with the same name exist, commands
that reference only a VG name will fail saying the
VG could not be found (that error message could be
improved.) Any command that works with the select
option can access one of the VGs with -S vg_uuid=X.
vgrename is a special case that allows the first VG
name arg to be replaced by a uuid, which also works.
(The existing hash table implementation is not well
suited for handling this case, but it works ok with
the new extensions. Changing lvmetad to use its own
custom hash tables may be preferable at some point.)
|
| |
|
|
|
|
|
| |
Mark impossible paths with internal errors.
Also replace 'strcmp() with more readable seg_is...()
|
|
|
|
|
| |
Reduce number of false-positives and model functions in a way
Coverity is able to understand it.
|
|
|
|
|
|
|
|
|
|
| |
Here Coverity cannot see the pointer cannot be NULL in this
code path - opened coverity case #00531860.
We could make a model to avoid seeing related reports,
but then we loose coverage for modeled function.
So decided to add minor hint for this case.
|
|
|
|
| |
When delay_dev is missing these tests are just racy.
|
|
|
|
| |
Use display_lvname.
|
|
|
|
|
| |
Use a single statement to check all LVs we want to
deref via get_only_segment_using_this_lv().
|
|
|
|
| |
Patch missed also check this pointer dereference.
|
|
|
|
| |
Revert missed to drop this extra check.
|
|
|
|
|
| |
At least check result and trace it.
However we may need better error reaction in this case.
|
|
|
|
| |
Enusure we will not divide by 0.
|
|
|
|
|
| |
Coverity complains about NULL deref - while this cannot currently
happen, put in secure INTERNAL_ERROR.
|
|
|
|
| |
Use goto_out on error paths.
|
| |
|
|
|
|
|
|
|
| |
Recent change 2c8d6f5c90d5be62b48ba2881f2a6631091dc5af
actually droped restart when the reason of failing open is missing
device completely - check for ENOENT now as another reason
to start new dmeventd server (when there is no systemd to maintain it).
|
|
|
|
|
| |
Do not support str lists without mempools. Instead, create temporary
mempool where necessary (currently only _get_report_options fn).
|
|
|
|
|
|
| |
The udev_device_get_is_initialized is available since libudev version
165. Older versions are still used somewhere (e.g. RHEL6). So better
check for this fn and use it only if it's available.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
incomplete
Udev db records are marked as not initialized (incomplete) on timeout.
Issue an error message whenever LVM finds such records so users are
aware that something's going wrong with udev db.
This is important in case we use devices/external_device_info_source="udev"
where udev database records are used to do various filtering decisions.
For example:
udev log of timed out worker:
Nov 11 13:02:25 raw.virt systemd-udevd[607]: seq 1997 '/devices/virtual/block/dm-2' is taking a long time
Nov 11 13:04:25 raw.virt systemd-udevd[607]: seq 1997 '/devices/virtual/block/dm-2' killed
Nov 11 13:04:25 raw.virt systemd-udevd[607]: worker [11221] terminated by signal 9 (Killed)
Nov 11 13:04:25 raw.virt systemd-udevd[607]: worker [11221] failed while handling '/devices/virtual/block/dm-2'
...
LVM also issues error message visibly if incomplete udev db record is found,
devices/external_device_info_source="udev" is set:
$ pvs
Udev database has incomplete information about device /dev/dm-2.
Failed to get external handle for device /dev/dm-2 [udev].
...
|
|
|
|
|
| |
Coverity noticed recent fix of an error path missed to
release 'dmt' - reoder code to ensure 'dmt' is released.
|
|
|
|
|
|
|
|
| |
Coverity noticed this condition is always false and the error
path could never be visited.
So check for all mismatches of supported messages
and actually mark log_error as internal error.
|
| |
|
|
|
|
|
| |
Coverity didn't liked assign with && expression, so use trick.
It does not complain against this prefix incremenent operation.
|
|
|
|
|
|
|
|
| |
When the first arg is a UUID and vgrename translates
that UUID to a current VG name, the old and new VG
names are not being checked for equality. If they
are equal, it produces an internal error rather than
a proper error.
|
|
|
|
| |
with better alternatives.
|
|
|
|
| |
These are unnecessary or not useful.
|
|
|
|
| |
Try to run as much of test which could run without delay_dev.
|
|
|
|
| |
indicating when no global lockspace exists.
|
|
|
|
| |
Coverity cannot see the string cannot be NULL so make it explicit.
|
|
|
|
| |
Coverity is not smart enough to detect this case could never happen.
|
|
|
|
|
| |
Coverity suggest to stay on the 'safe' side and widen operators early
so 64bit offset is made from 64bit arithmentic.
|
|
|
|
| |
Detect error from function and report them.
|
| |
|
|
|
|
| |
Coverity notices they are not really needed.
|
| |
|
|
|
|
|
|
| |
Since %d is now prohibited for its great confusion,
replace it with FMTd64 and correctly converted int64_t
parameter.
|
| |
|
|
|
|
|
| |
Do not let pass %d and print internal error when found one.
Require all users to use FMTd64 - it's seriously confusing.
|
|
|
|
| |
daemon_reply_simple() eats just 64bit numbers - so make it explicit.
|
|
|
|
|
|
|
|
| |
Use delay_dev to slow down mirror sync so we could more
easily check for race and proper reject of parallel mirror
leg addition/reduction.
Also expose fail in mirror allocation of parallel leg.
|
|
|
|
|
|
|
|
| |
Rather then skipping whole test - just do not use it.
Failing tests that have required delay need to deal with reality
and shell either check for HAVE_DM_DELAY and skip portion
of test or using should when needed.
|
| |
|
|
|
|
|
|
|
| |
Older gcc somehow thinks there is a path of using
subcommand uninitilized.
So make it more obvious there is no such one.
|
|
|
|
|
| |
Keep seqno as 32bit value.
Also use '_' prefix for local _update_metadata.
|
|
|
|
|
| |
Coverity: add this extra comment, to let Coverity know this
slightly changed copy&paste code is intentional.
|
|
|
|
|
| |
Pass const strings to printf(),
and use struct names directly instead of creating unused vars on stack.
|