linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Haberland <sth@linux.vnet.ibm.com>
To: axboe@fb.com
Cc: linux-kernel@vger.kernel.org
Subject: blk-mq timeout question
Date: Fri, 7 Jul 2017 15:45:44 +0200	[thread overview]
Message-ID: <97ae004d-e5ec-8197-ee1d-1770c931f46a@linux.vnet.ibm.com> (raw)

While changing the DASD device driver to use the blk-mq interfaces I 
found the following unexpected behavior:

In case of a timeout our complete callback is never called. Here is the 
sequence of events as I understood:

- timeout occurs
- blk_mq_check_expired() calls and checks blk_mark_rq_complete()
- our .timeout callback is called which returns BLK_EH_NOT_HANDLED and 
schedules delayed work
- our worker calls blk_mq_complete_request()
- this also checks blk_mark_rq_complete() and therefore never calls our 
complete callback

Question:
Should blk_clear_rq_complete() also be called for the BLK_EH_NOT_HANDLED 
case?

Regards,
Stefan

             reply	other threads:[~2017-07-07 13:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-07 13:45 Stefan Haberland [this message]
2017-07-10  2:23 ` blk-mq timeout question Ming Lei

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=97ae004d-e5ec-8197-ee1d-1770c931f46a@linux.vnet.ibm.com \
    --to=sth@linux.vnet.ibm.com \
    --cc=axboe@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).