Re: [PATCH] Fix checkout of large files to network shares under Windows XP

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: René Scharfe
Date: Tuesday, April 20, 2010 - 1:49 pm

Am 20.04.2010 14:42, schrieb Sebastian Schuberth:

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.


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é
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] Fix checkout of large files to network shares unde ..., Sebastian Schuberth, (Mon Apr 19, 5:45 am)
Re: [PATCH] Fix checkout of large files to network shares ..., Johannes Schindelin, (Tue Apr 20, 2:15 am)
Re: [PATCH] Fix checkout of large files to network shares ..., Sebastian Schuberth, (Tue Apr 20, 5:42 am)
Re: [PATCH] Fix checkout of large files to network shares ..., Sebastian Schuberth, (Tue Apr 20, 7:21 am)
Re: [PATCH] Fix checkout of large files to network shares ..., René Scharfe, (Tue Apr 20, 1:49 pm)
Re: [PATCH] Fix checkout of large files to network shares ..., Sebastian Schuberth, (Fri Apr 30, 2:08 am)