mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
block: add accessors for setting/querying request deadline
We reduce the resolution of request expiry, but since we're already using jiffies for this where resolution depends on the kernel configuration and since the timeout resolution is coarse anyway, that should be fine. Reviewed-by: Bart Van Assche <[email protected]> Reviewed-by: Omar Sandoval <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
76a86f9d02
commit
0a72e7f449
4 changed files with 27 additions and 8 deletions
15
block/blk.h
15
block/blk.h
|
|
@ -236,6 +236,21 @@ static inline void req_set_nomerge(struct request_queue *q, struct request *req)
|
|||
q->last_merge = NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Steal a bit from this field for legacy IO path atomic IO marking. Note that
|
||||
* setting the deadline clears the bottom bit, potentially clearing the
|
||||
* completed bit. The user has to be OK with this (current ones are fine).
|
||||
*/
|
||||
static inline void blk_rq_set_deadline(struct request *rq, unsigned long time)
|
||||
{
|
||||
rq->__deadline = time & ~0x1UL;
|
||||
}
|
||||
|
||||
static inline unsigned long blk_rq_deadline(struct request *rq)
|
||||
{
|
||||
return rq->__deadline & ~0x1UL;
|
||||
}
|
||||
|
||||
/*
|
||||
* Internal io_context interface
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue