We don't make calls to fsync() or fdatasync() when we are attempting to do
something transactionally, such as writing out one of our DB entries. Add a
call to fdatasync() when we write DB entries, and also ensure we sync our
log changes to disc whenever we close it.
Another important thing to ensure is that we commit removals of DB entries.
The method isn't necessarily pretty, but it works in _alpm_db_remove().
This looks good to me.
Just wonding how much overhead the fsyncing adds? Have you noticed any
speed decrease when running with this patch? Not that there is much
pacman-dev mailing list