From ebe55024d75e8da27d7f3ade3504d261f2c8a45f Mon Sep 17 00:00:00 2001 From: barbieri Date: Tue, 17 Mar 2009 20:49:36 +0000 Subject: [PATCH] make sure data is on disk, don't get empty files on ext4/ext3=writeback. Ok, raster said it would not happen but just crashed my machine and e.cfg was lost due ext4 being in writeback by default. Accordingly to Theodore Ts'o (http://thunk.org/tytso/blog/2009/03/15/dont-fear-the-fsync/) we should fsync even on open-write-close+rename case. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/eet@39536 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/eet_lib.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/eet_lib.c b/src/lib/eet_lib.c index 80858b5..a01f983 100644 --- a/src/lib/eet_lib.c +++ b/src/lib/eet_lib.c @@ -557,6 +557,7 @@ eet_flush2(Eet_File *ef) /* flush all write to the file. */ fflush(ef->fp); + fsync(fileno(ef->fp)); /* append signature if required */ if (ef->key) -- 2.7.4