Subject: Re: RAIDframe: why are only "root" raidsets closed on reboot/halt?
To: Bill Studenmund <wrstuden@netbsd.org>
From: Daniel Carosone <dan@geek.com.au>
List: tech-kern
Date: 12/03/2002 10:55:55
On Mon, Dec 02, 2002 at 03:42:31PM -0800, Bill Studenmund wrote:
> I think it would work better to go through all the raid volumes and ccds
> and such, and mark them, "unconfig when not in use" or something. Then
> when you unmount the last file system on one of them, it tears itself
> down. The difference is the kernel does the tear-down, now a userland
> program.

Unconfig on close. This would be great for cgd(4) in some uses, as
well. The only problem is that the first close will happen before
the filesystem is actually mounted (as xxxconfig/ctl exits) so you
need to set the flag after mounting, and might hit EBUSY.

> The main difference is that you don't need to loop through things in
> userland, the right unwinding just happens.

Maybe I had it wrong, but I got the impression that the loop being
suggested was in the kernel, at shutdown after fs's are unmounted.

--
Dan.