RPM Community Forums

Mailing List Message of <rpm-devel>

Re: fsync()

From: Jeff Johnson <n3npq@mac.com>
Date: Fri 29 Jun 2007 - 18:04:36 CEST
Message-Id: <0FC5A248-0910-4EAD-A472-EBCB02737690@mac.com>

On Jun 29, 2007, at 9:51 AM, Russell Coker wrote:

>
>> But adding an explicit fsync() is trivial as soon as I can get a
>> reproducer.
>
> You want to be able to repeatably trigger a race-condition before  
> you fix it?
>

Nah, I just want to verify that I planted the sync/flush in the right  
place.

> To cause this race condition you must first use a file-system that is
> optimised for performance (EG XFS) so that it will allow long cache
> write-back times and also do write-related tasks after closing the  
> file (EG
> assigning disk blocks to the file after close() so that it knows  
> the length).
> Then put some load on the system while installing an RPM, and then  
> trigger a
> hardware reset shortly after rpm exits.
>

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.

73 de Jeff
Received on Fri Jun 29 18:04:39 2007
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.