]> www.infradead.org Git - users/hch/block.git/commitdiff
dm-integrity: remove dm_integrity_profile
authorChristoph Hellwig <hch@lst.de>
Sun, 6 Jun 2021 07:59:51 +0000 (09:59 +0200)
committerChristoph Hellwig <hch@lst.de>
Thu, 9 Jun 2022 05:40:57 +0000 (07:40 +0200)
dm_integrity_profile is identical to the nop_profile that is used by
default if no other profile is specified.

Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/md/dm-crypt.c
drivers/md/dm-integrity.c

index 159c6806c19b8991fdcf33121f6c130fa1882f7f..88d0384f97e92e048bcd8b96cce135c2de8a3923 100644 (file)
@@ -1168,7 +1168,7 @@ static int crypt_integrity_ctr(struct crypt_config *cc, struct dm_target *ti)
        struct mapped_device *md = dm_table_get_md(ti->table);
 
        /* From now we require underlying device with our integrity profile */
-       if (!bi || strcasecmp(bi->profile->name, "DM-DIF-EXT-TAG")) {
+       if (!bi || strcmp(bi->profile->name, "nop")) {
                ti->error = "Integrity profile not supported.";
                return -EINVAL;
        }
index 3d5a0ce123c905cf038e9412310e7e561b5fd080..a88539c8f3b39db3dd55ed22ffb0bff69f6806dc 100644 (file)
@@ -362,25 +362,6 @@ static void __DEBUG_bytes(__u8 *bytes, size_t len, const char *msg, ...)
 #define DEBUG_bytes(bytes, len, msg, ...)      do { } while (0)
 #endif
 
-static void dm_integrity_prepare(struct request *rq)
-{
-}
-
-static void dm_integrity_complete(struct request *rq, unsigned int nr_bytes)
-{
-}
-
-/*
- * DM Integrity profile, protection is performed layer above (dm-crypt)
- */
-static const struct blk_integrity_profile dm_integrity_profile = {
-       .name                   = "DM-DIF-EXT-TAG",
-       .generate_fn            = NULL,
-       .verify_fn              = NULL,
-       .prepare_fn             = dm_integrity_prepare,
-       .complete_fn            = dm_integrity_complete,
-};
-
 static void dm_integrity_map_continue(struct dm_integrity_io *dio, bool from_map);
 static void integrity_bio_wait(struct work_struct *w);
 static void dm_integrity_dtr(struct dm_target *ti);
@@ -3528,7 +3509,6 @@ static void dm_integrity_set(struct dm_target *ti, struct dm_integrity_c *ic)
        struct blk_integrity bi;
 
        memset(&bi, 0, sizeof(bi));
-       bi.profile = &dm_integrity_profile;
        bi.tuple_size = ic->tag_size;
        bi.tag_size = bi.tuple_size;
        bi.interval_exp = ic->sb->log2_sectors_per_block + SECTOR_SHIFT;