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.





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux