Parallel hotplugging event issues
Sjoerd Simons
sjoerd at luon.net
Sun Mar 16 11:31:35 PDT 2008
Hi,
Attached is a patch to fix some basic issues with the parallel event
processing. The patch description has some more detailed information.
Unfortunately after this fix more issues show up. One specific issue i'm
seeing is that when pulling out my usb stick, the force unmounting fails to
work. Some analysis shows the issue is the following.
The device tree looks something like this
*- A: scsi host device
*- B: block device (full device)
*- C: block device (one partition on the device
When the usb device is pulled out removal events are received for all these
devices. The event dependency code properly detects that the full device
block device depends on the leaf block device. But not the relation between
the scsi_host and the block devices. So the event for A and C is handled in
parallel.
Now when a device is removed, all it's child devices get removed too.. So the
event for A removes device C, causing the handlers of C to get confused (as C
is gone).. What this shows is that purely using the sysfs path prefixes for
dependency information isn't enough, the relationship of devices as hal has
detected them needs to be taken into account too.
Personally i'm not sure if it would be good to have the parallel event
processing in the next release. It might be better to back it out for now,
get the release out. And merge it afterwards, so that there is some more time
to work out all the issues with parallelizing these things. I'm afraid it
will keep triggering a lot of little issues for a while.
Sjoerd
--
Normal times may possibly be over forever.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-hotplug-queue.patch
Type: text/x-diff
Size: 2950 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/hal/attachments/20080316/9b8c4aca/attachment.patch
More information about the hal
mailing list