Re: jbd bug(s) (?)

Stephen C. Tweedie (sct@redhat.com)
Thu, 26 Sep 2002 13:27:23 +0100


Hi,

On Thu, Sep 26, 2002 at 02:21:24PM +0200, Jakob Oestergaard wrote:

> Originally it was my impression that the index was written fairly
> frequently, *and* that you did not have the atomic-sector-write
> guarantee.

The index is only updated when we purge stuff out of the journal.
That can still be quite frequent on a really busy journal, but it's
definitely not a required part of a transaction.

That's deliberate --- the ext3 journal is designed to be written as
sequentially as possible, so seeking to the index block is an expense
which we try to avoid.

> RAID wouldn't save me in the case where the journal index is screwed due
> to a partial sector write and a power loss.

A partial sector write is essentially impossible. It's unlikely that
the data on disk would be synchronised beyond the point at which the
write stopped, and even if it was, the CRC would be invalid, so you'd
get a bad sector error return on subsequent attempts to read that data
--- you'd not be given silently corrupt data.

Making parts of the disk suddenly unreadable on power-fail is
generally considered a bad thing, though, so modern disks go to great
lengths to ensure the write finishes.

--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/