Re: [PATCH 04/12] block: remove the blk_integrity_profile structure

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

 



On Wed, Jun 5, 2024 at 12:01 PM Christoph Hellwig <hch@xxxxxx> wrote:
> @@ -446,13 +446,14 @@ bool bio_integrity_prep(struct bio *bio)
>         if (bio_integrity(bio))
>                 return true;
>
> +       if (!bi->csum_type)
> +               return true;

Changes look mostly good, but trigger a behavior change for non-PI
metadata format.

Earlier nop profile was registered for that case. And the block-layer
continued to attach an appropriately sized meta buffer to incoming IO, even
though it did not generate/verify. Hence, IOs don't fail.

Now also we show that the nop profile is set, but the above
"csum_type" check ensures that
meta buffer is not attached and REQ_INTEGRITY is not set in the bio.
NVMe will start failing IOs with BLK_STS_NOTSUPP now [*].

[*]
     if (!blk_integrity_rq(req)) {
             if (WARN_ON_ONCE(!nvme_ns_has_pi(ns->head)))
                     return BLK_STS_NOTSUPP;
             control |= NVME_RW_PRINFO_PRACT;
     }





[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux