block: convert is_sync helpers to use REQ_OPs.
This patch converts the is_sync helpers to use separate variables for the operation and flags. Signed-off-by: Mike Christie <mchristi@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> 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
8fe0d473f5
commit
d9d8c5c489
@@ -962,7 +962,7 @@ static void __freed_request(struct request_list *rl, int sync)
|
||||
static void freed_request(struct request_list *rl, int op, unsigned int flags)
|
||||
{
|
||||
struct request_queue *q = rl->q;
|
||||
int sync = rw_is_sync(op | flags);
|
||||
int sync = rw_is_sync(op, flags);
|
||||
|
||||
q->nr_rqs[sync]--;
|
||||
rl->count[sync]--;
|
||||
@@ -1075,7 +1075,7 @@ static struct request *__get_request(struct request_list *rl, int op,
|
||||
struct elevator_type *et = q->elevator->type;
|
||||
struct io_context *ioc = rq_ioc(bio);
|
||||
struct io_cq *icq = NULL;
|
||||
const bool is_sync = rw_is_sync(op | op_flags) != 0;
|
||||
const bool is_sync = rw_is_sync(op, op_flags) != 0;
|
||||
int may_queue;
|
||||
|
||||
if (unlikely(blk_queue_dying(q)))
|
||||
@@ -1244,7 +1244,7 @@ static struct request *get_request(struct request_queue *q, int op,
|
||||
int op_flags, struct bio *bio,
|
||||
gfp_t gfp_mask)
|
||||
{
|
||||
const bool is_sync = rw_is_sync(op | op_flags) != 0;
|
||||
const bool is_sync = rw_is_sync(op, op_flags) != 0;
|
||||
DEFINE_WAIT(wait);
|
||||
struct request_list *rl;
|
||||
struct request *rq;
|
||||
|
Reference in New Issue
Block a user