On Thu, 2017-10-19 at 16:21 -0400, Josef Bacik wrote:
> +     blk_mq_start_request(req);
>       if (unlikely(nsock->pending && nsock->pending != req)) {
>               blk_mq_requeue_request(req, true);
>               ret = 0;

(replying to an e-mail from seven months ago)

Hello Josef,

Are you aware that the nbd driver is one of the very few block drivers that
calls blk_mq_requeue_request() after a request has been started? I think that
can lead to the block layer core to undesired behavior, e.g. that the timeout
handler fires concurrently with a request being reinstered. Can you or a
colleague have a look at this? I would like to add the following code to the
block layer core and I think that the nbd driver would trigger this warning:

 void blk_mq_requeue_request(struct request *rq, bool kick_requeue_list)
 {
+       WARN_ON_ONCE(old_state != MQ_RQ_COMPLETE);
+
        __blk_mq_requeue_request(rq);

Thanks,

Bart.

Reply via email to