bcache: use bio op accessors
Separate the op from the rq_flag_bits and have bcache 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
e6047149db
commit
ad0d9e76a4
@@ -52,7 +52,7 @@ void bch_btree_verify(struct btree *b)
|
||||
bio->bi_bdev = PTR_CACHE(b->c, &b->key, 0)->bdev;
|
||||
bio->bi_iter.bi_sector = PTR_OFFSET(&b->key, 0);
|
||||
bio->bi_iter.bi_size = KEY_SIZE(&v->key) << 9;
|
||||
bio->bi_rw = REQ_META|READ_SYNC;
|
||||
bio_set_op_attrs(bio, REQ_OP_READ, REQ_META|READ_SYNC);
|
||||
bch_bio_map(bio, sorted);
|
||||
|
||||
submit_bio_wait(bio);
|
||||
@@ -114,7 +114,7 @@ void bch_data_verify(struct cached_dev *dc, struct bio *bio)
|
||||
check = bio_clone(bio, GFP_NOIO);
|
||||
if (!check)
|
||||
return;
|
||||
check->bi_rw |= READ_SYNC;
|
||||
bio_set_op_attrs(check, REQ_OP_READ, READ_SYNC);
|
||||
|
||||
if (bio_alloc_pages(check, GFP_NOIO))
|
||||
goto out_put;
|
||||
|
Reference in New Issue
Block a user