Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

blktrace: add definitions for struct blk_io_trace2

Add definitions for the extended version of the blktrace protocol using a
wider action type to be able to record new actions in the kernel.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Johannes Thumshirn and committed by
Jens Axboe
c44347d6 113cbd62

+17
+16
include/uapi/linux/blktrace_api.h
··· 94 94 95 95 #define BLK_IO_TRACE_MAGIC 0x65617400 96 96 #define BLK_IO_TRACE_VERSION 0x07 97 + #define BLK_IO_TRACE2_VERSION 0x08 97 98 98 99 /* 99 100 * The trace itself ··· 114 113 /* cgroup id will be stored here if exists */ 115 114 }; 116 115 116 + struct blk_io_trace2 { 117 + __u32 magic; /* MAGIC << 8 | BLK_IO_TRACE2_VERSION */ 118 + __u32 sequence; /* event number */ 119 + __u64 time; /* in nanoseconds */ 120 + __u64 sector; /* disk offset */ 121 + __u32 bytes; /* transfer length */ 122 + __u32 pid; /* who did it */ 123 + __u64 action; /* what happened */ 124 + __u32 device; /* device number */ 125 + __u32 cpu; /* on what cpu did it happen */ 126 + __u16 error; /* completion error */ 127 + __u16 pdu_len; /* length of data after this trace */ 128 + __u8 pad[12]; 129 + /* cgroup id will be stored here if it exists */ 130 + }; 117 131 /* 118 132 * The remap event 119 133 */
+1
kernel/trace/blktrace.c
··· 1616 1616 1617 1617 BUILD_BUG_ON(__alignof__(struct blk_user_trace_setup2) % 1618 1618 __alignof__(long)); 1619 + BUILD_BUG_ON(__alignof__(struct blk_io_trace2) % __alignof__(long)); 1619 1620 1620 1621 return 0; 1621 1622 }