aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/ext4.h
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2009-12-08 23:51:10 -0500
committerTheodore Ts'o <tytso@mit.edu>2009-12-08 23:51:10 -0500
commitb436b9bef84de6893e86346d8fbf7104bc520645 (patch)
tree50fb9ae167bcd622e9adf47646bcf3b4c7dd111d /fs/ext4/ext4.h
parent194074acacebc169ded90a4657193f5180015051 (diff)
ext4: 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> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/ext4.h')
-rw-r--r--fs/ext4/ext4.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
index 4cfc2f0edb3f..ab31e65d46d0 100644
--- a/fs/ext4/ext4.h
+++ b/fs/ext4/ext4.h
@@ -709,6 +709,13 @@ struct ext4_inode_info {
709 struct list_head i_aio_dio_complete_list; 709 struct list_head i_aio_dio_complete_list;
710 /* current io_end structure for async DIO write*/ 710 /* current io_end structure for async DIO write*/
711 ext4_io_end_t *cur_aio_dio; 711 ext4_io_end_t *cur_aio_dio;
712
713 /*
714 * Transactions that contain inode's metadata needed to complete
715 * fsync and fdatasync, respectively.
716 */
717 tid_t i_sync_tid;
718 tid_t i_datasync_tid;
712}; 719};
713 720
714/* 721/*