Re: Recovering from repository corruption
- From
Linus Torvalds <torvalds@linux-foundation.org>
- Date
- Jun 11, 2008, 01:39 UTC
- Message-ID
- <alpine.LFD.1.10.0806101836510.3101@woody.linux-foundation.org>
- In-Reply-To
- <alpine.LFD.1.10.0806102026430.23110@xanadu.home>
On Tue, 10 Jun 2008, Nicolas Pitre wrote:
Show 5 quoted lines
> > 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.
So you'd never have a half-written object file.
That said, I do agree that the bigger problem is that Denis' machine is simply so unreliable.
Linus