ext3: Wait for proper transaction commit on fsync
authorJan Kara <jack@suse.cz>
Fri, 16 Oct 2009 17:26:15 +0000 (19:26 +0200)
committerJan Kara <jack@suse.cz>
Wed, 11 Nov 2009 14:22:49 +0000 (15:22 +0100)
commitfe8bc91c4c30122b357d197117705cfd4fabaf28
tree33e2895847d812204209444db4093af9a2c3623d
parentea0174a7137c8ca9f130ca681f3a99c872da6778
ext3: Wait for proper transaction commit on fsync

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>
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
fs/ext3/fsync.c
fs/ext3/inode.c
fs/ext3/super.c
include/linux/ext3_fs_i.h