diff options
author | Brian Foster <bfoster@redhat.com> | 2014-12-23 17:46:23 -0500 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2014-12-23 17:46:23 -0500 |
commit | 96ab7954bca0eeedfb17094719db1351fba361d3 (patch) | |
tree | 6b94a56c4031e61215a626e475bd23e9137844fe /fs/xfs/xfs_log.c | |
parent | 97bf6af1f928216fd6c5a66e8a57bfa95a659672 (diff) |
xfs: initialize log buf I/O completion wq on log alloc
Log buffer I/O completion passes through the high priority
m_log_workqueue rather than the default metadata buffer workqueue. The
log buffer wq is initialized at I/O submission time. The log buffers are
reused once initialized, however, so this is not necessary.
Initialize the log buffer I/O completion workqueue pointers once when
the log is allocated and log buffers initialized rather than on every
log buffer I/O submission.
Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/xfs_log.c')
-rw-r--r-- | fs/xfs/xfs_log.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c index e408bf5a3ff7..4f09e0f7c07a 100644 --- a/fs/xfs/xfs_log.c +++ b/fs/xfs/xfs_log.c | |||
@@ -1395,6 +1395,8 @@ xlog_alloc_log( | |||
1395 | ASSERT(xfs_buf_islocked(bp)); | 1395 | ASSERT(xfs_buf_islocked(bp)); |
1396 | xfs_buf_unlock(bp); | 1396 | xfs_buf_unlock(bp); |
1397 | 1397 | ||
1398 | /* use high priority wq for log I/O completion */ | ||
1399 | bp->b_ioend_wq = mp->m_log_workqueue; | ||
1398 | bp->b_iodone = xlog_iodone; | 1400 | bp->b_iodone = xlog_iodone; |
1399 | log->l_xbuf = bp; | 1401 | log->l_xbuf = bp; |
1400 | 1402 | ||
@@ -1427,6 +1429,8 @@ xlog_alloc_log( | |||
1427 | ASSERT(xfs_buf_islocked(bp)); | 1429 | ASSERT(xfs_buf_islocked(bp)); |
1428 | xfs_buf_unlock(bp); | 1430 | xfs_buf_unlock(bp); |
1429 | 1431 | ||
1432 | /* use high priority wq for log I/O completion */ | ||
1433 | bp->b_ioend_wq = mp->m_log_workqueue; | ||
1430 | bp->b_iodone = xlog_iodone; | 1434 | bp->b_iodone = xlog_iodone; |
1431 | iclog->ic_bp = bp; | 1435 | iclog->ic_bp = bp; |
1432 | iclog->ic_data = bp->b_addr; | 1436 | iclog->ic_data = bp->b_addr; |
@@ -1806,8 +1810,6 @@ xlog_sync( | |||
1806 | XFS_BUF_ZEROFLAGS(bp); | 1810 | XFS_BUF_ZEROFLAGS(bp); |
1807 | XFS_BUF_ASYNC(bp); | 1811 | XFS_BUF_ASYNC(bp); |
1808 | bp->b_flags |= XBF_SYNCIO; | 1812 | bp->b_flags |= XBF_SYNCIO; |
1809 | /* use high priority completion wq */ | ||
1810 | bp->b_ioend_wq = log->l_mp->m_log_workqueue; | ||
1811 | 1813 | ||
1812 | if (log->l_mp->m_flags & XFS_MOUNT_BARRIER) { | 1814 | if (log->l_mp->m_flags & XFS_MOUNT_BARRIER) { |
1813 | bp->b_flags |= XBF_FUA; | 1815 | bp->b_flags |= XBF_FUA; |
@@ -1856,8 +1858,6 @@ xlog_sync( | |||
1856 | bp->b_flags |= XBF_SYNCIO; | 1858 | bp->b_flags |= XBF_SYNCIO; |
1857 | if (log->l_mp->m_flags & XFS_MOUNT_BARRIER) | 1859 | if (log->l_mp->m_flags & XFS_MOUNT_BARRIER) |
1858 | bp->b_flags |= XBF_FUA; | 1860 | bp->b_flags |= XBF_FUA; |
1859 | /* use high priority completion wq */ | ||
1860 | bp->b_ioend_wq = log->l_mp->m_log_workqueue; | ||
1861 | 1861 | ||
1862 | ASSERT(XFS_BUF_ADDR(bp) <= log->l_logBBsize-1); | 1862 | ASSERT(XFS_BUF_ADDR(bp) <= log->l_logBBsize-1); |
1863 | ASSERT(XFS_BUF_ADDR(bp) + BTOBB(count) <= log->l_logBBsize); | 1863 | ASSERT(XFS_BUF_ADDR(bp) + BTOBB(count) <= log->l_logBBsize); |