Re: PATCH: Shutdown IDE before powering off.

Andrew Morton
2004-01-22T08:45:20Z

Nigel Cunningham <ncunningham@users.sourceforge.net> wrote:
>
> Hi.
>
> On Thu, 2004-01-22 at 21:13, John Bradford wrote:
> > > This spins down the disk(s) when you're just doing do a reboot. That's
> > > fairly irritating and could affect reboot times if one has many disks.
> >
> > I think it is an attempt to force some broken drives to flush their
> > cache, but I wonder whether it will simply move the problem from one
> > set of broken drives to another :-).
>
> Yes, they were trying to get caches flushed. If this attempt is
> misguided, that's fine. Is there a better way?

A couple of thoughts come to mind:

a) Don't do it if the user typed reboot - only do it if we're powering down.

b) Try to do a cache flush instead. If that fails (do we know?) then
power down the disk instead.