blkparse: Print PID information for TN_MESSAGE events
authorJan Kara <jack@suse.cz>
Wed, 13 May 2020 16:04:02 +0000 (18:04 +0200)
committerJens Axboe <axboe@kernel.dk>
Wed, 20 May 2020 13:38:26 +0000 (07:38 -0600)
The kernel now provides PID information for TN_MESSAGE events. Print it.
Old kernels fill 0 there so the behavior is unaffected for them.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
blkparse.c

index 40e7bc2486ec79d3f35242575c7c77d37c2a8726..33dd02374ea8f9cde5bc643eb015f471ca4a2b13 100644 (file)
@@ -663,7 +663,7 @@ static void handle_notify(struct blk_io_trace *bit)
                                MAJOR(bit->device), MINOR(bit->device),
                                bit->cpu, "0", (int)SECONDS(bit->time),
                                (unsigned long)NANO_SECONDS(bit->time),
-                               0, cgidstr, "m", "N", msg);
+                               bit->pid, cgidstr, "m", "N", msg);
                }
                break;