From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Richard M. Stallman" Newsgroups: gmane.emacs.devel Subject: Re: Making fsync() optional Date: Wed, 14 Sep 2005 10:06:53 -0400 Message-ID: References: <87oe6yf5o9.fsf@pacem.orebokech.com> <87mzmgsudo.fsf@pacem.orebokech.com> Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org Content-Type: text/plain; charset=ISO-8859-15 X-Trace: sea.gmane.org 1126709611 26743 80.91.229.2 (14 Sep 2005 14:53:31 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 14 Sep 2005 14:53:31 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Sep 14 16:53:24 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EFYau-0007I9-UV for ged-emacs-devel@m.gmane.org; Wed, 14 Sep 2005 16:50:41 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EFYau-0000zP-0a for ged-emacs-devel@m.gmane.org; Wed, 14 Sep 2005 10:50:40 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EFYQh-000565-Gj for emacs-devel@gnu.org; Wed, 14 Sep 2005 10:40:08 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EFYQf-000556-W9 for emacs-devel@gnu.org; Wed, 14 Sep 2005 10:40:06 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EFYNj-0003hc-WE for emacs-devel@gnu.org; Wed, 14 Sep 2005 10:37:04 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EFXuX-00012l-DW for emacs-devel@gnu.org; Wed, 14 Sep 2005 10:06:53 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1EFXuX-0004t1-0B; Wed, 14 Sep 2005 10:06:53 -0400 Original-To: Romain Francoise In-reply-to: <87mzmgsudo.fsf@pacem.orebokech.com> (message from Romain Francoise on Tue, 13 Sep 2005 20:19:31 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:42921 Archived-At: In theory, yes. In practice, IDE drives use write caching and lie to the kernel about the status of the data: even if fsync() returns the data may not be on the platter. The drives do that to write data to disk out of order, and to be able to delay writing blocks as long as needed under heavy seek load. The only way to ensure immediate data consistency is to disable write caching (on GNU/Linux, using the -W option to hdparm) or to use SCSI disks. Will the drive finish writing the blocks even if the computer crashes? If so, this isn't a serious problem, because only a sudden power failure would stop it. That simply does not happen on a laptop. It could be a real problem on a desktop machine without UPS. It has been many years since I had a desktop machine; are IDE disks commonly used on them? It seems really dumb if there is no way for the CPU to tell the disk, "Write these blocks now, and tell me when you're done."