The meaning of the BLK_MQ_S_STOPPED flag is "do not call
.queue_rq()". Hence modify blk_mq_make_request() such that requests
are queued instead of issued if a queue has been stopped.
Reported-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Ming Lei <tom.leiming@gmail.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Cc: <stable@vger.kernel.org>
Signed-off-by: Jens Axboe <axboe@fb.com>
Orabug:
28766011
commit
bc27c01b5c46d3bfec42c96537c7a3fae0bb2cc4 upstream
Signed-off-by: Brian Maly <brian.maly@oracle.com>
Conflicts:
- There are so many commits between the most recent uek4 block commit and
this upstream commit, and blk_mq_make_request() in upstream commit is
different with uek4. blk_mq_direct_issue_request() is not available.
- The 3rd argument of blk_mq_insert_request() is set to false in this
backport because there is no need to run the queue again when it is
already stopped.
Signed-off-by: Dongli Zhang <dongli.zhang@oracle.com>
Reviewed-by: Joe Jin <joe.jin@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
blk_mq_bio_to_request(rq, bio);
+ if (unlikely(test_bit(BLK_MQ_S_STOPPED,
+ &data.hctx->state))) {
+ blk_mq_insert_request(rq, false, false, true);
+ goto done;
+ }
+
/*
* For OK queue, we are done. For error, kill it. Any other
* error (busy), just add it to our list as we previously