Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

scsi: add support for user-meta interface

Add support for sending user-meta buffer. Set tags to be checked
using flags specified by user/block-layer.
With this change, BIP_CTRL_NOCHECK becomes unused. Remove it.

Signed-off-by: Anuj Gupta <anuj20.g@samsung.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20241128112240.8867-10-anuj20.g@samsung.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Anuj Gupta and committed by
Jens Axboe
18623503 472292cd

+9 -11
+2 -2
drivers/scsi/sd.c
··· 814 814 if (bio_integrity_flagged(bio, BIP_IP_CHECKSUM)) 815 815 scmd->prot_flags |= SCSI_PROT_IP_CHECKSUM; 816 816 817 - if (bio_integrity_flagged(bio, BIP_CTRL_NOCHECK) == false) 817 + if (bio_integrity_flagged(bio, BIP_CHECK_GUARD)) 818 818 scmd->prot_flags |= SCSI_PROT_GUARD_CHECK; 819 819 } 820 820 821 821 if (dif != T10_PI_TYPE3_PROTECTION) { /* DIX/DIF Type 0, 1, 2 */ 822 822 scmd->prot_flags |= SCSI_PROT_REF_INCREMENT; 823 823 824 - if (bio_integrity_flagged(bio, BIP_CTRL_NOCHECK) == false) 824 + if (bio_integrity_flagged(bio, BIP_CHECK_REFTAG)) 825 825 scmd->prot_flags |= SCSI_PROT_REF_CHECK; 826 826 } 827 827
+7 -9
include/linux/bio-integrity.h
··· 7 7 enum bip_flags { 8 8 BIP_BLOCK_INTEGRITY = 1 << 0, /* block layer owns integrity data */ 9 9 BIP_MAPPED_INTEGRITY = 1 << 1, /* ref tag has been remapped */ 10 - BIP_CTRL_NOCHECK = 1 << 2, /* disable HBA integrity checking */ 11 - BIP_DISK_NOCHECK = 1 << 3, /* disable disk integrity checking */ 12 - BIP_IP_CHECKSUM = 1 << 4, /* IP checksum */ 13 - BIP_COPY_USER = 1 << 5, /* Kernel bounce buffer in use */ 14 - BIP_CHECK_GUARD = 1 << 6, /* guard check */ 15 - BIP_CHECK_REFTAG = 1 << 7, /* reftag check */ 16 - BIP_CHECK_APPTAG = 1 << 8, /* apptag check */ 10 + BIP_DISK_NOCHECK = 1 << 2, /* disable disk integrity checking */ 11 + BIP_IP_CHECKSUM = 1 << 3, /* IP checksum */ 12 + BIP_COPY_USER = 1 << 4, /* Kernel bounce buffer in use */ 13 + BIP_CHECK_GUARD = 1 << 5, /* guard check */ 14 + BIP_CHECK_REFTAG = 1 << 6, /* reftag check */ 15 + BIP_CHECK_APPTAG = 1 << 7, /* apptag check */ 17 16 }; 18 17 19 18 struct bio_integrity_payload { ··· 32 33 struct bio_vec bip_inline_vecs[];/* embedded bvec array */ 33 34 }; 34 35 35 - #define BIP_CLONE_FLAGS (BIP_MAPPED_INTEGRITY | BIP_CTRL_NOCHECK | \ 36 - BIP_DISK_NOCHECK | BIP_IP_CHECKSUM | \ 36 + #define BIP_CLONE_FLAGS (BIP_MAPPED_INTEGRITY | BIP_IP_CHECKSUM | \ 37 37 BIP_CHECK_GUARD | BIP_CHECK_REFTAG | BIP_CHECK_APPTAG) 38 38 39 39 #ifdef CONFIG_BLK_DEV_INTEGRITY