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
@@ -624,14 +624,14 @@ static inline unsigned int blk_queue_cluster(struct request_queue *q)
|
||||
/*
|
||||
* We regard a request as sync, if either a read or a sync write
|
||||
*/
|
||||
static inline bool rw_is_sync(unsigned int rw_flags)
|
||||
static inline bool rw_is_sync(int op, unsigned int rw_flags)
|
||||
{
|
||||
return !(rw_flags & REQ_WRITE) || (rw_flags & REQ_SYNC);
|
||||
return op == REQ_OP_READ || (rw_flags & REQ_SYNC);
|
||||
}
|
||||
|
||||
static inline bool rq_is_sync(struct request *rq)
|
||||
{
|
||||
return rw_is_sync(rq->cmd_flags);
|
||||
return rw_is_sync(req_op(rq), rq->cmd_flags);
|
||||
}
|
||||
|
||||
static inline bool blk_rl_full(struct request_list *rl, bool sync)
|
||||
|
Reference in New Issue
Block a user