Subject: Re: [RFC] doshutdownhooks() and friends.
To: Matt Thomas <email@example.com>
From: Cherry G. Mathew <firstname.lastname@example.org>
Date: 07/28/2006 20:00:51
On 7/28/06, Allen Briggs <email@example.com> wrote:
> On Thu, Jul 27, 2006 at 08:11:40AM -0700, Matt Thomas wrote:
> > 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.
> > (*wdc_ca.ca_activate)(wdc_cd.cd_devs, DVACT_DEACTIVATE_PREPARE);
> > 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
> > PREPARE.
> > Now depending on results of the PREPARE, either call the ca_activate with
> > DVACT_DEACTIVATE_COMMIT (now really quiesce) or DVACT_DEACTIVATE_CANCEL
> > (resume normal operation). COMMIT and CANCEL not allowed to fail.
> I like this proposal in principle, but it needs a some more fleshing
> out. Are either of you able and/or willing to flesh out the proposal
> and/or do the work to make it happen?
Why is this necessarily better than the current hooks based mechanism
? Isn't what Matt proposes doable with minor modifications to the
current mechanism ? I suspect wider scope ( powerhooks and general
driver infrastructure reworking ), which is why I'm asking in the