From: Hanna Czenczek <hreitz@redhat.com>
To: Benjamin Marzinski <bmarzins@redhat.com>,
Mikulas Patocka <mpatocka@redhat.com>,
Mike Snitzer <snitzer@redhat.com>
Cc: dm-devel@lists.linux.dev, Kevin Wolf <kwolf@redhat.com>,
Martin Wilck <martin.wilck@suse.com>
Subject: Re: [PATCH] dm-mpath: don't stop probing paths at presuspend
Date: Mon, 23 Feb 2026 18:00:54 +0100 [thread overview]
Message-ID: <c2600a65-b94d-4889-9f92-0ba9cd964ea4@redhat.com> (raw)
In-Reply-To: <20260212180541.1154475-1-bmarzins@redhat.com>
On 12.02.26 19:05, Benjamin Marzinski wrote:
> Commit 5c977f102315 ("dm-mpath: Don't grab work_mutex while probing
> paths"), added code to make multipath quit probing paths early, if it
> was trying to suspend. This isn't necessary. It was just an optimization
> to try to keep path probing from delaying a suspend. However it causes
> problems with the intended user of this code, qemu. The path probing
> code was added because failed ioctls to multipath devices don't cause
> paths to fail in cases where a regular IO failure would.
>
> If an ioctl to a path failed because the path was down, and the
> multipath device had passed presuspend, the M_MPATH_PROBE_PATHS ioctl
> would exit early, without probing the path. The caller would then retry
> the original ioctl, hoping to use a different path. But if there was
> only one path in the pathgroup, it would pick the same non-working path
> again, even if there were working paths in other pathgroups.
>
> ioctls to a suspended dm device will return -EAGAIN, notifying the
> caller that the device is suspended, but ioctls to a device that is just
> preparing to suspend won't (and in general, shouldn't). This means that
> the caller (qemu in this case) would get into a tight loop where it
> would issue an ioctl that failed, skip probing the paths because the
> device had already passed presuspend, and start over issuing the ioctl
> again. This would continue until the multipath device finally fully
> suspended, or the caller gave up and failed the ioctl.
>
> multipath's path probing code could return -EAGAIN in this case, and the
> caller could delay a bit before retrying, but the whole purpose of
> skipping the probe after presuspend was to speed things up, and that
> would just slow them down. Instead, remove the is_suspending flag, and
> check dm_suspended() instead to decide whether to exit the probing code
> early. This means that when the probing code exits early, future ioctls
> will also be delayed, because the device is fully suspended.
>
> Fixes: 5c977f102315 ("dm-mpath: Don't grab work_mutex while probing paths")
> Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
> ---
> drivers/md/dm-mpath.c | 9 ++-------
> 1 file changed, 2 insertions(+), 7 deletions(-)
Reviewed-by: Hanna Czenczek <hreitz@redhat.com>
prev parent reply other threads:[~2026-02-23 17:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-12 18:05 [PATCH] dm-mpath: don't stop probing paths at presuspend Benjamin Marzinski
2026-02-16 14:27 ` Martin Wilck
2026-02-23 17:00 ` Hanna Czenczek [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=c2600a65-b94d-4889-9f92-0ba9cd964ea4@redhat.com \
--to=hreitz@redhat.com \
--cc=bmarzins@redhat.com \
--cc=dm-devel@lists.linux.dev \
--cc=kwolf@redhat.com \
--cc=martin.wilck@suse.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