Re: [PATCH v2 11/15] blktrace: add block trace commands for zone operations

Johannes Thumshirn
2025-10-07T13:08:03Z

On 10/3/25 9:33 AM, Christoph Hellwig wrote:
> On Thu, Sep 25, 2025 at 05:02:27PM +0200, Johannes Thumshirn wrote:
>> Add block trace commands for zone operations. These are added as a
>> separate set of 'block trace commands' shifted by 32bit so that they do
>> not interfere with the old 16bit wide trace command field in 'struct
>> blk_io_trace' action.
> Can you explain how the commands are handled for old/new here?
>
> Because I'd still much prefer to sort things out so that they make
> sense for the new code if possible. i.e. have a 32-bit command
> and 32 bit flags, and use sensible encoding for the new one, and
> remap the supported once to the old organically grown one.

Sure for the old commands everything is still in the lower 32bits, this
has the nice property that we don't need to duplicate all the code for
v1 and v2.

The commands added afterwards are intended to be in the upper 32bits,
which are discarded if the user requests the v1 format.

At least this was the original plan. I think I badly messed up v2 as the
new commands should re-start at 0 and be shifted up by 32bits.