[PATCH v4 0/5] block: use integrity interval instead of sector as seed

Martin K. Petersen martin.petersen at oracle.com
Sun Jul 12 16:09:01 PDT 2026


Caleb,

> The block integrity layer currently sets the integrity seed (initial
> reference tag) in units of 512-byte sectors.

... because that is the fundamental addressing unit in the block layer.

> However, Type 1 and Type 2 ref tags are actually in units of integrity
> intervals.

They are not in units of anything until they reach their final
protection envelope.

> On devices with integrity interval size > 512 bytes, ref tags are
> seeded incorrectly.

The bip seed is whatever the caller decides it should be. The integrity
interval size is irrelevant. As is the destination LBA.

> But REQ_OP_ZONE_APPEND operations don't have their ref tags remapped,
> so the ref tags using units of sectors will be stored to the device.

Then there's a problem with how we handle REQ_OP_ZONE_APPEND. For NVMe,
the PIREMAP flag should address this issue by remapping the written ref
tags based on their ultimate destination LBA.

Fundamentally, you should be able to set the bip seed for any READ or
WRITE bio to 42, regardless of logical block size, and have it work. If
it doesn't, then that's a bug.

The fact that the block layer happens to know the start LBA or ZSLBA
does not mean that callers above the block layer have access to the same
information. Changing the block layer's integrity handling semantics is
not the correct approach. Everything above the block layer depends on
the existing, format-agnostic, semantics.

-- 
Martin K. Petersen



More information about the Linux-nvme mailing list