Skip to content

Commit d5cfecf

Browse files
bjohnstoMikulas Patocka
authored andcommitted
dm vdo: replace max_discard_sectors with max_hw_discard_sectors
Commit 4f563a6 ("block: add a max_user_discard_sectors queue limit") changed block core to set max_discard_sectors to: min(lim->max_hw_discard_sectors, lim->max_user_discard_sectors) Commit 825d8bb ("dm: always manage discard support in terms of max_hw_discard_sectors") fixed most dm targetss to deal with this, by replacing max_discard_sectors with max_hw_discard_sectors. Unfortunately, dm-vdo did not get fixed at that time. Fixes: 825d8bb ("dm: always manage discard support in terms of max_hw_discard_sectors") Signed-off-by: Bruce Johnston <[email protected]> Signed-off-by: Matthew Sakai <[email protected]> Signed-off-by: Mikulas Patocka <[email protected]>
1 parent 825d8bb commit d5cfecf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/md/dm-vdo/dm-vdo-target.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -945,7 +945,7 @@ static void vdo_io_hints(struct dm_target *ti, struct queue_limits *limits)
945945
* The value is used by dm-thin to determine whether to pass down discards. The block layer
946946
* splits large discards on this boundary when this is set.
947947
*/
948-
limits->max_discard_sectors =
948+
limits->max_hw_discard_sectors =
949949
(vdo->device_config->max_discard_blocks * VDO_SECTORS_PER_BLOCK);
950950

951951
/*

0 commit comments

Comments
 (0)