public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: error returns from ->queue_rq
Date: Tue, 11 Feb 2014 01:29:04 -0800	[thread overview]
Message-ID: <20140211092904.GA6229@infradead.org> (raw)

Hi Jens,

seems like with the SCSI work I introduced the first
BLK_MQ_RQ_QUEUE_ERROR error return in the tree, and immediately ran into
the first pitfall.  The code as-is expects rq->errors set to an error
value, which otherwise is an  internal field used by the block layer and
some drivers, but not part of the communication protocol between the
two.

We can either make it part of the protocol for blk-mq, which would
require documenting and praying driver writers get it right, or
alternatively we could map BLK_MQ_RQ_QUEUE_ERROR to -EIO and if
nessecary introduce other return values if we need to return other
errors.  The third option would be to remove BLK_MQ_RQ_QUEUE_ERROR
entirely and require drivers to call blk_mq_end_io themselves from
->queue_rq, mirroring the ->queuecommand error handling.  I'm undecided
between options 2 and 3, but I'd rather avoid the current pitfall.

             reply	other threads:[~2014-02-11  9:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-11  9:29 Christoph Hellwig [this message]
2014-02-11 15:44 ` error returns from ->queue_rq Jens Axboe

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=20140211092904.GA6229@infradead.org \
    --to=hch@infradead.org \
    --cc=axboe@kernel.dk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@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