Thread (23 messages) 23 messages, 4 authors, 2014-10-10

Re: /sys/block/md126 still exists even after stopping the array

From: Francis Moreau <hidden>
Date: 2014-10-10 19:34:18

Hello Neil,

On 10/09/2014 11:55 AM, NeilBrown wrote:
On Thu, 09 Oct 2014 11:40:25 +0200 Francis Moreau [off-list ref]
wrote:
[...]
quoted
Yes, but reading sysfs is also racy. I was thinking that the advantage
of using udev is that it gives me a *consistent* (perhaps outdated)
snapshot of the device state.
In what sense do you think sysfs is racy?  What exactly do you want to do
with the udev event?

The event from the kernel to udev only contains the identity of the device
and the type of event (add,change,remove).

Some drivers add extra 'environment' information.
 - 'dm' adds a 'cookie'.
 - bcache add a 'CACHED_UUID' and 'CACHED_LABEL'
 - libata-acpi adds a 'BAY_EVENT'

but in general there is nothing extra.

If udev adds stuff (which is probably does), it is just as racy as anything
that you might determine and add yourself.
I was wrongly assuming that if I queried the udev DB through its library
it would have returned a consistent image of the state of the device
meaning that each property of the device would be coherent with the others.

But even if that was possible, it would be pointless since all accesses
to the device could still fail.

Thanks for enlighting me :)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help