git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Sixt <j.sixt@viscovery.net>
To: "René Scharfe" <rene.scharfe@lsrfire.ath.cx>
Cc: Sebastian Schuberth <sschuberth@gmail.com>,
	git@vger.kernel.org,  msysgit@googlegroups.com,
	 Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH] Fix checkout of large files to network shares  under Windows XP
Date: Fri, 30 Apr 2010 10:46:52 +0200	[thread overview]
Message-ID: <4BDA98FC.1080007@viscovery.net> (raw)
In-Reply-To: <4BD9E58E.8020406@lsrfire.ath.cx>

Am 4/29/2010 22:01, schrieb René Scharfe:
> +#undef write
> +ssize_t mingw_write(int fd, const void *buf, size_t count)
> +{
> +	/*
> +	 * While write() calls to a file on a local disk are translated
> +	 * into WriteFile() calls with a maximum size of 64KB on Windows
> +	 * XP and 256KB on Vista, no such cap is placed on writes to
> +	 * files over the network on Windows XP.  Unfortunately, there
> +	 * seems to be a limit of 32MB-28KB on X64 and 64MB-32KB on x86;
> +	 * bigger writes fail on Windows XP.
> +	 * So we cap to a nice 31MB here to avoid write failures over
> +	 * the net without changing the number of WriteFile() calls in
> +	 * the local case.
> +	 */
> +	return write(fd, buf, min(count, 31 * 1024 * 1024));
> +}
> +

Thanks, I have verified that this fixes the problem in my setup as well.
I'll queue the patch with the below test case squashed in.

-- Hannes

diff --git a/t/t5705-clone-2gb.sh b/t/t5705-clone-2gb.sh
index adfaae8..8afbdd4 100755
--- a/t/t5705-clone-2gb.sh
+++ b/t/t5705-clone-2gb.sh
@@ -12,7 +12,7 @@ test_expect_success 'setup' '

 	git config pack.compression 0 &&
 	git config pack.depth 0 &&
-	blobsize=$((20*1024*1024)) &&
+	blobsize=$((100*1024*1024)) &&
 	blobcount=$((2*1024*1024*1024/$blobsize+1)) &&
 	i=1 &&
 	(while test $i -le $blobcount
@@ -36,9 +36,15 @@ test_expect_success 'setup' '

 '

-test_expect_success 'clone' '
+test_expect_success 'clone - bare' '

-	git clone --bare --no-hardlinks . clone
+	git clone --bare --no-hardlinks . clone-bare
+
+'
+
+test_expect_success 'clone - with worktree, file:// protocol' '
+
+	git clone file://. clone-wt

 '

  reply	other threads:[~2010-04-30  8:47 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-19 12:45 [PATCH] Fix checkout of large files to network shares under Windows XP Sebastian Schuberth
2010-04-19 20:41 ` Junio C Hamano
2010-04-20  9:15   ` Johannes Schindelin
2010-04-19 20:43 ` René Scharfe
2010-04-19 22:46   ` Albert Dvornik
2010-04-20  8:18   ` Johannes Sixt
2010-04-20 12:42   ` Sebastian Schuberth
2010-04-20 12:57     ` Johannes Sixt
2010-04-20 14:21       ` Sebastian Schuberth
2010-04-20 20:49     ` René Scharfe
2010-04-29 20:01       ` René Scharfe
2010-04-30  8:46         ` Johannes Sixt [this message]
2010-04-30  9:08         ` Sebastian Schuberth
     [not found]         ` <290b11b5-5dd5-4b83-a6f5-217797ebd5af@t8g2000yqk.googlegroups.com>
2010-10-16 17:23           ` René Scharfe
2010-10-17 10:54             ` Dmitry Potapov

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=4BDA98FC.1080007@viscovery.net \
    --to=j.sixt@viscovery.net \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=msysgit@googlegroups.com \
    --cc=rene.scharfe@lsrfire.ath.cx \
    --cc=sschuberth@gmail.com \
    /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).