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:

committed by
Jens Axboe

parent
a2b809672e
commit
70fd76140a
@@ -58,7 +58,7 @@ static void nvmet_execute_rw(struct nvmet_req *req)
|
||||
|
||||
if (req->cmd->rw.opcode == nvme_cmd_write) {
|
||||
op = REQ_OP_WRITE;
|
||||
op_flags = WRITE_ODIRECT;
|
||||
op_flags = REQ_SYNC | REQ_IDLE;
|
||||
if (req->cmd->rw.control & cpu_to_le16(NVME_RW_FUA))
|
||||
op_flags |= REQ_FUA;
|
||||
} else {
|
||||
@@ -109,7 +109,7 @@ static void nvmet_execute_flush(struct nvmet_req *req)
|
||||
bio->bi_bdev = req->ns->bdev;
|
||||
bio->bi_private = req;
|
||||
bio->bi_end_io = nvmet_bio_done;
|
||||
bio_set_op_attrs(bio, REQ_OP_WRITE, WRITE_FLUSH);
|
||||
bio->bi_opf = REQ_OP_WRITE | REQ_PREFLUSH;
|
||||
|
||||
submit_bio(bio);
|
||||
}
|
||||
|
Reference in New Issue
Block a user