Re: Recovering from repository corruption
On Tue, 10 Jun 2008, Linus Torvalds wrote:
Show 13 quoted lines
>
>
> On Tue, 10 Jun 2008, Nicolas Pitre wrote:
> >
> > I think this only gives a false sense of security with a huge
> > performance cost. If the machine crashes at the right moment, the
> > object will still be half written/fsync'd and you'll be in the same
> > situation again.
>
> No you wouldn't.
>
> We do the write and the fsync() of the write to a _temporary_ filename. We
> do the rename _after_ the fsync.
Ah, true. That part somehow evaded my mind.
Nicolas