[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Safe File Update (atomic)

Since the introduction of ext4, some apps/users have had issues with
file corruption after a system crash. It's not a bug in the FS AFAIK
and it's not exclusive to ext4.
Writing a temp file, fsync, rename is often proposed. However, the
durable aspect of fsync isn't always required and this way has other
issues, like resetting file owner, maybe losing meta-data, requiring
permission to create the temp file and having the temp file visible
(shortly, or permanently after a crash).

I've brought this up on linux-fsdevel and linux-ext4 but they (Ted)
claim those exceptions aren't really a problem.
Is there a code snippet or lib function that handles this properly?
What do you think about the exceptions?


Reply to: