From: Christoph Hellwig <hch@lst.de>
To: Mike Snitzer <snitzer@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>,
axboe@kernel.dk, agk@redhat.com, mpatocka@redhat.com,
dm-devel@lists.linux.dev, linux-block@vger.kernel.org
Subject: Re: dm: set the correct discard_sectors limit
Date: Mon, 11 Mar 2024 14:04:27 +0100 [thread overview]
Message-ID: <20240311130427.GA31285@lst.de> (raw)
In-Reply-To: <ZeyrYB-XKa08P-2F@redhat.com>
On Sat, Mar 09, 2024 at 01:33:04PM -0500, Mike Snitzer wrote:
> That 2015 commit (0034af036554) was really ham-handed, not sure how
> I've remained unaware of this duality (with soft and hard discard
> limits) until now BUT there is quite a bit of DM code that only
> concerns itself with max_discard_sectors and discard_granularity.
Yes.
> Anyway, I'm not quite sure what you're referring to, only code that is
> still setting max_discard_sectors is drivers/md/dm.c:disable_discard
I mean all the places that I've updated to set max_discard_sectors
really should be setting max_hw_discard_sectors. The rutime-
disabling of discard/write_zeroes/secure_discard on failure will
get new helpers one the atomic queue limits conversion is finished.
>
> > This fixes a regression where dm bio poison v1 warns about exceeding
> > the discard bio size when running xfstests generic/500.
>
> Meaning max_discard_sectors > max_hw_discard_sectors? What changed to
> expose this?
queue_limits_set now always recalculates max_discard_sectors from
max_hw_discard_sectors and max_user_discard_sectors. So if a driver
sets max_discard_sectors but not max_hw_discard_sectors it will
simply be overriden.
prev parent reply other threads:[~2024-03-11 13:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-09 16:41 [PATCH] dm: set the correct discard_sectors limit Christoph Hellwig
2024-03-09 18:33 ` Mike Snitzer
2024-03-11 13:04 ` Christoph Hellwig [this message]
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=20240311130427.GA31285@lst.de \
--to=hch@lst.de \
--cc=agk@redhat.com \
--cc=axboe@kernel.dk \
--cc=dm-devel@lists.linux.dev \
--cc=linux-block@vger.kernel.org \
--cc=mpatocka@redhat.com \
--cc=snitzer@kernel.org \
/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