[ltp] Re: What are people using for Dock/Undocking scripts for their X60/61's?

Henrique de Moraes Holschuh linux-thinkpad@linux-thinkpad.org
Sat, 7 Mar 2009 13:28:20 -0300


On Sat, 07 Mar 2009, Richard Neill wrote:
>> This is obviously a big bad bug, and needs fixing. libata has eject
>> support, and that should be *ALSO* properly connected to the ACPI
>> bay/dock driver if needed, so that dumb things don't happen.
>
> What do we do if the disk is in use when it's ejected?  Eg a mounted  
> DVD-ROM with open files, or even a hard-drive?

We are to clean up, send an nasty warning to the user that he just Did
Something Really Bad (like we do if you hotunplug SATA or USB with open
filesystems), and don't crash.

> Seems that we should beep like crazy at the first stage of pulling out  
> the lever (there is a very loud sound available as one of the options in
>   echo X > /proc/acpi/ibm/beep      where X is a number between 1-20.)

The correct behaviour per the ThinkVantage UI, as far as I know, is to:

1. Issue a specific "failure" beep (low pitch) if the action CANNOT
proceed (e.g.  mounted filesystems).

2. Issue a specific "done" beep (high pitch) if the action was carried
out properly, and the bay is now disabled.

> After that, we still need to cope(i.e. not crash) when the user blindly  
> removes a disk which is mid-way through writing data.

Indeed.

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh