aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2009-10-16 13:26:15 -0400
committerJan Kara <jack@suse.cz>2009-11-11 09:22:49 -0500
commitfe8bc91c4c30122b357d197117705cfd4fabaf28 (patch)
tree33e2895847d812204209444db4093af9a2c3623d /include
parentea0174a7137c8ca9f130ca681f3a99c872da6778 (diff)
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')
-rw-r--r--include/linux/ext3_fs_i.h8
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 {
137 * by other means, so we have truncate_mutex. 137 * by other means, so we have truncate_mutex.
138 */ 138 */
139 struct mutex truncate_mutex; 139 struct mutex truncate_mutex;
140
141 /*
142 * Transactions that contain inode's metadata needed to complete
143 * fsync and fdatasync, respectively.
144 */
145 atomic_t i_sync_tid;
146 atomic_t i_datasync_tid;
147
140 struct inode vfs_inode; 148 struct inode vfs_inode;
141}; 149};
142 150