Subject: Re: Proposal: File system suspension - prerequisite for snapshots
To: Greywolf <greywolf@starwolf.com>
From: Eric Haszlakiewicz <erh@nimenees.com>
List: tech-kern
Date: 08/14/2003 18:05:25
On Thu, Aug 14, 2003 at 03:10:29PM -0700, Greywolf wrote:
> In addition to being able to lock the fs via vfs_write_suspend and
> vfs_write_resume (I'm not currently viewing the original post, sorry),
> there's also the issue of how you want to do it.  What do you do with
> fds open for writing?  Do you vclose() them [is that right?], do you
> return EROFS, do you sleep, do you return EINTR...?
	I don't think you do anything.  If this is to be used for snapshots
you just want everything to pause for a sec while the snapshot takes
place, then continue along as if nothing at all had happened.
I'm pretty sure that means blocking _all_ writes, no matter how they
occur, so once whatever needs to get flushed gets flushed there's a consistent
unchanging image on the disk.

eric