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
@@ -403,7 +403,7 @@ void dm_rh_mark_nosync(struct dm_region_hash *rh, struct bio *bio)
|
||||
return;
|
||||
}
|
||||
|
||||
if (bio->bi_rw & REQ_DISCARD)
|
||||
if (bio_op(bio) == REQ_OP_DISCARD)
|
||||
return;
|
||||
|
||||
/* We must inform the log that the sync count has changed. */
|
||||
@@ -526,7 +526,7 @@ void dm_rh_inc_pending(struct dm_region_hash *rh, struct bio_list *bios)
|
||||
struct bio *bio;
|
||||
|
||||
for (bio = bios->head; bio; bio = bio->bi_next) {
|
||||
if (bio->bi_rw & (REQ_FLUSH | REQ_DISCARD))
|
||||
if (bio->bi_rw & REQ_FLUSH || bio_op(bio) == REQ_OP_DISCARD)
|
||||
continue;
|
||||
rh_inc(rh, dm_rh_bio_to_region(rh, bio));
|
||||
}
|
||||
|
Reference in New Issue
Block a user