Thread (20 messages) 20 messages, 3 authors, 2017-06-20

Re: [PATCH 09/10] blk-mq-sched: unify request prepare methods

From: Christoph Hellwig <hch@lst.de>
Date: 2017-06-20 09:10:06

On Mon, Jun 19, 2017 at 03:32:09PM +0200, Paolo Valente wrote:
quoted
static void bfq_finish_request(struct request *rq)
{
-	struct bfq_queue *bfqq = RQ_BFQQ(rq);
-	struct bfq_data *bfqd = bfqq->bfqd;
+	struct bfq_queue *bfqq;
+	struct bfq_data *bfqd;
+
+	if (!rq->elv.icq)
+		return;
+
If this is a rq dispatched from a bfqq (or even a request still in the
scheduler), then just exiting here will break bfq state seriously.
However, I guess that this case can never occur.
It is a request for which we didn't manage to allocate the ioc.

Previously those wouldn't have REQ_ELVPRIV set and thus we wouldn't
call into the finish method.  Now they do and the finish method needs
to handle those just like the init method.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help