Skip to content

Commit 587562d

Browse files
idryomovaxboe
authored andcommitted
blk-mq: I/O and timer unplugs are inverted in blktrace
trace_block_unplug() takes true for explicit unplugs and false for implicit unplugs. schedule() unplugs are implicit and should be reported as timer unplugs. While correct in the legacy code, this has been inverted in blk-mq since 4.11. Cc: stable@vger.kernel.org Fixes: bd166ef ("blk-mq-sched: add framework for MQ capable IO schedulers") Reviewed-by: Omar Sandoval <osandov@fb.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 0f843e6 commit 587562d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

block/blk-mq.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1628,7 +1628,7 @@ void blk_mq_flush_plug_list(struct blk_plug *plug, bool from_schedule)
16281628
BUG_ON(!rq->q);
16291629
if (rq->mq_ctx != this_ctx) {
16301630
if (this_ctx) {
1631-
trace_block_unplug(this_q, depth, from_schedule);
1631+
trace_block_unplug(this_q, depth, !from_schedule);
16321632
blk_mq_sched_insert_requests(this_q, this_ctx,
16331633
&ctx_list,
16341634
from_schedule);
@@ -1648,7 +1648,7 @@ void blk_mq_flush_plug_list(struct blk_plug *plug, bool from_schedule)
16481648
* on 'ctx_list'. Do those.
16491649
*/
16501650
if (this_ctx) {
1651-
trace_block_unplug(this_q, depth, from_schedule);
1651+
trace_block_unplug(this_q, depth, !from_schedule);
16521652
blk_mq_sched_insert_requests(this_q, this_ctx, &ctx_list,
16531653
from_schedule);
16541654
}

0 commit comments

Comments
 (0)