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

Re: running git-update-cache --refresh on different machines on a NFS share always ends up in a lot of io/cpu/time waste

From
Linus Torvalds <torvalds@osdl.org>
Date
May 22, 2005, 20:43 UTC
Message-ID
<Pine.LNX.4.58.0505221332590.2307@ppc970.osdl.org>
In-Reply-To
<20050522192734.GB23388@cip.informatik.uni-erlangen.de>
On Sun, 22 May 2005, Thomas Glanzmann wrote:
> 
> Is link() NFS safe? I thought only mkdir() for nfs?

Sorry, I meant "rename", not "link", and yes, it should be NFS-safe. It's how all the mailers do things too, afaik.

As to your update-cache problem, it seems to be just due to NFS stat caching. You generally should _not_ work on two machines at the same time, but it probably does the right thing in the end.

In general, I would suggest using separate GIT repositories over sharing them over NFS. As far as I'm concerned, I think NFS should work in the sense that you can work from different clients at _different_times_, and I'm certainly not going to guarantee that two different clients that work at the same time against the same repository will get sane results.

For example, if you do a "git-checkout-cache -f -a" at the same time, I won't guarantee that things won't race on the working files. Don't do it.

		Linus
Previous: Thomas GlanzmannNext: Thomas Glanzmann
Message 4 of 8 in “running git-update-cache --refresh on different machines on a NFS share always ends up in a lot of io/cpu/time waste”
  1. Thomas GlanzmannMay 22, 2005
  2. Linus TorvaldsMay 22, 2005
  3. Thomas GlanzmannMay 22, 2005
  4. Linus TorvaldsMay 22, 2005
  5. Don't include devicenumber into INODE_CHANGED test [WAS: Re: running git-update-cache --refresh on different machines on a NFS share always ends up in a lot of io/cpu/time waste]Thomas Glanzmann, May 22, 2005
  6. Alternate Patch: [PATCH] Don't include device number in cache invalidation when running on NFSThomas Glanzmann, May 22, 2005
  7. Linus TorvaldsMay 22, 2005
  8. Thomas GlanzmannMay 22, 2005

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.