Commit 6c5412e2 authored by Bart Van Assche's avatar Bart Van Assche Committed by Jens Axboe

xen-blkback: Use the enum req_op and blk_opf_t types

Improve static type checking by using the enum req_op type for request
operations and the new blk_opf_t type for request flags.
Acked-by: default avatarRoger Pau Monné <roger.pau@citrix.com>
Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20220714180729.1065367-18-bvanassche@acm.orgSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 03df83ac
...@@ -442,7 +442,7 @@ static void free_req(struct xen_blkif_ring *ring, struct pending_req *req) ...@@ -442,7 +442,7 @@ static void free_req(struct xen_blkif_ring *ring, struct pending_req *req)
* Routines for managing virtual block devices (vbds). * Routines for managing virtual block devices (vbds).
*/ */
static int xen_vbd_translate(struct phys_req *req, struct xen_blkif *blkif, static int xen_vbd_translate(struct phys_req *req, struct xen_blkif *blkif,
int operation) enum req_op operation)
{ {
struct xen_vbd *vbd = &blkif->vbd; struct xen_vbd *vbd = &blkif->vbd;
int rc = -EACCES; int rc = -EACCES;
...@@ -1193,8 +1193,8 @@ static int dispatch_rw_block_io(struct xen_blkif_ring *ring, ...@@ -1193,8 +1193,8 @@ static int dispatch_rw_block_io(struct xen_blkif_ring *ring,
struct bio *bio = NULL; struct bio *bio = NULL;
struct bio **biolist = pending_req->biolist; struct bio **biolist = pending_req->biolist;
int i, nbio = 0; int i, nbio = 0;
int operation; enum req_op operation;
int operation_flags = 0; blk_opf_t operation_flags = 0;
struct blk_plug plug; struct blk_plug plug;
bool drain = false; bool drain = false;
struct grant_page **pages = pending_req->segments; struct grant_page **pages = pending_req->segments;
......
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