From: Jack Holloway <forum2@sprucehead.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 6237@debbugs.gnu.org
Subject: bug#6237: 23.2; INSUFFICIENT RESOURCES writing file via CIFS
Date: Sat, 22 May 2010 00:49:56 -0700 [thread overview]
Message-ID: <4BF78CA4.2090209@sprucehead.com> (raw)
In-Reply-To: <83fx1kzbuh.fsf@gnu.org>
On 5/21/2010 11:31 PM, Eli Zaretskii wrote:
>> Date: Fri, 21 May 2010 19:12:41 -0700
>> From: Jack Holloway<forum2@sprucehead.com>
>> Cc: 6237@debbugs.gnu.org
>>
>> Saving a 32MB file to a CIFS path fails. Examining Procmon
>> events shows a return status "INSUFFICIENT RESOURCES" on a WriteFile
>> with length 32MB.
>>
>> Perhaps write-region should break down the write into a series
>> of blksize writes?
>>
> Can you see which size of a single write succeeds with that volume?
>
> Also, could you see how many bytes did it succeed to write before the
> failure?
>
I tried successively larger buffers starting at 32KB, viz.
Written 32K
Written 48K
Written 64K
Written 96K
Written 128K
Written 192K
Written 256K
Written 384K
Written 512K
Written 768K
Written 1024K
Written 1536K
Written 2048K
Written 3072K
Written 4096K
Written 6144K
Written 8192K
Written 12288K
Written 16384K
Written 24576K
!!! Unable to append - (error IO error writing
z:/Temp/test/temp-write-once-032768: Invalid argument)
!!! Unable to append - (error IO error writing
z:/Temp/test/temp-write-once-049152: Invalid argument)
!!! Unable to append - (error IO error writing
z:/Temp/test/temp-write-once-065536: Invalid argument)
!!! Unable to append - (error IO error writing
z:/Temp/test/temp-write-once-098304: Invalid argument)
!!! Unable to append - (error IO error writing
z:/Temp/test/temp-write-once-131072: Invalid argument)
!!! Unable to append - (error IO error writing
z:/Temp/test/temp-write-once-196608: Invalid argument)
The would-be 32MB file exists, with zero length.
>> copy-file doesn't have this problem.
>>
> The MS-Windows version of copy-file doesn't use WriteFile. It uses
> CopyFile.
>
> Anyway, how did you use copy-file? Was the source file on the same
> CIFS volume, or was it on a local disk?
>
>
I've tried all 4 combinations of {internal, CIFS}*{src,dest} with
transfer sizes up to
196MB without a problem,
I was referring to DEFUN ("copy-file",...) in fileio.c which writes in
16K blocks,
...
while ((n = emacs_read (ifd, buf, sizeof buf)) > 0)
if (emacs_write (ofd, buf, n) != n)
report_file_error ("I/O error", Fcons (newname, Qnil));
...
as opposed to DEFUN ("write-region",...) which, in this case, writes the
entire buffer
...
else if (XINT (start) != XINT (end))
{
failure = 0 > a_write (desc, Qnil,
XINT (start), XINT (end) - XINT (start),
&annotations, &coding);
save_errno = errno;
}
...
I know nothing about Windows internals, but it would seem that some
downstream
WinNT I/O routine can't handle 32MB or larger writes, so perhaps
write-region could segment
the write? The annotations hair makes it hard for me to see if this is
easy.
Jack
next prev parent reply other threads:[~2010-05-22 7:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-21 2:57 bug#6237: 23.2; INSUFFICIENT RESOURCES writing file via CIFS Jack Holloway
2010-05-22 1:51 ` Stefan Monnier
2010-05-22 2:12 ` Jack Holloway
2010-05-22 6:31 ` Eli Zaretskii
2010-05-22 7:49 ` Jack Holloway [this message]
2010-05-22 8:38 ` Eli Zaretskii
2010-05-22 9:39 ` Eli Zaretskii
2010-05-22 19:13 ` Eli Zaretskii
2010-05-22 8:08 ` Andreas Schwab
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=4BF78CA4.2090209@sprucehead.com \
--to=forum2@sprucehead.com \
--cc=6237@debbugs.gnu.org \
--cc=eliz@gnu.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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.