ext4: Wait for proper transaction commit on fsync
commite8f0d507456ee6ea071e0bb9d445e848b29872ac
authorJan Kara <jack@suse.cz>
Thu, 10 Dec 2009 05:50:57 +0000 (10 00:50 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 14 Dec 2009 16:08:00 +0000 (14 08:08 -0800)
treed381586e8c667a0b75cebbe0f565ccf175f53a28
parent224fb952944a6ff5c4032f5cdcf0a73ac45b0702
ext4: Wait for proper transaction commit on fsync

(cherry picked from commit b436b9bef84de6893e86346d8fbf7104bc520645)

We cannot rely on buffer dirty bits during fsync because pdflush can come
before fsync is called and clear dirty bits without forcing a transaction
commit. What we do is that we track which transaction has last changed
the inode and which transaction last changed allocation and force it to
disk on fsync.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/ext4/ext4.h
fs/ext4/ext4_jbd2.h
fs/ext4/extents.c
fs/ext4/fsync.c
fs/ext4/inode.c
fs/ext4/super.c
fs/jbd2/journal.c