Re: Speeding up dpkg, a proposal
ext Chow Loong Jin <firstname.lastname@example.org> writes:
> Could we somehow avoid using sync()? sync() syncs all mounted filesystems, which
> isn't exactly very friendly when you have a few slow-syncing filesystems like
> btrfs (or even NFS) mounted.
Hmm, right. We could keep a list of all files that need fsyncing, and
then fsync them all just before writing the checkpoint.
Half of that is already done (for the content of the packages), we would
need to add it for the files in /var/lib/dpkg/, or we could just fsync
the whole directory.
But then again, I would argue that the sync() is actually necessary
always, for correct semantics: You also want to sync everything that the
postinst script has done before recording that a package is fully