summaryrefslogtreecommitdiffstats
path: root/fs/xfs
diff options
context:
space:
mode:
authorChristoph Hellwig2019-06-29 04:27:21 +0200
committerDarrick J. Wong2019-06-29 04:27:21 +0200
commit1f9489be025732fa210de4e6cfd9bd4440741f74 (patch)
tree90a07886d3f93aa67a44da8cd753442d63a41197 /fs/xfs
parentxfs: remove XLOG_STATE_IOABORT (diff)
downloadkernel-qcow2-linux-1f9489be025732fa210de4e6cfd9bd4440741f74.tar.gz
kernel-qcow2-linux-1f9489be025732fa210de4e6cfd9bd4440741f74.tar.xz
kernel-qcow2-linux-1f9489be025732fa210de4e6cfd9bd4440741f74.zip
xfs: don't use REQ_PREFLUSH for split log writes
If we have to split a log write because it wraps the end of the log we can't just use REQ_PREFLUSH to flush before the first log write, as the writes might get reordered somewhere in the I/O stack. Issue a manual flush in that case so that the ordering of the two log I/Os doesn't matter. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs')
-rw-r--r--fs/xfs/xfs_log.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
index 49e7f645cbc1..99509d23265f 100644
--- a/fs/xfs/xfs_log.c
+++ b/fs/xfs/xfs_log.c
@@ -1904,7 +1904,7 @@ xlog_sync(
* synchronously here; for an internal log we can simply use the block
* layer state machine for preflushes.
*/
- if (log->l_mp->m_logdev_targp != log->l_mp->m_ddev_targp)
+ if (log->l_mp->m_logdev_targp != log->l_mp->m_ddev_targp || split)
xfs_blkdev_issue_flush(log->l_mp->m_ddev_targp);
else
bp->b_flags |= XBF_FLUSH;