Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Aug 2018 05:29:49 +0000
From:      bugzilla-noreply@freebsd.org
To:        fs@FreeBSD.org
Subject:   [Bug 230851] fsck sets last modified file size to zero on crash on UFS filesystem
Message-ID:  <bug-230851-3630-vqm4iXkWks@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-230851-3630@https.bugs.freebsd.org/bugzilla/>
References:  <bug-230851-3630@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D230851

Kirk McKusick <mckusick@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mckusick@FreeBSD.org

--- Comment #1 from Kirk McKusick <mckusick@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_n=
ame
file contents which because of the fsync will be on the disk.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-230851-3630-vqm4iXkWks>