DM-Devel Archive mirror
 help / color / mirror / Atom feed
From: Benjamin Marzinski <bmarzins@redhat.com>
To: Christophe Varoqui <christophe.varoqui@opensvc.com>
Cc: device-mapper development <dm-devel@lists.linux.dev>,
	Martin Wilck <Martin.Wilck@suse.com>
Subject: [PATCH 0/3] multipath: fix hang in flush_map_nopaths
Date: Tue, 23 Apr 2024 18:25:33 -0400	[thread overview]
Message-ID: <20240423222536.2096486-1-bmarzins@redhat.com> (raw)

Commit 9bd3482e ("multipathd: make flush_map() delete maps like the
multipath command") fixed a multipathd hang when trying to remove a
multipath device with only kpartx devices opening it but with
outstanding IO. However that commit didn't deal with autoremoving the
multipath device when the last path is deleted. It's possible for the
same hang to occur during an autoremove. Since this remove is not
initiated by the user, multipathd shouldn't just automatically disable
queueing. On the other hand, multipathd hanging is a big problem, since
that stops all of its work on all multipath devices. This patchset
handles the issue by changing the options for flush_on_last_del to give
the users more choice in how to deal with this situation. But none of
the options will allow multipath to flush a device while it is queueing,
which is the action that can cause it to hang.

Benjamin Marzinski (3):
  libmultipath: export partmap_in_use and do_deferred
  libmultipath: change flush_on_last_del to fix a multipathd hang
  libmultipath: simplify dm_flush_map_nopaths

 libmultipath/defaults.h           |  2 +-
 libmultipath/devmapper.c          | 23 +---------
 libmultipath/devmapper.h          |  6 ++-
 libmultipath/dict.c               | 72 +++++++++++++++++++++++++++----
 libmultipath/dict.h               |  1 +
 libmultipath/hwtable.c            |  6 +--
 libmultipath/libmultipath.version |  4 +-
 libmultipath/propsel.c            |  4 +-
 libmultipath/structs.h            |  7 +--
 multipath/multipath.conf.5.in     | 20 ++++++---
 multipathd/main.c                 | 42 +++++++++++++++---
 11 files changed, 135 insertions(+), 52 deletions(-)

-- 
2.43.0


             reply	other threads:[~2024-04-23 22:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-23 22:25 Benjamin Marzinski [this message]
2024-04-23 22:25 ` [PATCH 1/3] libmultipath: export partmap_in_use and do_deferred Benjamin Marzinski
2024-04-24 16:40   ` Martin Wilck
2024-05-02 15:06   ` Martin Wilck
2024-04-23 22:25 ` [PATCH 2/3] libmultipath: change flush_on_last_del to fix a multipathd hang Benjamin Marzinski
2024-04-24 16:34   ` Martin Wilck
2024-04-24 20:42     ` Benjamin Marzinski
2024-04-24 22:15       ` Benjamin Marzinski
2024-04-25 16:56       ` Martin Wilck
2024-04-23 22:25 ` [PATCH 3/3] libmultipath: simplify dm_flush_map_nopaths Benjamin Marzinski
2024-04-24 16:40   ` Martin Wilck
2024-04-24 20:43     ` Benjamin Marzinski

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=20240423222536.2096486-1-bmarzins@redhat.com \
    --to=bmarzins@redhat.com \
    --cc=Martin.Wilck@suse.com \
    --cc=christophe.varoqui@opensvc.com \
    --cc=dm-devel@lists.linux.dev \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).