Skip to content
Commit 14ece102 authored by Frank Mayhar's avatar Frank Mayhar Committed by Theodore Ts'o
Browse files

ext4: Make fsync sync new parent directories in no-journal mode



Add a new ext4 state to tell us when a file has been newly created; use
that state in ext4_sync_file in no-journal mode to tell us when we need
to sync the parent directory as well as the inode and data itself.  This
fixes a problem in which a panic or power failure may lose the entire
file even when using fsync, since the parent directory entry is lost.

Addresses-Google-Bug: #2480057

Signed-off-by: default avatarFrank Mayhar <fmayhar@google.com>
Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
parent 60e6679e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment