RPM Community Forums

Mailing List Message of <rpm-devel>

Re: fsync()

From: Russell Coker <russell@coker.com.au>
Date: Sat 30 Jun 2007 - 00:04:47 CEST
Message-Id: <200706300804.49569.russell@coker.com.au>
On Saturday 30 June 2007 02:04, Jeff Johnson <n3npq@mac.com> wrote:
> Should I add O_SYNC when opening files on delayed write file systems?
> Doable, but annoying mapping the path back to a file system type to  
> infer functionality.

O_SYNC is not the correct solution.  XFS likes to delay block allocation to 
get contiguous files.  O_SYNC on XFS would either result in re-allocating 
file blocks (terrible for write performance) or discontigous files.  Write 
performance will always be expected to be better from a fsync() before 
close() than from O_SYNC.

-- 
russell@coker.com.au
http://etbe.coker.com.au/          My Blog

http://www.coker.com.au/sponsorship.html Sponsoring Free Software development
Received on Sat Jun 30 00:05:03 2007
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.