Re: [PATCH v1 2/3] nvme: Fix incorrect block integrity sysfs values for non-PI namespaces

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.





[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux