Public bug reported: Binary package hint: uptimed
I've lost my uprecords many times now on power loss or hard reset. Today I looked at the code and the code in urec.c does: f = fopen(FILE_RECORDS".tmp", "w"); // updates the file here fclose(f); rename(FILE_RECORDS, FILE_RECORDS".old"); rename(FILE_RECORDS".tmp", FILE_RECORDS); AFAICT, this is exactly the wrong way to do it on ext4, where there is special logic to make renames *over* files sort of atomic. The minimal change is to remove the ".old" logic completely, but that may hurt the situation on other filesystems (ext2, maybe). ** Affects: uptimed (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/793129 Title: Records are lost on crash/power loss -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs