summaryrefslogtreecommitdiffstats
path: root/drivers/block/xen-blkfront.c
diff options
context:
space:
mode:
authorMike Christie <mchristi@redhat.com>2016-06-05 15:32:17 -0400
committerJens Axboe <axboe@fb.com>2016-06-07 15:41:38 -0400
commitc2df40dfb8c015211ec55f4b1dd0587f875c7b34 (patch)
tree8660ea8a2a00b0248fa609e7e6b737a8d92306d9 /drivers/block/xen-blkfront.c
parentd9d8c5c489f4969667a05727e9c2c4f78cffef1a (diff)
drivers: use req op accessor
The req operation REQ_OP is separated from the rq_flag_bits definition. This converts the block layer drivers to use req_op to get the op from the request struct. Signed-off-by: Mike Christie <mchristi@redhat.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/block/xen-blkfront.c')
-rw-r--r--drivers/block/xen-blkfront.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
index 52963a26660a..6fd160197b7a 100644
--- a/drivers/block/xen-blkfront.c
+++ b/drivers/block/xen-blkfront.c
@@ -844,7 +844,8 @@ static int blkif_queue_request(struct request *req, struct blkfront_ring_info *r
844 if (unlikely(rinfo->dev_info->connected != BLKIF_STATE_CONNECTED)) 844 if (unlikely(rinfo->dev_info->connected != BLKIF_STATE_CONNECTED))
845 return 1; 845 return 1;
846 846
847 if (unlikely(req->cmd_flags & (REQ_DISCARD | REQ_SECURE))) 847 if (unlikely(req_op(req) == REQ_OP_DISCARD ||
848 req->cmd_flags & REQ_SECURE))
848 return blkif_queue_discard_req(req, rinfo); 849 return blkif_queue_discard_req(req, rinfo);
849 else 850 else
850 return blkif_queue_rw_req(req, rinfo); 851 return blkif_queue_rw_req(req, rinfo);
@@ -2054,8 +2055,9 @@ static int blkif_recover(struct blkfront_info *info)
2054 /* 2055 /*
2055 * Get the bios in the request so we can re-queue them. 2056 * Get the bios in the request so we can re-queue them.
2056 */ 2057 */
2057 if (copy[i].request->cmd_flags & 2058 if (copy[i].request->cmd_flags & REQ_FLUSH ||
2058 (REQ_FLUSH | REQ_FUA | REQ_DISCARD | REQ_SECURE)) { 2059 req_op(copy[i].request) == REQ_OP_DISCARD ||
2060 copy[i].request->cmd_flags & (REQ_FUA | REQ_SECURE)) {
2059 /* 2061 /*
2060 * Flush operations don't contain bios, so 2062 * Flush operations don't contain bios, so
2061 * we need to requeue the whole request 2063 * we need to requeue the whole request