Re: [PATCH 01/12] blk-mq: Do not invoke .queue_rq() for a stopped queue
On Wed, Oct 26, 2016 at 03:50:44PM -0700, Bart Van Assche wrote: > 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> Signed-off-by: Bart Van Assche > Reviewed-by: Christoph Hellwig Looks good, Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg) Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850 -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 01/12] blk-mq: Do not invoke .queue_rq() for a stopped queue
Reviewed-by: Sagi Grimberg-- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 01/12] blk-mq: Do not invoke .queue_rq() for a stopped queue
On 10/27/2016 12:50 AM, Bart Van Assche wrote: > 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> Signed-off-by: Bart Van Assche > Reviewed-by: Christoph Hellwig > Reviewed-by: Ming Lei > Cc: Hannes Reinecke > Cc: Sagi Grimberg > Cc: Johannes Thumshirn > Cc: > --- > block/blk-mq.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/block/blk-mq.c b/block/blk-mq.c > index ddc2eed..b5dcafb 100644 > --- a/block/blk-mq.c > +++ b/block/blk-mq.c > @@ -1332,9 +1332,9 @@ static blk_qc_t blk_mq_make_request(struct > request_queue *q, struct bio *bio) > blk_mq_put_ctx(data.ctx); > if (!old_rq) > goto done; > - if (!blk_mq_direct_issue_request(old_rq, )) > - goto done; > - blk_mq_insert_request(old_rq, false, true, true); > + if (test_bit(BLK_MQ_S_STOPPED, >state) || > + blk_mq_direct_issue_request(old_rq, ) != 0) > + blk_mq_insert_request(old_rq, false, true, true); > goto done; > } > > Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes ReineckeTeamlead Storage & Networking h...@suse.de +49 911 74053 688 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton HRB 21284 (AG Nürnberg) -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 01/12] blk-mq: Do not invoke .queue_rq() for a stopped queue
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 LeiSigned-off-by: Bart Van Assche Reviewed-by: Christoph Hellwig Reviewed-by: Ming Lei Cc: Hannes Reinecke Cc: Sagi Grimberg Cc: Johannes Thumshirn Cc: --- block/blk-mq.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index ddc2eed..b5dcafb 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -1332,9 +1332,9 @@ static blk_qc_t blk_mq_make_request(struct request_queue *q, struct bio *bio) blk_mq_put_ctx(data.ctx); if (!old_rq) goto done; - if (!blk_mq_direct_issue_request(old_rq, )) - goto done; - blk_mq_insert_request(old_rq, false, true, true); + if (test_bit(BLK_MQ_S_STOPPED, >state) || + blk_mq_direct_issue_request(old_rq, ) != 0) + blk_mq_insert_request(old_rq, false, true, true); goto done; } -- 2.10.1 -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html