Subject: Re: raidframe, cgd and parity errors
To: Roland Dowdeswell <>
From: Eric Haszlakiewicz <>
List: tech-kern
Date: 05/08/2005 16:39:04
On Sat, May 07, 2005 at 12:10:48PM -0400, Roland Dowdeswell wrote:
> On 1115313638 seconds since the Beginning of the UNIX epoch
> Eric Haszlakiewicz wrote:
> >	The only driver in dev/*.c that does shutdownhooks is ld.c, which
> >uses it to flush all ld devices (multiple times if there's more than
> >one ld!)  dev/ata/wd.c also uses it to flush the disk.
> >dev/cgd.c doesn't do anything like that, so maybe adding the equivalent
> >of "cgdconfig -u" would help.  Other devices, like ccd or vnd, should
> >probably do the same thing too.  vnd even has an unused vndshutdown()
> >that could probably be plugged right in to a shutdownhok_establish()
> >call.
> To get the ordering right, pseudo disks would need to register not
> a generic shutdown hook but rather register a shutdown hook with
> the underlying disk or filesystem which the underlying code would
> call prior to its own shutdown code.

	Don't the shutdown hooks get run in the reverse order that they are
established?  If so, then the shutdown hook for the later device (say a
vnd) would run before the one for the earlier device/operation (e.g. the cgd
that the vnd is on, and the mount operation for the filesystem on the cgd.)
and everything should unwind correctly.  No?