lkml.org 
[lkml]   [2022]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 1/3] drbd: use blk_queue_max_discard_sectors helper
Date
On 11/9/22 05:34, Christoph Böhmwalder wrote:
> We currently only set q->limits.max_discard_sectors, but that is not
> enough. Another field, max_hw_discard_sectors, was introduced in
> commit 0034af036554 ("block: make /sys/block/<dev>/queue/discard_max_bytes
> writeable").
>
> The difference is that max_discard_sectors can be changed from user
> space via sysfs, while max_hw_discard_sectors is the "hardware" upper
> limit.
>
> So use this helper, which sets both.
>
> This is also a fixup for commit 998e9cbcd615 ("drbd: cleanup
> decide_on_discard_support"): if discards are not supported, that does
> not necessarily mean we also want to disable write_zeroes.
>
> Fixes: 998e9cbcd615 ("drbd: cleanup decide_on_discard_support")
> Reviewed-by: Joel Colledge <joel.colledge@linbit.com>
> Signed-off-by: Christoph Böhmwalder <christoph.boehmwalder@linbit.com>
> ---

Using helper is absolutely right way of setting up discard
values...

Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>

-ck


\
 
 \ /
  Last update: 2022-11-09 20:49    [W:0.071 / U:1.868 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site