blk-mq: request deadline must be visible before marking rq as started
authorJens Axboe <axboe@fb.com>
Tue, 16 Sep 2014 16:37:37 +0000 (10:37 -0600)
committerJens Axboe <axboe@fb.com>
Mon, 30 Mar 2015 18:54:55 +0000 (12:54 -0600)
commitc2041be254447c1abb7fdcddd33615d1e744f0fa
tree7a77f4530d1b2c6275f8301c43ba60b117419226
parent4ab2e6fb33c4f52bf9fd3f2c7a4f055a6a48e9e2
blk-mq: request deadline must be visible before marking rq as started

When we start the request, we set the deadline and flip the bits
marking the request as started and non-complete. However, it's
important that the deadline store is ordered before flipping the
bits, otherwise we could have a small window where the request is
marked started but with an invalid deadline. This can confuse the
timeout handling.

Suggested-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/blk-mq.c