git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Sixt <j.sixt@viscovery.net>
To: Dmitry Potapov <dpotapov@gmail.com>
Cc: Sitaram Chamarty <sitaramc@gmail.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	git@vger.kernel.org,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: Re: what's the current wisdom on git over NFS/CIFS?
Date: Fri, 03 Jul 2009 11:18:21 +0200	[thread overview]
Message-ID: <4A4DCCDD.9030901@viscovery.net> (raw)
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 ;)

> +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

  reply	other threads:[~2009-07-03  9:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-02 13:11 what's the current wisdom on git over NFS/CIFS? Sitaram Chamarty
2009-07-02 13:58 ` Martin Langhoff
2009-07-02 14:00   ` Martin Langhoff
2009-07-02 20:58 ` Linus Torvalds
2009-07-03  0:52   ` Sitaram Chamarty
2009-07-03  6:14     ` Johannes Sixt
2009-07-03  6:37       ` Sitaram Chamarty
2009-07-03  8:56       ` Dmitry Potapov
2009-07-03  9:18         ` Johannes Sixt [this message]
2009-07-03 16:08           ` Linus Torvalds

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A4DCCDD.9030901@viscovery.net \
    --to=j.sixt@viscovery.net \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=dpotapov@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=sitaramc@gmail.com \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).