Re: [PATCH v11 07/10] block: introduce BIP_CHECK_GUARD/REFTAG/APPTAG bip_flags

Christoph Hellwig
2025-02-03T06:53:37Z

Hi Anuj,

I just stumbled over this patch when forward porting my XFS PI support
code over the weekend, which failed badly because it didn't set the
new BIP_CHECK_GUARD and BIP_CHECK_REFTAG flags. Now for the XFS side
that was just me being to lazy to forward port, but when I started
looking over bio_integrity_add_page users as part of doing this I think
I found a regression caused by this patch.

The scsi and nvme targets never sets these new flags when passing on PI,
so that will probably stop working. So we'll need to set them and for
nvmet we could also improve the code to actually pass through the
individual flags. Note that this is just by observation, I didn't find
time to actually set up the SCSI and NVMe target code with PI support.
Maybe we also need blktests test cases to exercise the code and avoid
regressions in the future?