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
@@ -261,7 +261,7 @@ static int mirror_flush(struct dm_target *ti)
|
||||
struct mirror *m;
|
||||
struct dm_io_request io_req = {
|
||||
.bi_op = REQ_OP_WRITE,
|
||||
.bi_op_flags = WRITE_FLUSH,
|
||||
.bi_op_flags = REQ_PREFLUSH,
|
||||
.mem.type = DM_IO_KMEM,
|
||||
.mem.ptr.addr = NULL,
|
||||
.client = ms->io_client,
|
||||
@@ -657,7 +657,7 @@ static void do_write(struct mirror_set *ms, struct bio *bio)
|
||||
struct mirror *m;
|
||||
struct dm_io_request io_req = {
|
||||
.bi_op = REQ_OP_WRITE,
|
||||
.bi_op_flags = bio->bi_opf & WRITE_FLUSH_FUA,
|
||||
.bi_op_flags = bio->bi_opf & (REQ_FUA | REQ_PREFLUSH),
|
||||
.mem.type = DM_IO_BIO,
|
||||
.mem.ptr.bio = bio,
|
||||
.notify.fn = write_callback,
|
||||
|
||||
Reference in New Issue
Block a user