[pacman-dev] [PATCH] libalpm: sync changes to disc when appropriate

Allan McRae allan at archlinux.org
Fri Mar 13 22:55:57 EDT 2009


Dan McGee wrote:
> 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 
choice here...

Allan





More information about the pacman-dev mailing list