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