Dan McGee wrote:
On Fri, Mar 13, 2009 at 9:55 PM, Allan McRae <[email protected]> wrote:
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...

Little if any, actually, as we are syncing only our DB files and not
all of the files we lay down on disk. For the most part pacman is
already I/O bound, so this doesn't add any noticeable hiccups.

OK, that sounds good. BTW, won't all files will be synced if partitions are mounted with the "ordered" option? But that is a users choice, so...

Allan



_______________________________________________
pacman-dev mailing list
[email protected]
http://www.archlinux.org/mailman/listinfo/pacman-dev

Reply via email to