[Nix-dev] The fsync issues with nix

2012-03-21 Thread Lluís Batlle i Rossell
Hello, talking with the btrfs people, they are specially aware of a problem related to writing files to disk properly. I think 'nix' does not 'fsync' on every file it writes to the store; does it? in non-chroot, it even isn't nix who puts the files in the store, so... Without fsync, there is no

Re: [Nix-dev] The fsync issues with nix

2012-03-21 Thread shea
On 03/21/2012 03:11 PM, Lluís Batlle i Rossell wrote: So, user tools have to be written properly, so they fsync data before 'mv'. From Nix's standpoint, isn't the real requirement 'fsync before updating the database'? Is there some way for Nix to say Make sure every file in this directory is

Re: [Nix-dev] The fsync issues with nix

2012-03-21 Thread Marc Weber
You're asking to do fsync before registering store paths valid, correct? If its not done yet it makes much sense to me. Marc Weber ___ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev

Re: [Nix-dev] The fsync issues with nix

2012-03-21 Thread Lluís Batlle i Rossell
On Wed, Mar 21, 2012 at 08:21:46PM +0100, Marc Weber wrote: You're asking to do fsync before registering store paths valid, correct? If its not done yet it makes much sense to me. Well, I think there are only two available operations: fsync(int fd) and sync(). One is much faster and less

Re: [Nix-dev] The fsync issues with nix

2012-03-21 Thread Marc Weber
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

Re: [Nix-dev] The fsync issues with nix

2012-03-21 Thread Lluís Batlle i Rossell
On Wed, Mar 21, 2012 at 08:58:43PM +0100, Lluís Batlle i Rossell wrote: On Wed, Mar 21, 2012 at 08:39:20PM +0100, Lluís Batlle i Rossell wrote: On Wed, Mar 21, 2012 at 08:21:46PM +0100, Marc Weber wrote: You're asking to do fsync before registering store paths valid, correct? If