From: Chaitanya Kulkarni <chaitanyak@nvidia.com>
To: "Christoph Böhmwalder" <christoph.boehmwalder@linbit.com>,
"Jens Axboe" <axboe@kernel.dk>
Cc: Philipp Reisner <philipp.reisner@linbit.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
Lars Ellenberg <lars.ellenberg@linbit.com>,
"drbd-dev@lists.linbit.com" <drbd-dev@lists.linbit.com>
Subject: Re: [Drbd-dev] [PATCH 1/3] drbd: use blk_queue_max_discard_sectors helper
Date: Wed, 9 Nov 2022 19:48:33 +0000 [thread overview]
Message-ID: <709b545c-71a3-4b2b-8fd1-30c738e61743@nvidia.com> (raw)
In-Reply-To: <20221109133453.51652-2-christoph.boehmwalder@linbit.com>
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
next prev parent reply other threads:[~2022-11-09 19:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-09 13:34 [Drbd-dev] [PATCH 0/3] Miscellaneous DRBD updates for 6.2 Christoph Böhmwalder
2022-11-09 13:34 ` [Drbd-dev] [PATCH 1/3] drbd: use blk_queue_max_discard_sectors helper Christoph Böhmwalder
2022-11-09 19:48 ` Chaitanya Kulkarni [this message]
2022-11-09 13:34 ` [Drbd-dev] [PATCH 2/3] drbd: disable discard support if granularity > max Christoph Böhmwalder
2022-11-09 13:34 ` [Drbd-dev] [PATCH RESEND 3/3] drbd: Store op in drbd_peer_request Christoph Böhmwalder
2022-11-09 19:47 ` [Drbd-dev] [PATCH 0/3] Miscellaneous DRBD updates for 6.2 Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=709b545c-71a3-4b2b-8fd1-30c738e61743@nvidia.com \
--to=chaitanyak@nvidia.com \
--cc=axboe@kernel.dk \
--cc=christoph.boehmwalder@linbit.com \
--cc=drbd-dev@lists.linbit.com \
--cc=lars.ellenberg@linbit.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=philipp.reisner@linbit.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox