[dm-devel] [PATCH 1/3] Send KOBJ_ADD event after dm resume ioctl.

Hannes Reinecke hare at suse.de
Fri Mar 19 09:42:58 UTC 2010


Milan Broz wrote:
> Block layer sends ADD uevent when new device is initialised.
> 
> But the device-mapper block devices are more complex,
> initialisation consists of allocating underlying device and
> loading mapping table.
> 
> Because from the userspace all block devices should behave
> the same, patch defines new flag indicating that ADD event
> should be suppressed in block layer.
> 
> If the flag is set, caller then take full responsibility
> for enabling and sending events later when device is ready
> to use.
> 

Please. DONT.

driver core sends out 'ADD' uevents whenever a device
is added (ie made visible) in /sys.
There is _no_ guarantee that a device is usable at this
point, hence there is is 'CHANGE' event which those device
afflicted by this sent out to signal to userspace the
device is now ready for use.

You are not alone here, S/390 DASD and qeth driver
behave the same.

And udev (and multipath :-) are pretty much aware of
the fact. And so should other userspace tools.

No need to fiddle around with events here. It'll
just serve to confuse userspace.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		      zSeries & Storage
hare at suse.de			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Markus Rex, HRB 16746 (AG Nürnberg)




More information about the dm-devel mailing list