Skip to content

Commit 7aef2e7

Browse files
majianpengaxboe
authored andcommitted
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: Jianpeng Ma <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent 6e46645 commit 7aef2e7

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

block/blk-core.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1549,11 +1549,9 @@ void blk_queue_bio(struct request_queue *q, struct bio *bio)
15491549
if (plug) {
15501550
/*
15511551
* If this is the first request added after a plug, fire
1552-
* of a plug trace. If others have been added before, check
1553-
* if we have multiple devices in this plug. If so, make a
1554-
* note to sort the list before dispatch.
1552+
* of a plug trace.
15551553
*/
1556-
if (list_empty(&plug->list))
1554+
if (!request_count)
15571555
trace_block_plug(q);
15581556
else {
15591557
if (request_count >= BLK_MAX_REQUEST_COUNT) {

0 commit comments

Comments
 (0)