All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] multipath-tools: Handle tableless DM devices
@ 2024-11-15 23:22 Benjamin Marzinski
  2024-11-15 23:22 ` [PATCH 1/6] libmultipath: signal device with no table in libmp_mapinfo Benjamin Marzinski
                   ` (6 more replies)
  0 siblings, 7 replies; 22+ messages in thread
From: Benjamin Marzinski @ 2024-11-15 23:22 UTC (permalink / raw)
  To: Christophe Varoqui; +Cc: device-mapper development, Martin Wilck

This is another stab at handling tableless multipath devices. The first
two patches are reworkings of two patches from my last patchset based
on feedback from Martin. The rest are new.

libmp_mapinfo now has a new return value, DMP_EMPTY, for devices that
don't have any table. The creation failure path is fixed to check for
this value before removing a device after a failed create, instead of
just removing any existing DM device with the same name. 

libmp_mapinfo now also accepts a new flag, MAPINFO_ID_IF_FOUND, which
causes it to populate info.name and info.uuid if requested, whenever a
device is found, even if it returns DMP_NO_MATCH or DMP_EMPTY.
dm_find_map_by_wwid() uses this new flag, as well as MAPINFO_MPATH_ONLY,
to only return DM_OK for valid multipath devices, but to return the
alias of any device that matches the uuid, even if it's not a valid
multipath device.

domap() has been updated to use dm_find_map_by_wwid() to check for any
DM device that matches the WWID of the device to be created. This lets
it handle tableless devices that share the WWID of the device to be
created but not its alias. Previously, multipath would fail attempting
to create these devices. Now it correctly renames and reloads them when
running multipath, starting or reloading multipathd, or running
"multipathd add map".

I'm not completely happy with the MAPINFO_ID_IF_FOUND flag. An
alternative would be to run a second libmp_mapinfo() call without
MAPINFO_MPATH_ONLY to grab the name, if the first failed with DMP_EMPTY.
If people think that's a better way to solve this, I can rework those
patches.

Benjamin Marzinski (5):
  libmultipath: signal device with no table in libmp_mapinfo
  libmultipath: fix removing device after failed creation
  libmultipath: Add flag to always return device ID when found
  libmultipath: check table type in dm_find_map_by_wwid
  libmultipath: handle a create corner case for empty devices

Martin Wilck (1):
  multipath-tools tests: fix mapinfo tests

 libmultipath/configure.c  |  21 +++++-
 libmultipath/devmapper.c  |  48 ++++++++----
 libmultipath/devmapper.h  |  13 +++-
 multipathd/cli_handlers.c |   8 +-
 tests/mapinfo.c           | 149 ++++++++++++++++++++++++++++++++++++--
 5 files changed, 216 insertions(+), 23 deletions(-)

-- 
2.46.2


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2024-11-21 18:01 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-15 23:22 [PATCH 0/6] multipath-tools: Handle tableless DM devices Benjamin Marzinski
2024-11-15 23:22 ` [PATCH 1/6] libmultipath: signal device with no table in libmp_mapinfo Benjamin Marzinski
2024-11-19 16:39   ` Martin Wilck
2024-11-19 20:33     ` Benjamin Marzinski
2024-11-20  8:49       ` Martin Wilck
2024-11-20 21:59         ` Benjamin Marzinski
2024-11-21  8:57           ` Martin Wilck
2024-11-21 18:00             ` Benjamin Marzinski
2024-11-15 23:22 ` [PATCH 2/6] multipath-tools tests: fix mapinfo tests Benjamin Marzinski
2024-11-15 23:22 ` [PATCH 3/6] libmultipath: fix removing device after failed creation Benjamin Marzinski
2024-11-18 11:21   ` Martin Wilck
2024-11-18 21:23     ` Benjamin Marzinski
2024-11-15 23:22 ` [PATCH 4/6] libmultipath: Add flag to always return device ID when found Benjamin Marzinski
2024-11-15 23:22 ` [PATCH 5/6] libmultipath: check table type in dm_find_map_by_wwid Benjamin Marzinski
2024-11-15 23:22 ` [PATCH 6/6] libmultipath: handle a create corner case for empty devices Benjamin Marzinski
2024-11-18 11:18 ` [PATCH 0/6] multipath-tools: Handle tableless DM devices Martin Wilck
2024-11-18 21:14   ` Benjamin Marzinski
2024-11-19 12:20     ` Martin Wilck
2024-11-19 16:40       ` Martin Wilck
2024-11-19 19:13         ` Benjamin Marzinski
2024-11-20  8:51           ` Martin Wilck
2024-11-20 19:50             ` Benjamin Marzinski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.