Skip to content

Commit

Permalink
block: do not notify urgent request, when flush with data in flight
Browse files Browse the repository at this point in the history
MMC device driver implements URGENT request execution with priority
(using stop flow), as a result currently running (and prepared) request
may be reinserted back into I/O scheduler. This will break block layer
logic of flushes (flush request should not be inserted into I/O scheduler).

Block layer flush machinery keep q->flush_data_in_flight list updated with
started but not completed flush requests with data (REQ_FUA).

This change will not notify underling block device driver about pending
urgent request during flushes in flight.

Change-Id: I8b654925a3c989250fcb8f4f7c998795fb203923
Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>
Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org>
  • Loading branch information
Tatyana Brokhman authored and imoseyon committed Oct 3, 2014
1 parent 4bb4f5d commit db0520a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion block/blk-core.c
Expand Up @@ -314,7 +314,8 @@ void __blk_run_queue(struct request_queue *q)
if (!q->notified_urgent &&
q->elevator->type->ops.elevator_is_urgent_fn &&
q->urgent_request_fn &&
q->elevator->type->ops.elevator_is_urgent_fn(q)) {
q->elevator->type->ops.elevator_is_urgent_fn(q) &&
list_empty(&q->flush_data_in_flight)) {
q->notified_urgent = true;
q->urgent_request_fn(q);
} else
Expand Down

0 comments on commit db0520a

Please sign in to comment.