Skip to content

Commit

Permalink
Revert "blk-flush: Queue through IO scheduler when flush not required"
Browse files Browse the repository at this point in the history
This reverts commit 1b2ff19.

Jan writes:

--

Thanks for report! After some investigation I found out we allocate
elevator specific data in __get_request() only for non-flush requests. And
this is actually required since the flush machinery uses the space in
struct request for something else. Doh. So my patch is just wrong and not
easy to fix since at the time __get_request() is called we are not sure
whether the flush machinery will be used in the end. Jens, please revert
1b2ff19. Thanks!

I'm somewhat surprised that you can reliably hit the race where flushing
gets disabled for the device just while the request is in flight. But I
guess during boot it makes some sense.

--

So let's just revert it, we can fix the queue run manually after the
fact. This race is rare enough that it didn't trigger in testing, it
requires the specific disable-while-in-flight scenario to trigger.
  • Loading branch information
axboe committed Nov 25, 2015
1 parent 3b627a3 commit d7cf931
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion block/blk-flush.c
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ void blk_insert_flush(struct request *rq)
if (q->mq_ops) {
blk_mq_insert_request(rq, false, false, true);
} else
q->elevator->type->ops.elevator_add_req_fn(q, rq);
list_add_tail(&rq->queuelist, &q->queue_head);
return;
}

Expand Down

0 comments on commit d7cf931

Please sign in to comment.