Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@xxxxxxx> --- kernel/trace/blktrace.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c index ff4eee1d33d8..19a71a495f86 100644 --- a/kernel/trace/blktrace.c +++ b/kernel/trace/blktrace.c @@ -1147,7 +1147,14 @@ static void blk_add_trace_rq_requeue(void *ignore, static void blk_add_trace_rq_complete(void *ignore, struct request *rq, int error, unsigned int nr_bytes) { - blk_add_trace_rq(rq, error, nr_bytes, BLK_TA_COMPLETE, + u64 ta = 0; + + if (rq->q->blk_trace) { + ta = BLK_TA_COMPLETE; + } else if (rq->q->blk_trace_ext) { + ta = BLK_TA_COMPLETE_EXT; + } + blk_add_trace_rq(rq, error, nr_bytes, ta, blk_trace_request_get_cgid(rq->q, rq)); } -- 2.22.1