diff options
author | Christoph Hellwig <hch@lst.de> | 2011-07-08 08:36:32 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2011-07-08 08:36:32 -0400 |
commit | 1d5ae5dfeee024d51fb2c0205035d7611a8f0c86 (patch) | |
tree | 080047368d17c754cea7ed2079b2a0b05c3dd857 /fs/xfs/xfs_log.c | |
parent | c8da0faf6b07623c473cab42967f943ad4ab7560 (diff) |
xfs: cleanup I/O-related buffer flags
Remove the unused and misnamed _XBF_RUN_QUEUES flag, rename XBF_LOG_BUFFER
to the more fitting XBF_SYNCIO, and split XBF_ORDERED into XBF_FUA and
XBF_FLUSH to allow more fine grained control over the bio flags. Also
cleanup processing of the flags in _xfs_buf_ioapply to make more sense,
and renumber the sparse flag number space to group flags by purpose.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Alex Elder <aelder@sgi.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Diffstat (limited to 'fs/xfs/xfs_log.c')
-rw-r--r-- | fs/xfs/xfs_log.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c index 44c269b387c7..4c2d30e3b78d 100644 --- a/fs/xfs/xfs_log.c +++ b/fs/xfs/xfs_log.c | |||
@@ -1268,7 +1268,6 @@ xlog_bdstrat( | |||
1268 | return 0; | 1268 | return 0; |
1269 | } | 1269 | } |
1270 | 1270 | ||
1271 | bp->b_flags |= _XBF_RUN_QUEUES; | ||
1272 | xfs_buf_iorequest(bp); | 1271 | xfs_buf_iorequest(bp); |
1273 | return 0; | 1272 | return 0; |
1274 | } | 1273 | } |
@@ -1369,7 +1368,7 @@ xlog_sync(xlog_t *log, | |||
1369 | XFS_BUF_ZEROFLAGS(bp); | 1368 | XFS_BUF_ZEROFLAGS(bp); |
1370 | XFS_BUF_BUSY(bp); | 1369 | XFS_BUF_BUSY(bp); |
1371 | XFS_BUF_ASYNC(bp); | 1370 | XFS_BUF_ASYNC(bp); |
1372 | bp->b_flags |= XBF_LOG_BUFFER; | 1371 | bp->b_flags |= XBF_SYNCIO; |
1373 | 1372 | ||
1374 | if (log->l_mp->m_flags & XFS_MOUNT_BARRIER) { | 1373 | if (log->l_mp->m_flags & XFS_MOUNT_BARRIER) { |
1375 | /* | 1374 | /* |
@@ -1380,7 +1379,7 @@ xlog_sync(xlog_t *log, | |||
1380 | */ | 1379 | */ |
1381 | if (log->l_mp->m_logdev_targp != log->l_mp->m_ddev_targp) | 1380 | if (log->l_mp->m_logdev_targp != log->l_mp->m_ddev_targp) |
1382 | xfs_blkdev_issue_flush(log->l_mp->m_ddev_targp); | 1381 | xfs_blkdev_issue_flush(log->l_mp->m_ddev_targp); |
1383 | XFS_BUF_ORDERED(bp); | 1382 | bp->b_flags |= XBF_FUA | XBF_FLUSH; |
1384 | } | 1383 | } |
1385 | 1384 | ||
1386 | ASSERT(XFS_BUF_ADDR(bp) <= log->l_logBBsize-1); | 1385 | ASSERT(XFS_BUF_ADDR(bp) <= log->l_logBBsize-1); |
@@ -1413,9 +1412,9 @@ xlog_sync(xlog_t *log, | |||
1413 | XFS_BUF_ZEROFLAGS(bp); | 1412 | XFS_BUF_ZEROFLAGS(bp); |
1414 | XFS_BUF_BUSY(bp); | 1413 | XFS_BUF_BUSY(bp); |
1415 | XFS_BUF_ASYNC(bp); | 1414 | XFS_BUF_ASYNC(bp); |
1416 | bp->b_flags |= XBF_LOG_BUFFER; | 1415 | bp->b_flags |= XBF_SYNCIO; |
1417 | if (log->l_mp->m_flags & XFS_MOUNT_BARRIER) | 1416 | if (log->l_mp->m_flags & XFS_MOUNT_BARRIER) |
1418 | XFS_BUF_ORDERED(bp); | 1417 | bp->b_flags |= XBF_FUA | XBF_FLUSH; |
1419 | dptr = XFS_BUF_PTR(bp); | 1418 | dptr = XFS_BUF_PTR(bp); |
1420 | /* | 1419 | /* |
1421 | * Bump the cycle numbers at the start of each block | 1420 | * Bump the cycle numbers at the start of each block |