On Saturday 30 June 2007 00:35, Andy Green <andy@warmcat.com> wrote:
> I don't think fsync() for individual files is really a fair answer,
Why not?
> it's
> fine if it just uses the normal filesystem APIs per-file. But after the
> transaction is complete, and you walk away thinking you did complete an
> rpm transaction, there is a case for adding a sync() to make sure
> everything you think you have done is truly committed to physical
> storage (maybe it does it already, I dunno). On the one hand this is a
> relatively low probability issue for a desktop box but on the other hand
> it is pretty cheap.
The time taken for a sync() system call can be very large when you have a
system under high write load. Under some older versions of Linux the time
taken for sync() appeared to be unbounded (it apparently kept looping through
the list of data to write while more data was being added to the list), a
brief test suggests that recent versions of Linux may have solved this.
sync() is not the way to get some files committed to disk.
--
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:02:07 2007