From: "René Scharfe" <rene.scharfe@lsrfire.ath.cx>
To: Sebastian Schuberth <sschuberth@gmail.com>
Cc: git@vger.kernel.org, msysgit@googlegroups.com,
Johannes Schindelin <Johannes.Schindelin@gmx.de>,
Johannes Sixt <j.sixt@viscovery.net>
Subject: Re: [PATCH] Fix checkout of large files to network shares under Windows XP
Date: Tue, 20 Apr 2010 22:49:16 +0200 [thread overview]
Message-ID: <4BCE134C.8090802@lsrfire.ath.cx> (raw)
In-Reply-To: <t2xbdca99241004200542ud4e8ea5azcad918c37bcacf1a@mail.gmail.com>
Am 20.04.2010 14:42, schrieb Sebastian Schuberth:
>> Shouldn't the loop be left in the successful case, too? write(2) is
>> allowed to write less than requested, so the caller already needs to
>> deal with that case anyway.
>
> I prefer to make the wrapper as transparent as possible. If a direct
> call to write would not write less than requested, the wrapper should
> not either.
After the call failed, we don't know how many bytes would have been
written had it succeeded.
But I agree with Albert's reasoning to use the knowledge of a working
chunk size in order to minimize the number of write(2) calls. Otherwise
we'd have to search for a working size again and again, generating lots
of failing calls.
> I've updated work/issue-409 in 4msysgit.git accordingly.
This patch doesn't help in the test case I cobbled together quickly.
It's a Windows XP SP3 client on VMWare mapping a file share exported by
a Netapps filer, over a VPN. It's very slow, and I admit that it's a
weird setup. I wouldn't actually use it that way, but couldn't find
another file share momentarily.
I can check out a 1MB file, but checking out a 32MB file fails. I've
added a fprintf() to the loop and I can see that it's halving the size
and retries, as intended, until it eventually hits zero.
The file is created using the correct file size (32MB), though.The first
failed write(2) call needs to be undone somehow before we can try again,
it seems. Do we have to seek back or truncate the file?
Replacing the body of mingw_write() with the following line allows me to
check out the 32MB file, by the way:
return write(fd, buf, min(count, 1024 * 1024));
René
next prev parent reply other threads:[~2010-04-20 20:49 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 [this message]
2010-04-29 20:01 ` René Scharfe
2010-04-30 8:46 ` Johannes Sixt
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=4BCE134C.8090802@lsrfire.ath.cx \
--to=rene.scharfe@lsrfire.ath.cx \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=j.sixt@viscovery.net \
--cc=msysgit@googlegroups.com \
--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).