lkml.org 
[lkml]   [2009]   [Feb]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: vfs: Add MS_FLUSHONFSYNC mount flag
Theodore Tso wrote:
> On Sun, Feb 22, 2009 at 03:15:33PM +0100, Pavel Machek wrote:
>> Sounds like posix violation to
>> me... '/sys/fsync_does_not_really_sync'?
>
> It's as much a Posix violation as noatime. :-)
>
>> Perhaps it is better done at glibc level? Environment variables
>> already mostly have semantics you want.....
>
> Environment variables own't allow us to switch fsync's on and off
> while the process is running, so that the system can run "safe" while
> it is on AC mains, but "low power" when on battery.

Overall, for each filesystem, we really should _default_ to a safe mode
where fsync(2), fdatasync(2), sync_file_range(2) and transaction commits
are guaranteed to be committed to stable storage -- i.e. SYNC CACHE /
FLUSH CACHE, a forced unit access (FUA) bit, or guarantee that the
underlying storage has disabled write-back caching.

Correctness should come before performance. Linux has not had
credibility here, in the ATA+ext[23] space at least, and it is embarrassing.

Modern SATA and SCSI disks can do tagged command queueing with the FUA
bit, which does a lot to mitigate the performance loss seen with a less
capable "FLUSH CACHE + barrier" setup.

Jeff






\
 
 \ /
  Last update: 2009-02-23 00:45    [from the cache]
©2003-2011 Jasper Spaans