[systemd-devel] udev re-reading partition tables on inotify
Phillip Susi
phill at thesusis.net
Tue May 6 13:11:00 UTC 2025
Nobody has any thoughts on this behavior that to me at least, appears to
be a bug?
Phillip Susi <phill at thesusis.net> writes:
> 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