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

Re: what's the current wisdom on git over NFS/CIFS?

From
Johannes Sixt <j.sixt@viscovery.net>
Date
Jul 3, 2009, 09:18 UTC
Message-ID
<4A4DCCDD.9030901@viscovery.net>
In-Reply-To
<20090703085608.GA18757@dpotapov.dyndns.org>
Dmitry Potapov schrieb:
> On Fri, Jul 03, 2009 at 08:14:46AM +0200, Johannes Sixt wrote:
>> (We don't yet have an implementation of fsync() :-( )
> 
> Why?
Nobody cared. ;)
> It appears rather straightforward to me. Here is a patch that
> implements it. Or did I miss something?
Yes, but it's not critical; see below ;)
Show 13 quoted lines
> +int fsync(int fd)
> +{
> +	HANDLE h = (HANDLE) _get_osfhandle(fd);
> +	if (h == INVALID_HANDLE_VALUE)
> +	{
> +		errno = EBADF;
> +		return -1;
> +	}
> +	if (!FlushFileBuffers(h))
> +	{
> +		errno = err_win_to_posix(GetLastError());
> +		return -1;
> +	}

Do we ever call fsync on a pipe? In this case, fsync should fail with EINVAL, but your implementation would wait until the reader has drained all data.

> -static inline int fsync(int fd)
> -{ return 0; }
> +int fsync(int fd);

This declaration is now in the wrong section of mingw.h. And someone who cares should test it first; so I won't bless this patch as is.

Thanks anyway, -- Hannes

Previous: Dmitry PotapovNext: Linus Torvalds
Message 9 of 10 in “what's the current wisdom on git over NFS/CIFS?”
  1. Sitaram ChamartyJul 2, 2009
  2. Martin LanghoffJul 2, 2009
  3. Martin LanghoffJul 2, 2009
  4. Linus TorvaldsJul 2, 2009
  5. Sitaram ChamartyJul 3, 2009
  6. Johannes SixtJul 3, 2009
  7. Sitaram ChamartyJul 3, 2009
  8. Dmitry PotapovJul 3, 2009
  9. Johannes SixtJul 3, 2009
  10. Linus TorvaldsJul 3, 2009

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.