lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <709b545c-71a3-4b2b-8fd1-30c738e61743@nvidia.com>
Date:   Wed, 9 Nov 2022 19:48:33 +0000
From:   Chaitanya Kulkarni <chaitanyak@...dia.com>
To:     Christoph Böhmwalder 
        <christoph.boehmwalder@...bit.com>, Jens Axboe <axboe@...nel.dk>
CC:     "drbd-dev@...ts.linbit.com" <drbd-dev@...ts.linbit.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Lars Ellenberg <lars.ellenberg@...bit.com>,
        Philipp Reisner <philipp.reisner@...bit.com>,
        "linux-block@...r.kernel.org" <linux-block@...r.kernel.org>,
        Joel Colledge <joel.colledge@...bit.com>
Subject: Re: [PATCH 1/3] drbd: use blk_queue_max_discard_sectors helper

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@...bit.com>
> Signed-off-by: Christoph Böhmwalder <christoph.boehmwalder@...bit.com>
> ---

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

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

-ck


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ