]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ext4: Make fsync sync new parent directories in no-journal mode
authorFrank Mayhar <fmayhar@google.com>
Mon, 31 May 2010 02:50:06 +0000 (22:50 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 2 Aug 2010 17:21:23 +0000 (10:21 -0700)
commit282d0217435ad7747d615cc19331d72e76f3fa3e
treea85c4af27722b5f0a98f8bcb91ec32af99003573
parent7b3bfead648da9a5457a639f08eefa96bf4c60d1
ext4: Make fsync sync new parent directories in no-journal mode

commit 14ece1028b3ed53ffec1b1213ffc6acaf79ad77c upstream (as of v2.6.34-git13)

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/ext4/ext4.h
fs/ext4/fsync.c
fs/ext4/namei.c