gjournal and Softupdates
Christian Laursen
xi at borderworlds.dk
Tue Sep 12 04:57:12 PDT 2006
Ivan Voras <ivoras at fer.hr> 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
More information about the freebsd-stable
mailing list