Subject: Re: [RFC] doshutdownhooks() and friends.
To: Cherry G.Mathew <firstname.lastname@example.org>
From: Matt Thomas <email@example.com>
Date: 07/27/2006 08:11:40
On Jul 26, 2006, at 9:36 PM, Cherry G. Mathew wrote:
> On 4/22/06, Cherry G. Mathew <firstname.lastname@example.org> wrote:
>> This patch will re-work the doshutdownhooks() call, to pass a
>> indicating the nature of the shutdown; ie;
Thinking about this, if we are going to rework this calls, then we
should do it right. Most shutdownhooks should be also used in causing
devices and filesystems to quiesce before sleeping.
shutdownhooks should go away. instead we should have a two stage
process and, for devices, this should be using ca_activate in
struct cfattach. For filesystems, we should add a vfs_activate
to struct vfsops.
Ask the device to prepare to quiesce, it returns 0 if it is ready or
an errno if it's not possible. If it returns EAGAIN, call with PREPARE
again after deactivating next device. If at the end of the device list
and there are devices returning EAGAIN, either panic or fail the
Now depending on results of the PREPARE, either call the ca_activate
DVACT_DEACTIVATE_COMMIT (now really quiesce) or DVACT_DEACTIVATE_CANCEL
(resume normal operation). COMMIT and CANCEL not allowed to fail.