diff options
author | Bart Van Assche <bart.vanassche@wdc.com> | 2017-08-23 19:56:29 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2017-08-23 20:02:30 +0200 |
commit | 130d733a616372ba5d375f9ca8da9378924b6889 (patch) | |
tree | 55af1bd8860198819d8654e0ae8e2629da627565 /block/blk-settings.c | |
parent | nullb: badbblocks support (diff) | |
download | linux-130d733a616372ba5d375f9ca8da9378924b6889.tar.xz linux-130d733a616372ba5d375f9ca8da9378924b6889.zip |
block: Warn if blk_queue_rq_timed_out() is called for a blk-mq queue
The timeout handler set by blk_queue_rq_timed_out() is only used
in single queue mode. Calling this function for blk-mq drivers is
wrong. Hence issue a warning if this function is called by a blk-mq
driver.
Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-settings.c')
-rw-r--r-- | block/blk-settings.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/block/blk-settings.c b/block/blk-settings.c index be1f115b538b..8559e9563c52 100644 --- a/block/blk-settings.c +++ b/block/blk-settings.c @@ -68,6 +68,7 @@ EXPORT_SYMBOL_GPL(blk_queue_rq_timeout); void blk_queue_rq_timed_out(struct request_queue *q, rq_timed_out_fn *fn) { + WARN_ON_ONCE(q->mq_ops); q->rq_timed_out_fn = fn; } EXPORT_SYMBOL_GPL(blk_queue_rq_timed_out); |