"Stephen C. Tweedie" wrote:
> On Mon, Oct 30, 2000 at 09:34:27AM -0500, Chris Mason wrote:
> 
> > Yes, reiserfs could do it the same way, if we start putting a transaction
> > handle pointer in the task struct.
> >
> > But, I thought you required some way of knowing when the transaction was
> > broken up during an operation?  You don't really need it for
> > truncate/unlink, since those are supposed to be finished, even after a
> > crash in the middle.  file writes are different though, since you could end
> > up with a write partially done that isn't included in your log.
> 
> "partially done" means the same as "included in the log" as far as
> disk updates are concerned, but yes, for writes you can't necessarily
> make the same guarantees.  In ext3's case, that implies that writes
> larger than a certain size are just not guaranteed to be atomic: they
> may be broken into smaller chunks arbitrarily, but each such chunk
> will itself be atomic and will result in a consistent filesystem.

For Tux2, when I run into a write that's too big for a phase I'll set a
temporary checkpoint and release it when done.  But if the write is
bigger than the freespace on the filesystem I can't do that and have to
fall back to chunkwise consistency, and in that case kprint a warning.

Can I take the opportunity to ask you this: why do we serialize writes
vs truncates in the kernel?  Is it because POSIX tells us we have to, or
is it because it makes it easier to keep the kernel from oopsing?

--
Daniel
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to [EMAIL PROTECTED]

Reply via email to