Since after loosing uptime records once again due to a crash while testing kernels I am so through with it that it is not even funny anymore, Theodore T'so said that one should not fear the fsync() [1] - especially not with Ext4 - and I prefer not loosing uptime records over and over and over again I build a test version using fsync() at the location this bug report is about:
--- uptimed-0.3.16.orig/libuptimed/urec.c +++ uptimed-0.3.16/libuptimed/urec.c @@ -263,6 +263,7 @@ if ((max > 0) && (++i >= max)) break; } } + fsync(f); fclose(f); rename(FILE_RECORDS, FILE_RECORDS".old"); rename(FILE_RECORDS".tmp", FILE_RECORDS); If you like to see whether it helps, please find it on my server: http://martin-steigerwald.de/tmp/debian/uptimed-fsync-bug-515653/ I will do some long term testing with it. Additionally uptimed also should not take a shorter records file is a longer backup is available, but I leave this alone for now. [1] http://thunk.org/tytso/blog/2009/03/15/dont-fear-the-fsync/ Ciao, -- Martin 'Helios' Steigerwald - http://www.Lichtvoll.de GPG: 03B0 0D6C 0040 0710 4AFA B82F 991B EAAC A599 84C7
signature.asc
Description: This is a digitally signed message part.