[pacman-dev] delay writes a fsync

Pierre Schmitz pierre at archlinux.de
Thu Mar 12 13:55:55 EDT 2009

Am Donnerstag, 12. März 2009 17:00:46 schrieb Xavier:
> On Thu, Mar 12, 2009 at 4:06 PM, Dan McGee <dpmcgee at gmail.com> wrote:
> > Adding an fsync() in the write_db_entry() call would probably make sense.
> >
> > However, note the funny part here- if we sync our DB entries, and then
> > your machine gets powered off, you might end up with a DB that got
> > committed but files in the package never actually got written to disk.
> Do we know that for sure? It depends on how libarchive is written, right?

This is interesting. I think we just need to make sure that the meta data are 
written and the pacman.log. So, if something fails during a transaction the 
user could reinstall the packages manually.

OT: I have read that Sun uses ZFS snapshots to implement transcation in their 
package manager. Doing this on FS level seems to be the only sane way imho. 
Its hard to revert the changes of an install script from pacman's point of 


Pierre Schmitz

Clemens-August-Straße 76
53115 Bonn

Telefon		0228 9716608
Mobil		0160 95269831
Jabber		pierre at jabber.archlinux.de
WWW		http://www.archlinux.de

More information about the pacman-dev mailing list