Re: [ACPI] PATCH-ACPI based CPU hotplug[2/6]-ACPI Eject interface support

From: Dmitry Torokhov <>
Date: 2004-09-21 15:51:36
On Monday 20 September 2004 08:38 pm, Keshavamurthy Anil S wrote:
> Currently I am handling both the surprise removal and the eject request in the same
> way, i,e send the notification to the userland and the usermode agent scripts
> is responsible for offlining of all the devices and then echoing onto eject file.

I actually think that on the highest level we should treat controlled and
surprise ejects differently. With controlled ejects the system (kernel +
userspace) can abort the sequence if something goes wrong while with surprise
eject the device is physically gone. Even if driver refuses to detach or we
have partition still mounted or something else if physical device is gone we
don't have any choice except for trimming the tree and doing whatever we need
to do.

> My worry is if we implement a generic handler for BUS_CHECK, then what would you 
> do if the device fails to remove, i.e what action to take if the device remove fails?

It could depend on parent's status. If parent is gone (surprise removal) we will
trim. If it is controlled removal and driver does not let device go we could
abort eject. 

Or we could always trim and offload the responsibility of having the system in
ready-to-eject state to the userspace. I.e. it should not write into "eject"
unless everything is unmounted/shut down/disconnected.

I am a bit light on implementation details though ;)

To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to
More majordomo info at
Received on Tue Sep 21 01:51:49 2004

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:30 EST