Skip to content

Commit

Permalink
block: trace all devices plug operation
Browse files Browse the repository at this point in the history
In func blk_queue_bio, if list of plug is empty,it will call
blk_trace_plug.
If process deal with a single device,it't ok.But if process deal with
multi devices,it only trace the first device.
Using request_count to judge, it can soleve this problem.

In addition, i modify the comment.

Signed-off-by: Jianpeng Ma <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
majianpeng authored and axboe committed Sep 11, 2013
1 parent 6e46645 commit 7aef2e7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions block/blk-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1549,11 +1549,9 @@ void blk_queue_bio(struct request_queue *q, struct bio *bio)
if (plug) {
/*
* If this is the first request added after a plug, fire
* of a plug trace. If others have been added before, check
* if we have multiple devices in this plug. If so, make a
* note to sort the list before dispatch.
* of a plug trace.
*/
if (list_empty(&plug->list))
if (!request_count)
trace_block_plug(q);
else {
if (request_count >= BLK_MAX_REQUEST_COUNT) {
Expand Down

0 comments on commit 7aef2e7

Please sign in to comment.