[PATCHv3 08/10] block: add pi for nvme enhanced integrity
Martin K. Petersen
martin.petersen at oracle.com
Tue Mar 1 19:15:18 PST 2022
Christoph,
>> +static blk_status_t nvme_crc64_generate(struct blk_integrity_iter *iter,
>> + enum t10_dif_type type)
>
> Shouldn't the naming be something more like ext_pi_*? For one thing
> I kinda hate having the nvme prefix here in block layer code, but also
> nvme supports the normal 8 byte PI tuples, so this is a bit confusing.
The rationale behind the original t10 prefix was that the format was
defined by the T10 organization. At the time a T13 format was also on
the table. So from that perspective, using nvme_ here is correct. I do
like ext_ better, though.
I don't particularly appreciate the way the new formats were defined in
NVMe. I would have preferred new types instead of this "just like type N
except for all these differences" approach. But that comes from NVMe
completely missing how DIX removed all the format type knowledge from
the controller/device and instead put the burden on the driver to tell
the device what and how to check.
In any case: Naming is hard, the code looks fine to me.
Reviewed-by: Martin K. Petersen <martin.petersen at oracle.com>
--
Martin K. Petersen Oracle Linux Engineering
More information about the Linux-nvme
mailing list