[systemd-devel] udev re-reading partition tables on inotify
Phillip Susi
phill at thesusis.net
Thu Apr 10 16:47:49 UTC 2025
It appears that udev calls BLKRRPRT on a block device whenever it gets
an inotify event that some other process has closed an fd to it. This
causes all of the partitions on the disk to be deleted and ( hopefully )
re-added. This makes for a lot of seemingly useless udev events.
Even if they are re-added, this causes a race with other processes on
the system and can cause them to error because the partition
disappeared. Worse yet, the kernel may not even be able to read the
partition table on the disk ( it may have been provided by command line
or use of the partx tool ), in which case, this would just delete the
partitions.
Why does udev do this and could it stop?
More information about the systemd-devel
mailing list