mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
dev-ext: issue error if external_device_info_source=udev and udev db record 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]. ...
This commit is contained in:
parent
6d0db97163
commit
f82e0210b7
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.135 -
|
Version 2.02.135 -
|
||||||
====================================
|
====================================
|
||||||
|
Issue error if external_device_info_source=udev and udev db record incomplete.
|
||||||
Fix passing of 32bit values through daemons (mostly lvmlockd).
|
Fix passing of 32bit values through daemons (mostly lvmlockd).
|
||||||
Use local memory pool for whole alloc_handle manipulation.
|
Use local memory pool for whole alloc_handle manipulation.
|
||||||
Add missing pointer validation after dm_get_next_target().
|
Add missing pointer validation after dm_get_next_target().
|
||||||
|
@ -60,6 +60,12 @@ static struct dev_ext *_dev_ext_get_udev(struct device *dev)
|
|||||||
if (!(udev_device = udev_device_new_from_devnum(udev, 'b', dev->dev)))
|
if (!(udev_device = udev_device_new_from_devnum(udev, 'b', dev->dev)))
|
||||||
return_NULL;
|
return_NULL;
|
||||||
|
|
||||||
|
if (!udev_device_get_is_initialized(udev_device)) {
|
||||||
|
/* Timeout or some other udev db inconsistency! */
|
||||||
|
log_error("Udev database has incomplete information about device %s.", dev_name(dev));
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
dev->ext.handle = (void *) udev_device;
|
dev->ext.handle = (void *) udev_device;
|
||||||
return &dev->ext;
|
return &dev->ext;
|
||||||
#else
|
#else
|
||||||
|
Loading…
Reference in New Issue
Block a user