On Tue, Nov 01, 2011 at 09:54:45AM -0400, Greg Troxel wrote: > > My man page on 5.1 matches Mathew's. > > But, does sync do cache flushes on all disks as well? > > Does SUS require this?
I believe fsync_range with FDATASYNC is required to. Note that since it's guaranteed to sync "sufficient metadata to.." it should force directory updates, file size updates, etc. out to disk as well -- without flushing the entire kernel page or metadata cache. Unfortunately, since *disk* cache flushes are rather a blunt instrument this will still harm performance more than it ought. It'd be nice to have a concept of ordered tags as barriers like Linux does (see my old B_BARRIER proposal) but that'd still need tagged queueing support for ATA disks to be really useful today. -- Thor Lancelot Simon t...@panix.com "All of my opinions are consistent, but I cannot present them all at once." -Jean-Jacques Rousseau, On The Social Contract