Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@xxxxxxx> --- kernel/trace/blktrace.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c index 4bca03475336..fe1c9d549c0d 100644 --- a/kernel/trace/blktrace.c +++ b/kernel/trace/blktrace.c @@ -1292,14 +1292,24 @@ static void blk_add_trace_sleeprq(void *ignore, struct request_queue *q, struct bio *bio, int rw) { - if (bio) - blk_add_trace_bio(q, bio, BLK_TA_SLEEPRQ, 0); - else { + if (bio) { + if (q->blk_trace) { + blk_add_trace_bio(q, bio, BLK_TA_SLEEPRQ, 0); + } else if (q->blk_trace_ext) { + blk_add_trace_bio(q, bio, BLK_TA_SLEEPRQ_EXT, 0); + } + } else { struct blk_trace *bt = q->blk_trace; + struct blk_trace_ext *bte = q->blk_trace_ext; - if (bt) + if (q->blk_trace) { __blk_add_trace(bt, 0, 0, rw, 0, BLK_TA_SLEEPRQ, 0, 0, NULL, NULL); + } else if (q->blk_trace_ext) { + __blk_add_trace_ext(bte, 0, 0, rw, 0, + BLK_TA_SLEEPRQ_EXT, + 0, 0, NULL, NULL, 0); + } } } -- 2.19.1