Subject: Re: how to bring a mounted filesystem to an almost clean state?
To: None <tech-kern@netbsd.org>
From: Daniel Carosone <dan@geek.com.au>
List: tech-kern
Date: 02/26/2003 11:42:24
On Tue, Feb 25, 2003 at 12:07:20PM -0600, David Young wrote:
>   cannot work, but here goes: mark every buffer with its generation,
>   the buffer's generation being the number of VFS_SYNC's done between
>   boot time and the time the buffer was most recently "dirtied." For

I like the sound of this, but also don't understand the details of
the present implementation.

One implication would be that you'd have to be careful about
overlapping/parallel sync() calls - at the simplest they'd need to
be serialised with some lock. Otherwise you need to deal with
multiple overlapping generations.

sync(2) doesn't block until the sync is complete; while it may be
nice if it did something probably assumes now that it doesn't.

--
Dan.