Commit 7aef2e78 authored by Jianpeng Ma's avatar Jianpeng Ma Committed by Jens Axboe

block: trace all devices plug operation

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: default avatarJianpeng Ma <majianpeng@gmail.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 6e466452
...@@ -1549,11 +1549,9 @@ void blk_queue_bio(struct request_queue *q, struct bio *bio) ...@@ -1549,11 +1549,9 @@ void blk_queue_bio(struct request_queue *q, struct bio *bio)
if (plug) { if (plug) {
/* /*
* If this is the first request added after a plug, fire * If this is the first request added after a plug, fire
* of a plug trace. If others have been added before, check * of a plug trace.
* if we have multiple devices in this plug. If so, make a
* note to sort the list before dispatch.
*/ */
if (list_empty(&plug->list)) if (!request_count)
trace_block_plug(q); trace_block_plug(q);
else { else {
if (request_count >= BLK_MAX_REQUEST_COUNT) { if (request_count >= BLK_MAX_REQUEST_COUNT) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment