Re: [PATCH 04/16] blktrace: add definitions for struct blk_io_trace2
From: Christoph Hellwig <hch@lst.de>
Date: 2025-09-19 15:08:50
Also in:
linux-block, lkml
From: Christoph Hellwig <hch@lst.de>
Date: 2025-09-19 15:08:50
Also in:
linux-block, lkml
On Tue, Sep 09, 2025 at 01:05:59PM +0200, Johannes Thumshirn wrote:
+struct blk_io_trace2 {
+ __u32 magic; /* MAGIC << 8 | BLK_IO_TRACE2_VERSION */
+ __u32 sequence; /* event number */
+ __u64 time; /* in nanoseconds */
+ __u64 sector; /* disk offset */
+ __u32 bytes; /* transfer length */
+ __u32 pid; /* who did it */
+ __u64 action; /* what happened */
+ __u32 device; /* device number */
+ __u32 cpu; /* on what cpu did it happen */
+ __u16 error; /* completion error */
+ __u16 pdu_len; /* length of data after this trace */
+ /* cgroup id will be stored here if exists */
+};This structure is not u64-aligned, which means it will have different sizes for x86-32 vs all other architectures, making it a pain to handle. Also maybe add some extra padding so that we can extend this?