]> www.infradead.org Git - users/hch/block.git/commitdiff
block: remove the unused BIP_{CTRL,DISK}_NOCHECK flags
authorChristoph Hellwig <hch@lst.de>
Mon, 3 Jun 2024 08:53:31 +0000 (10:53 +0200)
committerChristoph Hellwig <hch@lst.de>
Thu, 6 Jun 2024 09:34:17 +0000 (11:34 +0200)
Both flags are only checked, but never set.

Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/scsi/sd.c
include/linux/bio.h

index d957e29b17a98a5e78314619b29a181cd88858ab..b477383ccc3b2ac8a10f1058f09f00c7992fdddd 100644 (file)
@@ -806,25 +806,17 @@ static unsigned char sd_setup_protect_cmnd(struct scsi_cmnd *scmd,
        if (dix) {                              /* DIX Type 0, 1, 2, 3 */
                if (bio_integrity_flagged(bio, BIP_IP_CHECKSUM))
                        scmd->prot_flags |= SCSI_PROT_IP_CHECKSUM;
-
-               if (bio_integrity_flagged(bio, BIP_CTRL_NOCHECK) == false)
-                       scmd->prot_flags |= SCSI_PROT_GUARD_CHECK;
+               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)
-                       scmd->prot_flags |= SCSI_PROT_REF_CHECK;
+               scmd->prot_flags |= SCSI_PROT_REF_CHECK;
        }
 
        if (dif) {                              /* DIX/DIF Type 1, 2, 3 */
                scmd->prot_flags |= SCSI_PROT_TRANSFER_PI;
-
-               if (bio_integrity_flagged(bio, BIP_DISK_NOCHECK))
-                       protect = 3 << 5;       /* Disable target PI checking */
-               else
-                       protect = 1 << 5;       /* Enable target PI checking */
+               protect = 1 << 5;       /* Enable target PI checking */
        }
 
        scsi_set_prot_op(scmd, prot_op);
index d5379548d684e1823862e6d2f88ef201bceddea1..ec5dcf8635ac6640fd622aa55df0b4911d8b4192 100644 (file)
@@ -324,8 +324,6 @@ static inline void bio_next_folio(struct folio_iter *fi, struct bio *bio)
 enum bip_flags {
        BIP_BLOCK_INTEGRITY     = 1 << 0, /* block layer owns integrity data */
        BIP_MAPPED_INTEGRITY    = 1 << 1, /* ref tag has been remapped */
-       BIP_CTRL_NOCHECK        = 1 << 2, /* disable HBA integrity checking */
-       BIP_DISK_NOCHECK        = 1 << 3, /* disable disk integrity checking */
        BIP_IP_CHECKSUM         = 1 << 4, /* IP checksum */
        BIP_INTEGRITY_USER      = 1 << 5, /* Integrity payload is user address */
        BIP_COPY_USER           = 1 << 6, /* Kernel bounce buffer in use */