Re: sysfs integrity fields use

2025-02-26 Thread Milan Broz
Hi, On 2/25/25 4:38 PM, Christoph Hellwig wrote: ... Then we have new (undocumented) value for NVMe in - /sys/block//integrity/metadata_bytes This contains the correct 64. Yes, this contains the full size of the metadata. And besides documenting it we should probably also lift it to the

Re: sysfs integrity fields use

2025-02-26 Thread Kanchan Joshi
On 2/25/2025 4:33 PM, Milan Broz wrote: > Sure, it is formatted to 4k data + 64 bytes metadata profile: > > # nvme id-ns -H /dev/nvme0n1 > ... > > LBA Format  0 : Metadata Size: 0   bytes - Data Size: 512 bytes - > Relative Performance: 0 Best > LBA Format  1 : Metadata Size: 8   bytes - Data Si

Re: sysfs integrity fields use

2025-02-25 Thread Christoph Hellwig
On Tue, Feb 25, 2025 at 10:23:49AM +0100, Milan Broz wrote: > Hi, > > I tried to add some support for using devices with PI/DIF metadata > For an NVMe drive, reformatted to 4096 + 64 profile, I see this: Based on everything below you have no formatted it with PI and you also don't plan to use PI,

Re: sysfs integrity fields use

2025-02-25 Thread Milan Broz
On 2/25/25 11:10 AM, Kanchan Joshi wrote: On 2/25/2025 2:53 PM, Milan Broz wrote: Hi, I tried to add some support for using devices with PI/DIF metadata and checked (through sysfs) how large metadata space per sector is available. The problem is that some values behave differently than I expec

Re: sysfs integrity fields use

2025-02-25 Thread Kanchan Joshi
On 2/25/2025 3:40 PM, Kanchan Joshi wrote: >>   According to docs, this is "Number of bytes of integrity tag space >>   available per 512 bytes of data." >>   (I think 512 bytes is incorrect; it should be sector size, or perhaps >>    value in protection_interval_bytes, though.) >> >> Then

Re: sysfs integrity fields use

2025-02-25 Thread Kanchan Joshi
On 2/25/2025 2:53 PM, Milan Broz wrote: > Hi, > > I tried to add some support for using devices with PI/DIF metadata > and checked (through sysfs) how large metadata space per sector > is available. > > The problem is that some values behave differently than I expected. > > For an NVMe drive, re

sysfs integrity fields use

2025-02-25 Thread Milan Broz
Hi, I tried to add some support for using devices with PI/DIF metadata and checked (through sysfs) how large metadata space per sector is available. The problem is that some values behave differently than I expected. For an NVMe drive, reformatted to 4096 + 64 profile, I see this: - /sys/block