]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
blktrace: fix comment in blktrace_api.h
authorSouvik Banerjee <souvik1997@gmail.com>
Fri, 30 Mar 2018 19:32:42 +0000 (14:32 -0500)
committerJens Axboe <axboe@kernel.dk>
Fri, 30 Mar 2018 20:16:24 +0000 (14:16 -0600)
The `__u64 time` field of the blk_io_trace struct refers to
the time in nanoseconds, not in microseconds. It is set in
__blk_add_trace, which does the following:

    t->time = ktime_to_ns(ktime_get());

ktime_to_ns returns ktime_t in nanoseconds, not microseconds.

Signed-off-by: Souvik Banerjee <souvik1997@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/uapi/linux/blktrace_api.h

index 3c50e07ee833116a726c19402f26cf63e91491e9..690621b610e50baa444adf1229890ee21d04a496 100644 (file)
@@ -101,7 +101,7 @@ enum blktrace_notify {
 struct blk_io_trace {
        __u32 magic;            /* MAGIC << 8 | version */
        __u32 sequence;         /* event number */
-       __u64 time;             /* in microseconds */
+       __u64 time;             /* in nanoseconds */
        __u64 sector;           /* disk offset */
        __u32 bytes;            /* transfer length */
        __u32 action;           /* what happened */