[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Ouch, here's an odd one.

Jay Weber writes:
> > If you are not running in "data=journal" mode, there is no guarantee that
> > the data made it to disk, only that the metadata is OK.  This is true for
> > ext2 as well.  I assume CVS should do a sync() or something to keep the
> > repository correct.  I guess we need to determine if that is true, otherwise
> > the bug is in CVS.
> Right, I was thinking along the same lines in that it seems buffered (in
> memory) data isn't accounted for in the case of metadata only journaling.
> I guess this is a risk you run when wanting the increased performance? :)

Actually, if you are running ext3 with data=ordered or data=writethrough,
the data should still be written to disk immediately if sync() is called.
I believe that sync() will cause a journal flush.  One time long ago
(ext3-0.0.2 or so) there was a problem with sync() not writing out buffers
to disk, and this was causing an oops when the filesystem was unmounted.
I thought we fixed the sync issues then, but something may have been
missed when we went to metadata-only journalling mode.

This is only an issue if the CVS server actually IS calling sync().
I would _assume_ so, but I don't have any real idea.  It is also a
possibility that there is something wrong with the ext3 recovery code,
but that would probably show up in other situations as well.

Cheers, Andreas
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]