]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
dm: Remove max_secure_erase_granularity
authorDamien Le Moal <dlemoal@kernel.org>
Thu, 4 Jul 2024 13:45:25 +0000 (15:45 +0200)
committerMikulas Patocka <mpatocka@redhat.com>
Wed, 10 Jul 2024 11:10:06 +0000 (13:10 +0200)
The max_secure_erase_granularity boolean of struct dm_target is used in
__process_abnormal_io() but never set by any target. Remove this field
and the dead code using it.

Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
drivers/md/dm.c
include/linux/device-mapper.h

index a63efa2a46aef008d7b3c43cb7dd021d60694ad4..2abf2b6865ea72db04c73982586d0290a9c5a0a0 100644 (file)
@@ -1658,8 +1658,6 @@ static blk_status_t __process_abnormal_io(struct clone_info *ci,
        case REQ_OP_SECURE_ERASE:
                num_bios = ti->num_secure_erase_bios;
                max_sectors = limits->max_secure_erase_sectors;
-               if (ti->max_secure_erase_granularity)
-                       max_granularity = max_sectors;
                break;
        case REQ_OP_WRITE_ZEROES:
                num_bios = ti->num_write_zeroes_bios;
index 5b7e96653ec6e3985d2ce1ab6353087b93be5b37..4ba2e73993bd9a6db3fb41bbe507367e23d75dfd 100644 (file)
@@ -363,12 +363,6 @@ struct dm_target {
         */
        bool max_discard_granularity:1;
 
-       /*
-        * Set if this target requires that secure_erases be split on
-        * 'max_secure_erase_sectors' boundaries.
-        */
-       bool max_secure_erase_granularity:1;
-
        /*
         * Set if we need to limit the number of in-flight bios when swapping.
         */