summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2011-05-24 11:52:40 -0400
committerTheodore Ts'o <tytso@mit.edu>2011-05-24 11:52:40 -0400
commit81be12c8179c1c397d3f179cdd9b3f7146cf47f1 (patch)
treeb535687e88af17fc6b25329decf28563ed519395 /include/linux
parentb221349fa8b45d13c3650089f0514df7d1eb36c3 (diff)
jbd2: fix sending of data flush on journal commit
In data=ordered mode, it's theoretically possible (however rare) that an inode is filed to transaction's t_inode_list and a flusher thread writes all the data and inode is reclaimed before the transaction starts to commit. In such a case, we could erroneously omit sending a flush to file system device when it is different from the journal device (because data can still be in disk cache only). Fix the problem by setting a flag in a transaction when some inode is added to it and then send disk flush in the commit code when the flag is set. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/jbd2.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h
index a32dcaec04e1..4d57955061f4 100644
--- a/include/linux/jbd2.h
+++ b/include/linux/jbd2.h
@@ -658,7 +658,9 @@ struct transaction_s
* waiting for it to finish.
*/
unsigned int t_synchronous_commit:1;
- unsigned int t_flushed_data_blocks:1;
+
+ /* Disk flush needs to be sent to fs partition [no locking] */
+ int t_need_data_flush;
/*
* For use by the filesystem to store fs-specific data