[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: ordered data



Hi,

On Wed, Oct 10, 2001 at 11:31:52AM -0600, Peter J. Braam wrote:
 
> I have a detailed question about ordered data writes.  
> 
> Suppose we (i.e. intermezzo) does a transaction, which is closed and
> then followed by an ordered write.  Let's assume the ordered write
> doesn't require new allocation metadata.  
> 
> Is the write still postponed until the first transaction has
> committed? 

First of all, it's not necessarily postponed: they can be merged into
a single compound transaction and committed together.  The question is
not whether the first write is strictly earlier than the second, but
whether the first write commits earlier *or together with* the second.
Only if you force a commit (eg. by setting a sync request on the first
transaction) will the second one be postponed.

If the second write is an append, then yes, the it will never be
visible before the first, because i_size is still transactional even
if there's no new allocation.

If the second write is an overwrite on top of existing data in the
middle of a file, then ordered mode makes no such guarantees: only
journaled mode (or specifying journaling on that specific file) will
help.

Cheers,
 Stephen





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]