Skip to content

Commit

Permalink
dm vdo: replace max_discard_sectors with max_hw_discard_sectors
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
bjohnsto authored and Mikulas Patocka committed Jul 11, 2024
1 parent 825d8bb commit d5cfecf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/md/dm-vdo/dm-vdo-target.c
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,7 @@ static void vdo_io_hints(struct dm_target *ti, struct queue_limits *limits)
* The value is used by dm-thin to determine whether to pass down discards. The block layer
* splits large discards on this boundary when this is set.
*/
limits->max_discard_sectors =
limits->max_hw_discard_sectors =
(vdo->device_config->max_discard_blocks * VDO_SECTORS_PER_BLOCK);

/*
Expand Down

0 comments on commit d5cfecf

Please sign in to comment.