projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
556e031
)
ext4: issue fsdev cache flush before starting fast commit
author
Harshad Shirwadkar
<harshadshirwadkar@gmail.com>
Fri, 6 Nov 2020 03:59:08 +0000
(19:59 -0800)
committer
Theodore Ts'o
<tytso@mit.edu>
Sat, 7 Nov 2020 04:01:05 +0000
(23:01 -0500)
If the journal dev is different from fsdev, issue a cache flush before
committing fast commit blocks to disk.
Suggested-by: Jan Kara <jack@suse.cz>
Signed-off-by: Harshad Shirwadkar <harshadshirwadkar@gmail.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link:
https://lore.kernel.org/r/20201106035911.1942128-20-harshadshirwadkar@gmail.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/fast_commit.c
patch
|
blob
|
history
diff --git
a/fs/ext4/fast_commit.c
b/fs/ext4/fast_commit.c
index fb9b4e9d82b23c4929f5d9ad7a6d013919e66951..ebe5f423f8f2c6358cc104f57ca645561257021c 100644
(file)
--- a/
fs/ext4/fast_commit.c
+++ b/
fs/ext4/fast_commit.c
@@
-1007,6
+1007,13
@@
static int ext4_fc_perform_commit(journal_t *journal)
if (ret)
return ret;
+ /*
+ * If file system device is different from journal device, issue a cache
+ * flush before we start writing fast commit blocks.
+ */
+ if (journal->j_fs_dev != journal->j_dev)
+ blkdev_issue_flush(journal->j_fs_dev, GFP_NOFS);
+
blk_start_plug(&plug);
if (sbi->s_fc_bytes == 0) {
/*