Message ID | 20241029162402.21400-10-anuj20.g@samsung.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | Read/Write with meta/integrity | expand |
On Tue, Oct 29, 2024 at 09:54:01PM +0530, Anuj Gupta wrote: > Add support for sending user-meta buffer. Set tags to be checked > using flags specified by user/block-layer. Looks good: Reviewed-by: Christoph Hellwig <hch@lst.de> > - if (bio_integrity_flagged(bio, BIP_CTRL_NOCHECK) == false) > + if (bio_integrity_flagged(bio, BIP_CHECK_GUARD)) > scmd->prot_flags |= SCSI_PROT_GUARD_CHECK; > } > > if (dif != T10_PI_TYPE3_PROTECTION) { /* DIX/DIF Type 0, 1, 2 */ > scmd->prot_flags |= SCSI_PROT_REF_INCREMENT; > > - if (bio_integrity_flagged(bio, BIP_CTRL_NOCHECK) == false) > + if (bio_integrity_flagged(bio, BIP_CHECK_REFTAG)) BIP_CTRL_NOCHECK is unused now, and should probably go away.
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index ca4bc0ac76ad..d1a2ae0d4c29 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -814,14 +814,14 @@ static unsigned char sd_setup_protect_cmnd(struct scsi_cmnd *scmd, if (bio_integrity_flagged(bio, BIP_IP_CHECKSUM)) scmd->prot_flags |= SCSI_PROT_IP_CHECKSUM; - if (bio_integrity_flagged(bio, BIP_CTRL_NOCHECK) == false) + if (bio_integrity_flagged(bio, BIP_CHECK_GUARD)) scmd->prot_flags |= SCSI_PROT_GUARD_CHECK; } if (dif != T10_PI_TYPE3_PROTECTION) { /* DIX/DIF Type 0, 1, 2 */ scmd->prot_flags |= SCSI_PROT_REF_INCREMENT; - if (bio_integrity_flagged(bio, BIP_CTRL_NOCHECK) == false) + if (bio_integrity_flagged(bio, BIP_CHECK_REFTAG)) scmd->prot_flags |= SCSI_PROT_REF_CHECK; }
Add support for sending user-meta buffer. Set tags to be checked using flags specified by user/block-layer. Signed-off-by: Anuj Gupta <anuj20.g@samsung.com> --- drivers/scsi/sd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)