Date: Tue, 12 Sep 2006 13:57:10 +0200 From: Christian Laursen <xi@borderworlds.dk> To: freebsd-stable@freebsd.org Subject: Re: gjournal and Softupdates Message-ID: <ygf64ftnvqh.fsf@dominion.borderworlds.dk> In-Reply-To: <ee668n$5uu$1@sea.gmane.org> (Ivan Voras's message of "Tue, 12 Sep 2006 13:38:49 %2B0200") References: <45066E19.2040405@kuehlbox.de> <ee5vat$fcb$1@sea.gmane.org> <ygfirjto0z2.fsf@dominion.borderworlds.dk> <ee63ue$tel$1@sea.gmane.org> <ygfejuhnx5g.fsf@dominion.borderworlds.dk> <ee668n$5uu$1@sea.gmane.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Ivan Voras <ivoras@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ygf64ftnvqh.fsf>