From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#6237: 23.2; INSUFFICIENT RESOURCES writing file via CIFS Date: Sat, 22 May 2010 11:38:35 +0300 Message-ID: <83bpc8pbzo.fsf@gnu.org> References: <4BF5F6A1.8020206@sprucehead.com> <4BF73D99.4060007@sprucehead.com> <83fx1kzbuh.fsf@gnu.org> <4BF78CA4.2090209@sprucehead.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1274521402 13596 80.91.229.12 (22 May 2010 09:43:22 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 22 May 2010 09:43:22 +0000 (UTC) Cc: 6237@debbugs.gnu.org To: Jack Holloway Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat May 22 11:43:21 2010 connect(): No such file or directory Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OFlEg-0007cF-Hd for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 May 2010 11:43:14 +0200 Original-Received: from localhost ([127.0.0.1]:59124 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OFkYh-00087R-TU for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 May 2010 04:59:51 -0400 Original-Received: from [140.186.70.92] (port=38294 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OFkW8-0006st-5h for bug-gnu-emacs@gnu.org; Sat, 22 May 2010 04:57:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OFkW5-0006QF-2i for bug-gnu-emacs@gnu.org; Sat, 22 May 2010 04:57:11 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:50712) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OFkW1-0006Pw-Qp for bug-gnu-emacs@gnu.org; Sat, 22 May 2010 04:57:08 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OFkEY-00016p-8h; Sat, 22 May 2010 04:39:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 May 2010 08:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6237 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 6237-submit@debbugs.gnu.org id=B6237.12745175264256 (code B ref 6237); Sat, 22 May 2010 08:39:02 +0000 Original-Received: (at 6237) by debbugs.gnu.org; 22 May 2010 08:38:46 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OFkEH-00016b-KZ for submit@debbugs.gnu.org; Sat, 22 May 2010 04:38:45 -0400 Original-Received: from mtaout23.012.net.il ([80.179.55.175]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OFkEF-00016W-7N for 6237@debbugs.gnu.org; Sat, 22 May 2010 04:38:44 -0400 Original-Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0L2T00800BZ39000@a-mtaout23.012.net.il> for 6237@debbugs.gnu.org; Sat, 22 May 2010 11:38:36 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([77.127.33.125]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0L2T007R6C0B2730@a-mtaout23.012.net.il>; Sat, 22 May 2010 11:38:36 +0300 (IDT) In-reply-to: <4BF78CA4.2090209@sprucehead.com> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sat, 22 May 2010 04:39:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:37175 Archived-At: > Date: Sat, 22 May 2010 00:49:56 -0700 > From: Jack Holloway > CC: 6237@debbugs.gnu.org > > 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. So 24MB succeeds, but 32MB and all sizes above it fail? But why does the error message say "Unable to append"? Why "append"? > 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)); This is not the code that runs on Windows. That one is a little ways earlier in the body of copy-file: #ifdef WINDOWSNT if (!CopyFile (SDATA (encoded_file), SDATA (encoded_newname), FALSE)) report_file_error ("Copying file", Fcons (file, Fcons (newname, Qnil))); /* CopyFile retains the timestamp by default. */ else if (NILP (keep_time)) { EMACS_TIME now; DWORD attributes; char * filename; EMACS_GET_TIME (now); filename = SDATA (encoded_newname); /* Ensure file is writable while its modified time is set. */ attributes = GetFileAttributes (filename); SetFileAttributes (filename, attributes & ~FILE_ATTRIBUTE_READONLY); if (set_file_times (filename, now, now)) { /* Restore original attributes. */ SetFileAttributes (filename, attributes); xsignal2 (Qfile_date_error, build_string ("Cannot set file date"), newname); } /* Restore original attributes. */ SetFileAttributes (filename, attributes); } #else /* not WINDOWSNT */ > 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. The breaking of writes into smaller chunks should be in Windows specific code, i.e. in w32.c:sys_write. And that is very easy.