Re: Force IDE cache flush on shutdown

From: Arjan van de Ven
Date: Thu May 06 2004 - 02:52:58 EST


On Thu, May 06, 2004 at 08:49:18AM +0100, Christoph Hellwig wrote:
> On Thu, May 06, 2004 at 09:04:49AM +0200, Arjan van de Ven wrote:
> > +static int ide_disk_notify_reboot (struct notifier_block *this, unsigned long event, void *x)
> > +{
> > + ide_hwif_t *hwif;
> > + ide_drive_t *drive;
> > + int i, unit;
> > +
> > + switch (event) {
> > + case SYS_HALT:
> > + case SYS_POWER_OFF:
> > + break;
> > + default:
> > + return NOTIFY_DONE;
> > + }
>
> Please don't use reboot notifiers in new driver code. The driver
> model has a ->shutdown method for that.

there is somewhat of a problem with that; the reboot command potentially
runs from the disk in question, so that might never get called since that
will keep things busy.

Attachment: pgp00000.pgp
Description: PGP signature