]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: Make fsync sync new parent directories in no-journal mode
authorFrank Mayhar <fmayhar@google.com>
Mon, 17 May 2010 12:00:00 +0000 (08:00 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 17 May 2010 12:00:00 +0000 (08:00 -0400)
commitc0a07f1e4e82dfdb35ec6f8c22b9286dbff3650a
tree8f5a13487139c68ef775c9d39b7be83386fdae06
parent1f18d7b7c9555fefcd89f5fa0e3982a6bda8ec72
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: Frank Mayhar <fmayhar@google.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/ext4/ext4.h
fs/ext4/fsync.c
fs/ext4/namei.c