Ivan Voras <[EMAIL PROTECTED]> writes:

> Christian Laursen wrote:
>
>> Journaling also needs writes to be done in the correct order. You don't
>> want to write the real update to the filesystem before you have made sure
>
> Ok, but journal is (or should be) protected by checksumming or some
> kind of record markers, so invalid entries are not replayed.

That is not the issue. Recognizing valid journal entries should be easy
enough.

Consider the following sequence of events:

1. Data A is written to the journal
2. The journal is flushed to disk
3. Data A is written to the filesystem

Now consider what happens if the disk is reordering writes:

1. Data A is partially written to the journal
2. Data A is partially written to the filesystem
3. The system crashes

You now have an invalid journal entry for data A which will not be
replayed and some unkown amount of the data is already written to the
filesysten possibly leaving it in an inconsistent state.

-- 
Christian Laursen
_______________________________________________
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to