提交 da0c5d26 编写于 作者: H Harshad Shirwadkar 提交者: Theodore Ts'o

ext4: issue fsdev cache flush before starting fast commit

If the journal dev is different from fsdev, issue a cache flush before
committing fast commit blocks to disk.
Suggested-by: NJan Kara <jack@suse.cz>
Signed-off-by: NHarshad Shirwadkar <harshadshirwadkar@gmail.com>
Reviewed-by: NJan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20201106035911.1942128-20-harshadshirwadkar@gmail.comSigned-off-by: NTheodore Ts'o <tytso@mit.edu>
上级 556e0319
......@@ -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) {
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册