]> 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, 17 May 2010 12:00:00 +0000 (08:00 -0400)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Thu, 6 Jan 2011 23:07:38 +0000 (18:07 -0500)
commitf1da3e1315fc3a2d3ded2434a327b913d7a80092
tree1300514aef34a1a32802120034f1ec6947b4a3cc
parentf510dd7e84ae263ee730a5b5db6100c6c03c087f
ext4: Make fsync sync new parent directories in no-journal mode

commit 14ece1028b3ed53ffec1b1213ffc6acaf79ad77c upstream.

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: Paul Gortmaker <paul.gortmaker@windriver.com>
fs/ext4/ext4.h
fs/ext4/fsync.c
fs/ext4/namei.c