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 f51c4de4d953..a5e33da53861 100644 --- a/kernel/trace/blktrace.c +++ b/kernel/trace/blktrace.c @@ -1151,7 +1151,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.19.1