From: Mike Snitzer <snitzer@kernel.org>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: keescook@chromium.org, sarthakkukreti@google.com,
stable@vger.kernel.org, Oleksandr Tymoshenko <ovt@google.com>,
dm-devel@redhat.com, regressions@lists.linux.dev
Subject: Re: [dm-devel] [PATCH 5.4 26/34] dm verity: set DM_TARGET_IMMUTABLE feature flag
Date: Fri, 10 Jun 2022 11:11:00 -0400 [thread overview]
Message-ID: <YqNfBMOR9SE2TuCm@redhat.com> (raw)
In-Reply-To: <YqLTV+5Q72/jBeOG@kroah.com>
On Fri, Jun 10 2022 at 1:15P -0400,
Greg KH <gregkh@linuxfoundation.org> wrote:
> On Fri, Jun 10, 2022 at 04:22:00AM +0000, Oleksandr Tymoshenko wrote:
> > I believe this commit introduced a regression in dm verity on systems
> > where data device is an NVME one. Loading table fails with the
> > following diagnostics:
> >
> > device-mapper: table: table load rejected: including non-request-stackable devices
> >
> > The same kernel works with the same data drive on the SCSI interface.
> > NVME-backed dm verity works with just this commit reverted.
> >
> > I believe the presence of the immutable partition is used as an indicator
> > of special case NVME configuration and if the data device's name starts
> > with "nvme" the code tries to switch the target type to
> > DM_TYPE_NVME_BIO_BASED (drivers/md/dm-table.c lines 1003-1010).
> >
> > The special NVME optimization case was removed in
> > 5.10 by commit 9c37de297f6590937f95a28bec1b7ac68a38618f, so only 5.4 is
> > affected.
> >
>
> Why wouldn't 4.9, 4.14, and 4.19 also be affected here? Should I also
> just queue up 9c37de297f65 ("dm: remove special-casing of bio-based
> immutable singleton target on NVMe") to those older kernels? If so,
> have you tested this and verified that it worked?
Sorry for the unforeseen stable@ troubles here!
In general we'd be fine to apply commit 9c37de297f65 but to do it
properly would require also making sure commits that remove
"DM_TYPE_NVME_BIO_BASED", like 8d47e65948dd ("dm mpath: remove
unnecessary NVMe branching in favor of scsi_dh checks") are applied --
basically any lingering references to DM_TYPE_NVME_BIO_BASED need to
be removed.
The commit header for 8d47e65948dd documents what
DM_TYPE_NVME_BIO_BASED was used for.. it was dm-mpath specific and
"nvme" mode really never got used by any userspace that I'm aware of.
Sadly I currently don't have the time to do this backport for all N
stable kernels... :(
But if that backport gets out of control: A simpler, albeit stable@
unicorn, way to resolve this is to simply revert 9c37de297f65 and make
it so that DM-mpath and DM core just used bio-based if "nvme" is
requested by dm-mpath, so also in drivers/md/dm-mpath.c e.g.:
@@ -1091,8 +1088,6 @@ static int parse_features(struct dm_arg_set *as, struct multipath *m)
if (!strcasecmp(queue_mode_name, "bio"))
m->queue_mode = DM_TYPE_BIO_BASED;
else if (!strcasecmp(queue_mode_name, "nvme"))
- m->queue_mode = DM_TYPE_NVME_BIO_BASED;
+ m->queue_mode = DM_TYPE_BIO_BASED;
else if (!strcasecmp(queue_mode_name, "rq"))
m->queue_mode = DM_TYPE_REQUEST_BASED;
else if (!strcasecmp(queue_mode_name, "mq"))
Mike
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
next parent reply other threads:[~2022-06-10 15:11 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20220603173816.944766454@linuxfoundation.org>
[not found] ` <20220610042200.2561917-1-ovt@google.com>
[not found] ` <YqLTV+5Q72/jBeOG@kroah.com>
2022-06-10 15:11 ` Mike Snitzer [this message]
2022-06-13 9:13 ` [dm-devel] [PATCH 5.4 26/34] dm verity: set DM_TARGET_IMMUTABLE feature flag Greg KH
2022-06-15 14:36 ` Guenter Roeck
2022-06-15 15:29 ` Mike Snitzer
2022-06-15 17:50 ` Guenter Roeck
2022-06-15 20:02 ` Mike Snitzer
2022-06-15 20:40 ` Guenter Roeck
2022-06-15 23:59 ` Guenter Roeck
2022-06-16 23:22 ` Guenter Roeck
2022-06-20 11:44 ` Greg KH
2022-06-21 16:35 ` [dm-devel] [5.4.y PATCH v2] dm: remove special-casing of bio-based immutable singleton target on NVMe Mike Snitzer
2022-06-23 15:48 ` Greg KH
2022-06-23 16:00 ` [dm-devel] Patch "dm: remove special-casing of bio-based immutable singleton target on NVMe" has been added to the 5.4-stable tree gregkh
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=YqNfBMOR9SE2TuCm@redhat.com \
--to=snitzer@kernel.org \
--cc=dm-devel@redhat.com \
--cc=gregkh@linuxfoundation.org \
--cc=keescook@chromium.org \
--cc=ovt@google.com \
--cc=regressions@lists.linux.dev \
--cc=sarthakkukreti@google.com \
--cc=stable@vger.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