mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
block: store elevator state in request
Add an rq private RQF_ELV flag, which tells the block layer that this request was initialized on a queue that has an IO scheduler attached. This allows for faster checking in the fast path, rather than having to deference rq->q later on. Elevator switching does full quiesce of the queue before detaching an IO scheduler, so it's safe to cache this in the request itself. Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
90b8faa0e8
commit
2ff0682da6
3 changed files with 29 additions and 20 deletions
|
@ -55,6 +55,8 @@ typedef __u32 __bitwise req_flags_t;
|
|||
#define RQF_MQ_POLL_SLEPT ((__force req_flags_t)(1 << 20))
|
||||
/* ->timeout has been called, don't expire again */
|
||||
#define RQF_TIMED_OUT ((__force req_flags_t)(1 << 21))
|
||||
/* queue has elevator attached */
|
||||
#define RQF_ELV ((__force req_flags_t)(1 << 22))
|
||||
|
||||
/* flags that prevent us from merging requests: */
|
||||
#define RQF_NOMERGE_FLAGS \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue