diff options
author | Jens Axboe <axboe@fb.com> | 2014-04-24 08:51:47 -0600 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2014-04-24 08:51:47 -0600 |
commit | 87ee7b112193bd081ba1a171fa5f6f39c429ef56 (patch) | |
tree | fbf88d2de279209467dee4d6cd9007f5daa8a678 /block/blk-mq.h | |
parent | 70ab0b2d51f84fc7d9eb6ed81c3986595efaa33d (diff) | |
download | linux-87ee7b112193bd081ba1a171fa5f6f39c429ef56.tar.bz2 |
blk-mq: fix race with timeouts and requeue events
If a requeue event races with a timeout, we can get into the
situation where we attempt to complete a request from the
timeout handler when it's not start anymore. This causes a crash.
So have the timeout handler check that REQ_ATOM_STARTED is still
set on the request - if not, we ignore the event. If this happens,
the request has now been marked as complete. As a consequence, we
need to ensure to clear REQ_ATOM_COMPLETE in blk_mq_start_request(),
as to maintain proper request state.
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk-mq.h')
-rw-r--r-- | block/blk-mq.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/block/blk-mq.h b/block/blk-mq.h index 5fa14f19f752..b41a784de50d 100644 --- a/block/blk-mq.h +++ b/block/blk-mq.h @@ -51,6 +51,4 @@ void blk_mq_disable_hotplug(void); extern unsigned int *blk_mq_make_queue_map(struct blk_mq_tag_set *set); extern int blk_mq_update_queue_map(unsigned int *map, unsigned int nr_queues); -void blk_mq_add_timer(struct request *rq); - #endif |