Subject: Re: [RFC] doshutdownhooks() and friends.
To: Matt Thomas <>
From: Allen Briggs <>
List: tech-kern
Date: 07/27/2006 22:04:06
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[0], 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  
> Now depending on results of the PREPARE, either call the ca_activate with
> (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?


                  Use NetBSD!