Re: [PATCH] 2.4.x write barriers (updated for ext3)

From: Stephen C. Tweedie (sct@redhat.com)
Date: Fri Feb 22 2002 - 09:19:15 EST


Hi,

On Thu, Feb 21, 2002 at 06:30:20PM -0500, Chris Mason wrote:
 
> This makes it much easier to add support for ide writeback
> flushing to things like ext3 and lvm, where I want to make
> the minimal possible changes to make things safe.

Nice.

> There might be additional spots in ext3 where ordering needs to be
> enforced, I've included the ext3 code below in hopes of getting
> some comments.

No. However, there is another optimisation which we can make.

Most ext3 commits, in practice, are lazy, asynchronous commits, and we
only nedd BH_Ordered_Tag for that, not *_Flush. It would be easy
enough to track whether a given transaction has any synchronous
waiters, and if not, to use the async *_Tag request for the commit
block instead of forcing a flush.

We'd also have to track the sync status of the most recent
transaction, too, so that on fsync of a non-dirty file/inode, we make
sure that its data had been forced to disk by at least one synchronous
flush.

But that's really only a win for SCSI, where proper async ordered tags
are supported. For IDE, the single BH_Ordered_Flush is quite
sufficient.

Cheers,
 Stephen
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Feb 23 2002 - 21:00:41 EST