dm: use bio op accessors
Separate the op from the rq_flag_bits and have dm set/get the bio using bio_set_op_attrs/bio_op. Signed-off-by: Mike Christie <mchristi@redhat.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:

committed by
Jens Axboe

parent
528ec5abe6
commit
e6047149db
@@ -574,7 +574,8 @@ static void use_dmio(struct dm_buffer *b, int rw, sector_t block,
|
||||
{
|
||||
int r;
|
||||
struct dm_io_request io_req = {
|
||||
.bi_rw = rw,
|
||||
.bi_op = rw,
|
||||
.bi_op_flags = 0,
|
||||
.notify.fn = dmio_complete,
|
||||
.notify.context = b,
|
||||
.client = b->c->dm_io,
|
||||
@@ -634,7 +635,7 @@ static void use_inline_bio(struct dm_buffer *b, int rw, sector_t block,
|
||||
* the dm_buffer's inline bio is local to bufio.
|
||||
*/
|
||||
b->bio.bi_private = end_io;
|
||||
b->bio.bi_rw = rw;
|
||||
bio_set_op_attrs(&b->bio, rw, 0);
|
||||
|
||||
/*
|
||||
* We assume that if len >= PAGE_SIZE ptr is page-aligned.
|
||||
@@ -1327,7 +1328,8 @@ EXPORT_SYMBOL_GPL(dm_bufio_write_dirty_buffers);
|
||||
int dm_bufio_issue_flush(struct dm_bufio_client *c)
|
||||
{
|
||||
struct dm_io_request io_req = {
|
||||
.bi_rw = WRITE_FLUSH,
|
||||
.bi_op = REQ_OP_WRITE,
|
||||
.bi_op_flags = WRITE_FLUSH,
|
||||
.mem.type = DM_IO_KMEM,
|
||||
.mem.ptr.addr = NULL,
|
||||
.client = c->dm_io,
|
||||
|
Reference in New Issue
Block a user