From a5042375de3fd7146906614bffbcc960349c2b20 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Fri, 25 Nov 2022 15:45:47 +0100 Subject: 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