Hi Martin,
thanks for the clarification, should I just update the
patch and add your signed-off line?
Anyway, some questions below:
On 3/3/25 6:25 PM, Martin K. Petersen wrote:
What: /sys/block/<disk>/integrity/format
@@ -117,6 +119,8 @@ Contact: Martin K. Petersen <martin.petersen@xxxxxxxxxx>
Description:
Metadata format for integrity capable block device.
E.g. T10-DIF-TYPE1-CRC.
+ If the storage device supports metadata but no PI
+ is used, this field will contain "nop".
This field describes the type of T10 Protection Information that the
block device is capable of sending and receiving. If the device does not
support sending and receiving T10 Protection Information, this field
contains "nop".
There can be "none" and "nop" here. My understanding was that "none"
means the device does not support any metadata space (no T10 profile possible)
while "nop" is that there is a metadata space but it is not used by
any known T10 profile. Is it correct?
What I need (in userspace):
- a flag that device supports non-PI metadata (is it that "nop" above?)
If not, then there is no way to check for non-PI metadata for non-NVMe
devices (as metadata_bytes is present on NVMe only)
- maximal size of usable metadata (currently NVMe metadata_bytes field).
...
Wrt. the size of opaque (non-PI) metadata, I think it would good to have
a dedicated field to describe it.
I think that metadata_bytes would be enough, if supported for all block devices
(note we emulate metadata in dm-integrity, so it should be set there too).
Thanks,
Milan