On Tue, Feb 25, 2025 at 10:16:52AM +0530, Anuj Gupta wrote:
>       memset(bi, 0, sizeof(*bi));
>  
> +     bi->flags = BLK_INTEGRITY_NOGENERATE | BLK_INTEGRITY_NOVERIFY;
>       if (!head->ms)
>               return true;
>  
> @@ -1850,6 +1851,9 @@ static bool nvme_init_integrity(struct nvme_ns_head 
> *head,
>               break;
>       }
>  
> +     if (bi->flags & BLK_INTEGRITY_DEVICE_CAPABLE)
> +             bi->flags &= ~(BLK_INTEGRITY_NOGENERATE |
> +                            BLK_INTEGRITY_NOVERIFY);

I don't think the driver is the proper place to do this, this should
be done in blk_validate_integrity_limits.  That should also take care
or the stacked devices and remove the need for the last hunk in the
previous patch.


Reply via email to