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

Re: Recovering from repository corruption

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Jun 10, 2008, 23:00 UTC
Message-ID
<alpine.LFD.1.10.0806101554490.3101@woody.linux-foundation.org>
In-Reply-To
<alpine.LFD.1.10.0806101518590.3101@woody.linux-foundation.org>
On Tue, 10 Jun 2008, Linus Torvalds wrote:
Show 6 quoted lines
> 
> It's going to make big "git add" calls *much* slower, so I'm not very 
> happy about it (especially since we don't actually care that deeply about 
> the files really being there until much later, so doing something 
> asynchronous would be perfectly acceptable), but for you this is 
> definitely worth-while.
For me, on the whole kernel, on a pretty good system:
 - before:
	[torvalds@woody test-it-out]$ time git add .
	real    0m7.986s
	user    0m6.404s
	sys     0m1.456s
 - after:
	[torvalds@woody test-it-out]$ time ~/git/git-add .
	real    0m52.693s
	user    0m7.416s
	sys     0m2.516s
so it's definitely quite noticeable in that simplistic form. 

A more interesting patch would use aio_fsync(), and then just wait for them at the end with aio_return(). Not that I love AIO, but this is definitely a case where it would make sense to do (of course, systems without AIO support would then fall back to regular fsync()).

I will have to think about this.
			Linus
Previous: Linus TorvaldsNext: Nicolas Pitre
Message 17 of 31 in “Recovering from repository corruption”
  1. Denis BuenoJun 10, 2008
  2. Jakub NarebskiJun 10, 2008
  3. Denis BuenoJun 10, 2008
  4. Jakub NarebskiJun 10, 2008
  5. Denis BuenoJun 10, 2008
  6. Jakub NarebskiJun 10, 2008
  7. Denis BuenoJun 10, 2008
  8. Linus TorvaldsJun 10, 2008
  9. Denis BuenoJun 10, 2008
  10. Linus TorvaldsJun 10, 2008
  11. Denis BuenoJun 10, 2008
  12. Linus TorvaldsJun 10, 2008
  13. Denis BuenoJun 10, 2008
  14. TarmiganJun 10, 2008
  15. Denis BuenoJun 10, 2008
  16. Linus TorvaldsJun 10, 2008
  17. Linus TorvaldsJun 10, 2008
  18. Nicolas PitreJun 11, 2008
  19. Linus TorvaldsJun 11, 2008
  20. Nicolas PitreJun 11, 2008
  21. Denis BuenoJun 10, 2008
  22. Junio C HamanoJun 10, 2008
  23. To graft or not to graft... (Re: Recovering from repository corruption)Stephen R. van den Berg, Jun 11, 2008
  24. Jakub NarebskiJun 11, 2008
  25. Linus TorvaldsJun 11, 2008
  26. Johan HerlandJun 12, 2008
  27. Jeff KingJun 12, 2008
  28. Johan HerlandJun 12, 2008
  29. Stephen R. van den BergJun 12, 2008
  30. Nicolas PitreJun 10, 2008
  31. Denis BuenoJun 10, 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.