1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
lvm2/libdm/dm-tools
Zdenek Kabelac a5042375de dmsetup: fix udev event handling for create
With newer kernels (>5.13)  DM_CREATE no longer generates
uevent for DM devices without table.
There are even no sysfs block device entries in such case,
although device has asigned major:minor and it is being listed
by 'dmsetup info'.

So this patch calculates amount of 'table' lines and in case
no table line comes from cmdline or stdin - waiting on cookie
is avoided generically instead of disabling just case with
option --notable - which then also skipped handling of an
option --addnodeoncreate (which is however historical and
should be avoided)

As a result there should be no leaking udev cookies and endlessly
waiting commands like this:

dmsetup create mytestdev  </dev/null
2022-11-25 16:41:53 +01:00
..
.gitignore dmfilemapd: Move to libdm/dm-tools 2018-06-14 14:27:19 +01:00
dmfilemapd.c cov: ignore leak of fd descriptor 2021-09-21 21:03:47 +02:00
dmsetup.c dmsetup: fix udev event handling for create 2022-11-25 16:41:53 +01:00
Makefile.in makefiles: static linking enhancements 2021-04-12 09:54:15 +02:00
util.h libdm: use libdm header util.h 2021-03-30 13:08:14 +02:00