ext4: Wait for proper transaction commit on fsync

(cherry picked from commit b436b9bef8)

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>
This commit is contained in:
Jan Kara 2009-12-08 23:51:10 -05:00 • committed by Greg Kroah-Hartman
commit eebb744d30
7 changed files with 81 additions and 31 deletions