git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git repo being corrupted?

From
LRLuciano Rocha <luciano@lsd.di.uminho.pt>
Date
Apr 7, 2008, 11:39 UTC
Message-ID
<20080407113921.GA13667@bit.office.eurotux.com>
In-Reply-To
<47FA03C4.9030104@diamand.org>
On Mon, Apr 07, 2008 at 12:21:40PM +0100, Luke Diamand wrote:
Show 9 quoted lines
> Luciano Rocha wrote:
> 
> >> Linux 2.6.22-3-amd64
> >> File system is XFS
> >> git version 1.5.4.4
> > 
> > You're using XFS. Did you have a power fail in the recent past?
> 
> How did you know?

XFS doesn't order metadata writes with data writes, so if the power fails, it can find an update in the journal but the data wasn't written. Then it fills the file with zeroes to the new size.

I've lost /etc/passwd once with that behaviour...

Also, ext3 doesn't order the metadata and data updates with data=writeback, but the default is data=ordered, which does.

I use xfs, but only when I know I have at least daily backups (or on systems with UPS and with UPS initiated orderly shutdowns).

-- 
lfr
0/0
Previous: Luke DiamandNext: David Brown
Message 4 of 6 in “git repo being corrupted?”
  1. Luke DiamandApr 7, 2008
  2. Luciano RochaApr 7, 2008
  3. Luke DiamandApr 7, 2008
  4. Luciano RochaApr 7, 2008
  5. David BrownApr 7, 2008
  6. Luciano RochaApr 7, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.