On 9/26/2024 10:25 PM, Keith Busch wrote: > On Thu, Sep 26, 2024 at 10:08:09PM +0530, Kanchan Joshi wrote: >> But there are kernel knobs too. Hope you are able to get to the same >> state (as nop profile) by clearing write_generate and read_verify: >> echo 0 > /sys/block/nvme0n1/integrity/read_verify > > It's not the kernel's verify causing the failure; it's the end device. > For nvme, it'll return status 0x282, End-to-end Guard Check Error, so > the kernel doesn't have a chance to check the data. We'd need to turn > off the command's NVME_RW_PRINFO_PRCHK_GUARD flag, but there's currently > no knob to toggle that. Indeed. I spent a good deal of time on this today. I was thinking to connect block read_verify/write_generate knobs to influence things at nvme level (those PRCHK flags). But that will not be enough. Because with those knobs block-layer will not attach meta-buffer, which is still needed. The data was written under the condition when nvme driver set the pi_type to 0 (even though at device level it was non-zero) during integrity registration. Thinking whether it will make sense to have a knob at the block-layer level to do something like that i.e., override the set integrity-profile with nop.