[systemd-devel] udev event vs kernel uevent ordering guarantees
Ilya Dryomov
idryomov at gmail.com
Wed Feb 10 20:13:20 CET 2016
On Wed, Feb 10, 2016 at 7:42 PM, Lennart Poettering
<lennart at poettering.net> wrote:
> On Wed, 10.02.16 19:40, Ilya Dryomov (idryomov at gmail.com) wrote:
>
>> Hello,
>>
>> (resending - one has to subscribe to post)
>>
>> What are udev event ordering guarantees? Specifically, if I get three
>> kernel uevents with seqnums i, i+1 and i+2, is it guaranteed that udev
>> will deliver them to the udev monitor socket in the same (i.e., seqnum)
>> order? I don't have any logs and the problem occurs very infrequently,
>> but what I'm seeing could be explained by udev delivering those three
>> events in i+1, i+2, i order. Is that possible?
>
> udev only maintains order between child and parent nodes, but not
> otherwise.
I see. So the idea is that everybody should subscribe to udev events
and then, because udev doesn't expose seqnums in any way, nobody should
even know they exist and, even though the kernel is guaranteed to
deliver certain uevents in certain order, udev is free to reorder their
udev counterparts, correct?
Can you elaborate on what constitutes a parent-child relationship?
E.g., in case of adding a block device, are bdi subsystem event and
block subsystem event related or not?
>
> Nobody should subscribe to kernel uevents directly, except for udev
> itself.
I'm looking at udev events - otherwise this question wouldn't have
formed itself ;)
Thanks,
Ilya
More information about the systemd-devel
mailing list