From: Christoph Hellwig <hch@lst.de>
To: Keith Busch <kbusch@meta.com>
Cc: linux-nvme@lists.infradead.org, hch@lst.de, sagi@grimberg.me,
Keith Busch <kbusch@kernel.org>
Subject: Re: [PATCH] nvme: respect user max_discard_sectors setting
Date: Fri, 5 Jan 2024 05:34:01 +0100 [thread overview]
Message-ID: <20240105043401.GA23760@lst.de> (raw)
In-Reply-To: <20240104191244.737208-1-kbusch@meta.com>
On Thu, Jan 04, 2024 at 11:12:44AM -0800, Keith Busch wrote:
> From: Keith Busch <kbusch@kernel.org>
>
> A user can change that attribute to 0 through sysfs, but they can't
> change the hw limit. Check the hw limit instead to know if the driver
> previously set up discard capabilities.
blk_queue_max_discard_sectors updates the hardware and user limit.
It's a bit of a mess, but Jens didn't quite like my half-hearted fix
last time. If we want to do this properly we probably need a separate
user limit and recalculate the effective limit when either the hw or
user limit changes. For early in the 6.9 merge window I plan to redo
how all the limits are set, and that should give us a better opportunity
for these kinds of things
next prev parent reply other threads:[~2024-01-05 4:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-04 19:12 [PATCH] nvme: respect user max_discard_sectors setting Keith Busch
2024-01-05 4:34 ` Christoph Hellwig [this message]
2024-01-05 16:07 ` Keith Busch
2024-01-08 8:26 ` Christoph Hellwig
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=20240105043401.GA23760@lst.de \
--to=hch@lst.de \
--cc=kbusch@kernel.org \
--cc=kbusch@meta.com \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.