Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Oct 2010 02:00:51 -0700
From:      perryh@pluto.rain.com
To:        ivoras@freebsd.org
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: fsync(2) manual and hdd write caching
Message-ID:  <4cc7ea44.ApOaxS8Xr4Sxu%2B0x%perryh@pluto.rain.com>
In-Reply-To: <ia7nln$piv$1@dough.gmane.org>
References:  <20101026213618.GA3013@freebsd.org> <ia7nln$piv$1@dough.gmane.org>

index | next in thread | previous in thread | raw e-mail

Ivan Voras <ivoras@freebsd.org> wrote:
> fsync(2) actually does behave as advertised, "auses all modified
> data and attributes of fd to be moved to a permanent storage
> device". It is the problem of the "permanent storage device"
> if it caches this data further.

IMO, volatile RAM without battery backup cannot reasonably be
considered a "permanent storage device", regardless of where
it is physically located.

Short of mounting synchronously, with the attendant performance
hit, would it not make sense for fsync(2) to issue ATA_FLUSHCACHE
or SCSI "SYNCHRONIZE CACHE" after it has finished writing data
to the drive?  Surely the low-level capability to issue those
commands must already exist, else we would have no way to safely
prepare for power off.


help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4cc7ea44.ApOaxS8Xr4Sxu%2B0x%perryh>