[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Making fsync() optional

From: Richard M. Stallman
Subject: Re: Making fsync() optional
Date: Wed, 14 Sep 2005 10:06:53 -0400

    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."

reply via email to

[Prev in Thread] Current Thread [Next in Thread]