[Nix-dev] The fsync issues with nix

Marc Weber marco-oweber at gmx.de
Wed Mar 21 20:51:55 CET 2012


Excerpts from Lluís Batlle i Rossell's message of Wed Mar 21 20:39:20 +0100 2012:
> Well, I think there are only two available operations: fsync(int fd) and sync().
> One is much faster and less intrusive than the other. But what to do, when it
> isn't nix that writes the files, and thus, nix has not the handles open?
> Maybe sync() is the quick solution? Or should nix open all files and fsync them?
Thinking about it again I feel we don't want broken stores ever.

Thus at the very least the hashes nix-store --verify --check-contents uses must be
synced. Are they contained in sqlite? Then there should be no (big) problem.

Then you ended up with a broken store - but you were still able to run
an older revision, right?

Marc Weber


More information about the nix-dev mailing list