Re: Outstanding MQ questions from MMC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 29, 2017 at 05:09:37AM +0200, Linus Walleij wrote:
> 2. When MMC cards are ejected a serious error condition occurs. So for this
> reason we spool out the queue with
> 
> req->rq_flags |= RQF_QUIET;
> blk_end_request_all(req, -EIO);
> 
> This will shut up a huge amount of console errors for example.
> I have no clue on how to manage this with MQ. I am currently using
> 
> blk_mq_complete_request(mq_rq->req, -EIO);
> 
> and nothing else, and it will hit all requests for the ejected card coming
> in from this point. Is this the right solution? Or is there some medium
> eject handling I'm not aware of inside the MQ layer? It seems like something
> that can happen on pluggable harddrives and CDROMS and what not.

Hot unplug handling currently is a mess in the block layer (not just the
mq case).  Especially if you ever requeue an I/O there is tons of
boilerplate code.  I wish we could move a little more of this into the
core, but right now I don't have a good idea on how to.

> 3. Sometimes a read or write gets partially completed. Say we read 12 out
> of 15 sectors or somthing like that. I have no idea how often this occurs in
> practice. With the old block layer we did this:
> 
> blk_end_request(req, 0, bytes_xfered);

You can still do this with mq, but you have to open code it.  Take a look
at scsi_end_request which has opencoded versions of the mq and non-mq
end_request routines.  Currently it's the only example of blk-mq partial
completions.
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux