unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Richard M. Stallman" <rms@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Making fsync() optional
Date: Tue, 13 Sep 2005 11:55:38 -0400	[thread overview]
Message-ID: <E1EFD8E-0000mM-8O@fencepost.gnu.org> (raw)
In-Reply-To: <87oe6yf5o9.fsf@pacem.orebokech.com> (message from Romain Francoise on Mon, 12 Sep 2005 21:27:02 +0200)

    Would people be conceptually opposed to making the fsync() call optional
    in Fwrite_region?  Calling it after each write

It is not called after each write, just once at the end of writing the
whole file.

This is very important for safety.  Without this, you can type C-x
C-s, and see the command finish, and see the message that the file has
been written, but you can still lose it all if the system crashes
after that.

However, I would not mind adding a flag to turn it off, as long as the
doc string of that flag warns that this is dangerous.

  It also forces the disk to spin up on laptops (even with laptop
    mode and friends).

It has to do that anyway.  I don't want it to wait a minute before it
writes the file!

    Of course calling fsync() is safer if the system goes down right after
    saving the file, but for systems with uninterruptible power, it doesn't
    matter.

A power failure is not the only cause of crashes.

  reply	other threads:[~2005-09-13 15:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-12 19:27 Making fsync() optional Romain Francoise
2005-09-13 15:55 ` Richard M. Stallman [this message]
2005-09-13 18:19   ` Romain Francoise
2005-09-14 14:06     ` Richard M. Stallman
2005-09-15  8:45       ` Romain Francoise
2005-09-16  1:01         ` Richard M. Stallman

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1EFD8E-0000mM-8O@fencepost.gnu.org \
    --to=rms@gnu.org \
    --cc=emacs-devel@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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).