block,fs: use REQ_* flags directly

Remove the WRITE_* and READ_SYNC wrappers, and just use the flags
directly.  Where applicable this also drops usage of the
bio_set_op_attrs wrapper.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:
Christoph Hellwig
2016-11-01 07:40:10 -06:00
committed by Jens Axboe
부모 a2b809672e
커밋 70fd76140a
53개의 변경된 파일133개의 추가작업 그리고 182개의 파일을 삭제

파일 보기

@@ -495,8 +495,10 @@ xfs_submit_ioend(
ioend->io_bio->bi_private = ioend;
ioend->io_bio->bi_end_io = xfs_end_bio;
bio_set_op_attrs(ioend->io_bio, REQ_OP_WRITE,
(wbc->sync_mode == WB_SYNC_ALL) ? WRITE_SYNC : 0);
ioend->io_bio->bi_opf = REQ_OP_WRITE;
if (wbc->sync_mode == WB_SYNC_ALL)
ioend->io_bio->bi_opf |= REQ_SYNC;
/*
* If we are failing the IO now, just mark the ioend with an
* error and finish it. This will run IO completion immediately
@@ -567,8 +569,9 @@ xfs_chain_bio(
bio_chain(ioend->io_bio, new);
bio_get(ioend->io_bio); /* for xfs_destroy_ioend */
bio_set_op_attrs(ioend->io_bio, REQ_OP_WRITE,
(wbc->sync_mode == WB_SYNC_ALL) ? WRITE_SYNC : 0);
ioend->io_bio->bi_opf = REQ_OP_WRITE;
if (wbc->sync_mode == WB_SYNC_ALL)
ioend->io_bio->bi_opf |= REQ_SYNC;
submit_bio(ioend->io_bio);
ioend->io_bio = new;
}

파일 보기

@@ -1304,7 +1304,7 @@ _xfs_buf_ioapply(
if (bp->b_flags & XBF_WRITE) {
op = REQ_OP_WRITE;
if (bp->b_flags & XBF_SYNCIO)
op_flags = WRITE_SYNC;
op_flags = REQ_SYNC;
if (bp->b_flags & XBF_FUA)
op_flags |= REQ_FUA;
if (bp->b_flags & XBF_FLUSH)