Re: split out the auto-PI code and data structures v2

2025-02-26 Thread Jens Axboe
On Tue, 25 Feb 2025 07:44:30 -0800, Christoph Hellwig wrote: > this is the tip of the iceberg of some of the PI work I've done a while > ago, and given the current discussions it might be a good time to send it > out. > > The idea is to: > > a) make the auto-PI code stand out more clearly as i

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: [PATCH 3/3] block: split struct bio_integrity_payload

2025-02-26 Thread Anuj gupta
Tested in-kernel block integrity path and io_uring PI interface path using fio workloads with this new in-kernel plumbing. Tested-by: Anuj Gupta Reviewed-by: Anuj Gupta

[PATCH v2 1/2] block: ensure correct integrity capability propagation in stacked devices

2025-02-26 Thread Anuj Gupta
queue_limits_stack_integrity() incorrectly sets BLK_INTEGRITY_DEVICE_CAPABLE for a DM device even when none of its underlying devices support integrity. This happens because the flag is inherited from the first base device, even if it lacks integrity support. This patch ensures that BLK_INTEGRITY_D

[PATCH v2 2/2] block: Correctly initialize BLK_INTEGRITY_NOGENERATE and BLK_INTEGRITY_NOVERIFY

2025-02-26 Thread Anuj Gupta
Currently, BLK_INTEGRITY_NOGENERATE and BLK_INTEGRITY_NOVERIFY are not explicitly set during integrity initialization. This can lead to incorrect reporting of read_verify and write_generate sysfs values, particularly when a device does not support integrity. This patch ensures that these flags are

[PATCH v2 0/2] Fix integrity sysfs reporting inconsistencies

2025-02-26 Thread Anuj Gupta
Patch 1: Ensures DM devices correctly propagate device_is_integrity_capable Patch 2: initialize nogenerate and noverify correctly v1 -> v2 initialize BLK_INTEGRITY_NOGENERATE and BLK_INTEGRITY_NOVERIFY in blk_validate_integrity_limits rather than doing it in the driver (hch) Anuj Gupta (2): blo

Re: [PATCH v1 1/3] block: Fix incorrect integrity sysfs reporting for DM devices

2025-02-26 Thread Anuj gupta
> > diff --git a/block/blk-settings.c b/block/blk-settings.c > > index c44dadc35e1e..c32517c8bc2e 100644 > > --- a/block/blk-settings.c > > +++ b/block/blk-settings.c > > @@ -861,7 +861,8 @@ bool queue_limits_stack_integrity(struct queue_limits > > *t, > > > > if (!ti->tuple_size) { > >

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: [PATCH 3/3] block: split struct bio_integrity_payload

2025-02-26 Thread Kanchan Joshi
On 2/25/2025 9:14 PM, Christoph Hellwig wrote: > Reduce struct bio_integrity_payload to the minimal structure needed in > common code and create two separate containing structures for the > automatically generated payload and the caller allocated payload. > The latter is a simple wrapper for struct