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

Re: Consolidate SHA1 object file close

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Jun 11, 2008, 17:46 UTC
Message-ID
<alpine.LFD.1.10.0806111037530.3101@woody.linux-foundation.org>
In-Reply-To
<alpine.LFD.1.10.0806110952290.3101@woody.linux-foundation.org>
On Wed, 11 Jun 2008, Linus Torvalds wrote:
> 
> Do you have people using special flags for your NFS mounts? And do you 
> know if there is some pattern to the client kernel versions when the 
> problem happens?

Oh, before I even go there - let's get the _really_ obvious case out of the way first.

If you are using a shared git object repository (why are you doing that, btw?), are people perhaps doing things like "git gc --auto" etc at the same time? Perhaps even unknowingly, thanks to autogc?

That's an absolute no-no. It works on a real POSIX filesystem, because even if you unlink a file that is in use by another process, the other process still has access to the data and the file won't be *really* removed until all users have gone away.

That's also true within a _single_ NFS client thanks to so-called "silly-renaming", but it is *not* true across multiple clients.

So if one client is doing some kind of gc and creates a new pack-file and then removes old loose objects, and another client has already looked up and opened that loose object (but not finished reading it), then when the file gets removed, you will literally lose the data on the other client and get a short read!

And nothing we can do can ever fix this very fundamental issue of NFS. NFS simply isn't an even remotely POSIX filesystem, even though it's set up to mostly _look_ like one when accessed from a single client.

In general, I would discourage people ever sharing object directories among multiple users except in a server kind of environment (eg kernel.org).

			Linus
Previous: Linus TorvaldsNext: Pierre Habouzit
Message 7 of 11 in “Consolidate SHA1 object file close”
  1. Linus TorvaldsJun 11, 2008
  2. Andreas EricssonJun 11, 2008
  3. Pierre HabouzitJun 11, 2008
  4. Linus TorvaldsJun 11, 2008
  5. Pierre HabouzitJun 11, 2008
  6. Linus TorvaldsJun 11, 2008
  7. Linus TorvaldsJun 11, 2008
  8. Pierre HabouzitJun 11, 2008
  9. Pierre HabouzitJun 11, 2008
  10. Linus TorvaldsJun 12, 2008
  11. Pierre HabouzitJun 12, 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.