mbox series

[0/3] multipath: fix hang in flush_map_nopaths

Message ID 20240423222536.2096486-1-bmarzins@redhat.com (mailing list archive)
Headers show
Series multipath: fix hang in flush_map_nopaths | expand

Message

Benjamin Marzinski April 23, 2024, 10:25 p.m. UTC
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(-)