From: Benjamin Marzinski <bmarzins@redhat.com>
To: John Garry <john.g.garry@oracle.com>
Cc: Mikulas Patocka <mpatocka@redhat.com>,
Mike Snitzer <snitzer@redhat.com>,
dm-devel@lists.linux.dev, hch@lst.de
Subject: Re: [PATCH] dm-table: check BLK_FEAT_ATOMIC_WRITES inside limits_lock
Date: Tue, 3 Jun 2025 12:05:00 -0400 [thread overview]
Message-ID: <aD8dLP5d-fvI-D-B@redhat.com> (raw)
In-Reply-To: <9f8cb209-00c4-4596-b6df-3bf5ed2f1505@oracle.com>
On Tue, Jun 03, 2025 at 08:57:32AM +0100, John Garry wrote:
> On 02/06/2025 17:25, Benjamin Marzinski wrote:
> > On Mon, Jun 02, 2025 at 11:08:46AM +0100, John Garry wrote:
> > > On 30/05/2025 15:50, Benjamin Marzinski wrote:
> > >
> > > +
> > >
> > > > dm_set_device_limits() should check q->limits.features for
> > > > BLK_FEAT_ATOMIC_WRITES while holding q->limits_lock, like it does for
> > > > the rest of the queue limits.
> > > >
> > > > Fixes: b7c18b17a173 ("dm-table: Set BLK_FEAT_ATOMIC_WRITES for target queue limits")
> > > > Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
> > >
> > > In itself, the change seems fine, but I have doubts whether it's preferred
> > > to even grab the q->limits_lock outside block layer / its helpers.
> >
> > I'm pretty sure Mikulas added the q->limits_lock around DM's queue
> > limits accesses as the result of a discussion with some block layer
> > developers.
>
> Do you have a pointer for that?
https://lore.kernel.org/dm-devel/ee66a4f2-ecc4-68d2-4594-a0bcba7ffe9c@redhat.com/
Specifically, in that thread Ming Lei suggests it here:
https://lore.kernel.org/dm-devel/Z9t709DZs-Flq1qS@fedora/
and Jens agrees.
-Ben
>
> >
> > >
> > > And, apart from this, if the bottom device limits change later, do we
> > > actually trigger a top device limits evaluation update?
> >
> > DM will obviously re-evaluate the limits if you reload the table. In
> > some cases, DM will also disable features if turns out that they aren't
> > supported when it actually tries to use them. Dumb question: Is there
> > much chance of a SCSI device's atomic write support changing while it's
> > in-use?
>
> No, I would not think so.
>
> thanks,
> John
prev parent reply other threads:[~2025-06-03 16:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-30 14:50 [PATCH] dm-table: check BLK_FEAT_ATOMIC_WRITES inside limits_lock Benjamin Marzinski
2025-06-02 10:08 ` John Garry
2025-06-02 16:25 ` Benjamin Marzinski
2025-06-03 7:57 ` John Garry
2025-06-03 16:05 ` Benjamin Marzinski [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=aD8dLP5d-fvI-D-B@redhat.com \
--to=bmarzins@redhat.com \
--cc=dm-devel@lists.linux.dev \
--cc=hch@lst.de \
--cc=john.g.garry@oracle.com \
--cc=mpatocka@redhat.com \
--cc=snitzer@redhat.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;
as well as URLs for NNTP newsgroup(s).