Skip to content

Commit 9d45db0

Browse files
damien-lemoalMikulas Patocka
authored andcommitted
dm: Remove max_secure_erase_granularity
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 <[email protected]> Signed-off-by: Mikulas Patocka <[email protected]>
1 parent 396a27e commit 9d45db0

File tree

2 files changed

+0
-8
lines changed

2 files changed

+0
-8
lines changed

drivers/md/dm.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1658,8 +1658,6 @@ static blk_status_t __process_abnormal_io(struct clone_info *ci,
16581658
case REQ_OP_SECURE_ERASE:
16591659
num_bios = ti->num_secure_erase_bios;
16601660
max_sectors = limits->max_secure_erase_sectors;
1661-
if (ti->max_secure_erase_granularity)
1662-
max_granularity = max_sectors;
16631661
break;
16641662
case REQ_OP_WRITE_ZEROES:
16651663
num_bios = ti->num_write_zeroes_bios;

include/linux/device-mapper.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -363,12 +363,6 @@ struct dm_target {
363363
*/
364364
bool max_discard_granularity:1;
365365

366-
/*
367-
* Set if this target requires that secure_erases be split on
368-
* 'max_secure_erase_sectors' boundaries.
369-
*/
370-
bool max_secure_erase_granularity:1;
371-
372366
/*
373367
* Set if we need to limit the number of in-flight bios when swapping.
374368
*/

0 commit comments

Comments
 (0)