[Bug 230851] fsck sets last modified file size to zero on crash on UFS filesystem
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Fri Aug 24 05:29:51 UTC 2018
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230851
Kirk McKusick <mckusick at FreeBSD.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mckusick at FreeBSD.org
--- Comment #1 from Kirk McKusick <mckusick at FreeBSD.org> ---
What editor are you using? Most editors follow the safe update practice:
write file to new_name
fsync(new_name);
rename(new_name, orig_name);
The fsync will not return until the contents are on the disk and the rename is
atomic, so it will either point at the orig_name file contents or the new_name
file contents which because of the fsync will be on the disk.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-fs
mailing list