Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <majianpeng@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Jianpeng Ma and committed by
Jens Axboe
7aef2e78 6e466452

+2 -4
+2 -4
block/blk-core.c
··· 1549 1549 if (plug) { 1550 1550 /* 1551 1551 * 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. 1555 1553 */ 1556 - if (list_empty(&plug->list)) 1554 + if (!request_count) 1557 1555 trace_block_plug(q); 1558 1556 else { 1559 1557 if (request_count >= BLK_MAX_REQUEST_COUNT) {