diff options
author | Jan Kara <jack@suse.cz> | 2009-10-16 21:26:15 +0400 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2009-11-11 17:22:49 +0300 |
commit | fe8bc91c4c30122b357d197117705cfd4fabaf28 (patch) | |
tree | 33e2895847d812204209444db4093af9a2c3623d /include/linux | |
parent | ea0174a7137c8ca9f130ca681f3a99c872da6778 (diff) | |
download | linux-fe8bc91c4c30122b357d197117705cfd4fabaf28.tar.xz |
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>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/ext3_fs_i.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/ext3_fs_i.h b/include/linux/ext3_fs_i.h index ca1bfe90004f..93e7428156ba 100644 --- a/include/linux/ext3_fs_i.h +++ b/include/linux/ext3_fs_i.h @@ -137,6 +137,14 @@ struct ext3_inode_info { * by other means, so we have truncate_mutex. */ struct mutex truncate_mutex; + + /* + * Transactions that contain inode's metadata needed to complete + * fsync and fdatasync, respectively. + */ + atomic_t i_sync_tid; + atomic_t i_datasync_tid; + struct inode vfs_inode; }; |