From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#23904: Btrfs clone support in copy operations Date: Sun, 11 Sep 2016 15:44:45 -0700 Organization: UCLA Computer Science Department Message-ID: <1cdf90cd-192c-bf5c-cd63-f763594e1b8b@cs.ucla.edu> References: <1467745602.28158.17.camel@kcolford.com> <577C5588.3060608@cs.ucla.edu> <7d9c224b-e525-de33-426e-15bc328e7108@yandex.ru> <577CF00A.80707@cs.ucla.edu> <83oa6an794.fsf@gnu.org> <577D1EF1.5020401@cs.ucla.edu> <83k2gyn5yu.fsf@gnu.org> <577D40AA.9060004@cs.ucla.edu> <83eg4qbgrw.fsf@gnu.org> <83sht69rbd.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------5A242941CA9276768C7E56B9" X-Trace: blaine.gmane.org 1473633922 22646 195.159.176.226 (11 Sep 2016 22:45:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 11 Sep 2016 22:45:22 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 Cc: sbaugh@catern.com, kieran@kcolford.com, dmantipov@yandex.ru, 23904@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Sep 12 00:45:18 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bjDUv-0004pe-Da for geb-bug-gnu-emacs@m.gmane.org; Mon, 12 Sep 2016 00:45:13 +0200 Original-Received: from localhost ([::1]:39316 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjDUt-0000BX-FA for geb-bug-gnu-emacs@m.gmane.org; Sun, 11 Sep 2016 18:45:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53946) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjDUn-0000A3-Ld for bug-gnu-emacs@gnu.org; Sun, 11 Sep 2016 18:45:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bjDUk-0008GN-GM for bug-gnu-emacs@gnu.org; Sun, 11 Sep 2016 18:45:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:59124) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjDUk-0008GJ-D0 for bug-gnu-emacs@gnu.org; Sun, 11 Sep 2016 18:45:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bjDUk-0004fZ-2g for bug-gnu-emacs@gnu.org; Sun, 11 Sep 2016 18:45:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 11 Sep 2016 22:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23904 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 23904-submit@debbugs.gnu.org id=B23904.147363389917927 (code B ref 23904); Sun, 11 Sep 2016 22:45:02 +0000 Original-Received: (at 23904) by debbugs.gnu.org; 11 Sep 2016 22:44:59 +0000 Original-Received: from localhost ([127.0.0.1]:56836 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bjDUh-0004f5-FW for submit@debbugs.gnu.org; Sun, 11 Sep 2016 18:44:59 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:58022) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bjDUf-0004es-Fn for 23904@debbugs.gnu.org; Sun, 11 Sep 2016 18:44:58 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 8E442161109; Sun, 11 Sep 2016 15:44:50 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 5E3sIIzViRkI; Sun, 11 Sep 2016 15:44:49 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id A42AB16111B; Sun, 11 Sep 2016 15:44:49 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id raIYnT1cUDyI; Sun, 11 Sep 2016 15:44:49 -0700 (PDT) Original-Received: from [192.168.1.9] (unknown [100.32.155.148]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 776B2161109; Sun, 11 Sep 2016 15:44:49 -0700 (PDT) In-Reply-To: <83sht69rbd.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:123198 Archived-At: This is a multi-part message in MIME format. --------------5A242941CA9276768C7E56B9 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Come to think of it, the user manual already documents=20 write-region-inhibit-fsync, so it was a bit odd that the reference manual= was=20 silent about it. I installed the attached further patch to document=20 write-region-inhibit-fsync in the reference manual, and to help the refer= ence=20 manual avoid a dependency on the coreutils manual. --------------5A242941CA9276768C7E56B9 Content-Type: text/x-diff; name="0001-Remove-unnecessary-ref-to-coreutils-manual.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="0001-Remove-unnecessary-ref-to-coreutils-manual.patch" =46rom a2ce6f5da40e6b19e293588f2872a9fdb06b9bb1 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 11 Sep 2016 15:09:04 -0700 Subject: [PATCH] Remove unnecessary ref to coreutils manual * doc/lispref/files.texi: Document write-region-inhibit-fsync. --- doc/lispref/files.texi | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi index b912d7b..9a56d0a 100644 --- a/doc/lispref/files.texi +++ b/doc/lispref/files.texi @@ -661,6 +661,15 @@ Writing to Files files that the user does not need to know about. @end deffn =20 +@defvar write-region-inhibit-fsync +If this variable's value is @code{nil}, @code{write-region} uses the +@code{fsync} system call after writing a file. Although this slows +Emacs down, it lessens the risk of data loss after power failure. If +the value is @code{t}, Emacs does not use @code{fsync}. The default +value is @code{nil} when Emacs is interactive, and @code{t} when Emacs +runs in batch mode. @xref{Files and Storage}. +@end defvar + @defmac with-temp-file file body@dots{} @anchor{Definition of with-temp-file} The @code{with-temp-file} macro evaluates the @var{body} forms with a @@ -1812,12 +1821,15 @@ Files and Storage operating system might not write data to secondary storage immediately, which will lose the data if power is lost. =20 +@findex write-region +@vindex write-region-inhibit-fsync Although both sorts of failures can largely be avoided by a suitably configured file system, such systems are typically more expensive or less efficient. In more-typical systems, to survive media failure you can copy the file to a different device, and to survive a power -failure you can invoke the @command{sync} utility (@pxref{sync -invocation,,, coreutils, The @sc{gnu} @code{Coreutils} Manual}). +failure you can use the @code{write-region} function with the +@code{write-region-inhibit-fsync} variable set to @code{nil}. +@xref{Writing to Files}. =20 @node File Names @section File Names --=20 2.7.4 --------------5A242941CA9276768C7E56B9--