lkml.org 
[lkml]   [2014]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: error returns from ->queue_rq
On Tue, Feb 11 2014, Christoph Hellwig wrote:
> 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.

Lets go for option #2. I agree that we should not make this a new
depedency, it's a lot more robust to just have it be -EIO and add other
error returns as needed.

--
Jens Axboe



\
 
 \ /
  Last update: 2014-02-12 06:41    [W:0.231 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site