Commit edbe9597 authored by Mikulas Patocka's avatar Mikulas Patocka Committed by Mike Snitzer

dm zoned: remove test for impossible REQ_OP_FLUSH conditions

The value REQ_OP_FLUSH is only used by the block code for
request-based devices.

Remove the tests for REQ_OP_FLUSH from the bio-based dm-zoned-target.
Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
Reviewed-by: default avatarDamien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
parent ac6a3188
...@@ -588,7 +588,7 @@ static int dmz_map(struct dm_target *ti, struct bio *bio) ...@@ -588,7 +588,7 @@ static int dmz_map(struct dm_target *ti, struct bio *bio)
bio->bi_bdev = dev->bdev; bio->bi_bdev = dev->bdev;
if (!nr_sectors && (bio_op(bio) != REQ_OP_FLUSH) && (bio_op(bio) != REQ_OP_WRITE)) if (!nr_sectors && bio_op(bio) != REQ_OP_WRITE)
return DM_MAPIO_REMAPPED; return DM_MAPIO_REMAPPED;
/* The BIO should be block aligned */ /* The BIO should be block aligned */
...@@ -603,7 +603,7 @@ static int dmz_map(struct dm_target *ti, struct bio *bio) ...@@ -603,7 +603,7 @@ static int dmz_map(struct dm_target *ti, struct bio *bio)
bioctx->status = BLK_STS_OK; bioctx->status = BLK_STS_OK;
/* Set the BIO pending in the flush list */ /* Set the BIO pending in the flush list */
if (bio_op(bio) == REQ_OP_FLUSH || (!nr_sectors && bio_op(bio) == REQ_OP_WRITE)) { if (!nr_sectors && bio_op(bio) == REQ_OP_WRITE) {
spin_lock(&dmz->flush_lock); spin_lock(&dmz->flush_lock);
bio_list_add(&dmz->flush_list, bio); bio_list_add(&dmz->flush_list, bio);
spin_unlock(&dmz->flush_lock); spin_unlock(&dmz->flush_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment