On 1/9/18 11:43 AM, Bart Van Assche wrote: > On Tue, 2018-01-09 at 11:27 -0700, Jens Axboe wrote: >> static inline int blk_mark_rq_complete(struct request *rq) >> { >> - return test_and_set_bit(REQ_ATOM_COMPLETE, &rq->atomic_flags); >> + return test_and_set_bit(0, &rq->__deadline); >> } >> >> static inline void blk_clear_rq_complete(struct request *rq) >> { >> - clear_bit(REQ_ATOM_COMPLETE, &rq->atomic_flags); >> + clear_bit(0, &rq->__deadline); >> +} >> + >> +static inline bool blk_rq_is_complete(struct request *rq) >> +{ >> + return test_bit(0, &rq->__deadline); >> } > > Hello Jens, > > With this change setting or changing the deadline clears the COMPLETE flag. > Is that the intended behavior? If so, should perhaps a comment be added above > blk_rq_set_deadline()? Yeah, it's intentional. I can add a comment to that effect. It's only done before queueing - except for the case where we force a timeout, but for that it's only on the blk-mq side, which doesn't care. -- Jens Axboe