Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Device-mapper Development (http://www.linux-archive.org/device-mapper-development/)
-   -   Send KOBJ_ADD event after dm resume ioctl. (http://www.linux-archive.org/device-mapper-development/344058-send-kobj_add-event-after-dm-resume-ioctl.html)

Hannes Reinecke 03-19-2010 01:08 PM

Send KOBJ_ADD event after dm resume ioctl.
 
Peter Rajnoha wrote:
> On 03/19/2010 10:24 AM, Kay Sievers wrote:
>> No, that's what "change" is for, and we already have these "change"
>> events for dm. Udev does not care if the device is ready or not, it
>> synchronizes /sys and /dev, and that works just fine with "change"
>> events.
>
> CHANGE events, not quite... We can't even rely on these.
>
> Just to mention, there's also a CHANGE event generated when
> read-only flag is set for a device (this is not managed by
> device-mapper of course). This one is generated even before
> the actual CHANGE event that is generated when DM device is
> ready to be used.
>
As mentioned earlier, CHANGE events do not carry any
information about _what_ has changed.
The udev rules / programs are expected to check for
this themselves. So from that point of view yes, you
cannot simply wait for 'the' CHANGE event as you
might get more than one.

I guess most of this discussion could be solved if
the CHANGE events would be modify to attach some
enviroment variables indicating the nature of the change.

EG adding 'DM_STATE=LIVE' or whatever is appropriate
here.

Cheers,

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

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel


All times are GMT. The time now is 06:27 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.