multipath-tools: Handle tableless DM devices
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest12 patches 0 repliesNew
- v213 patches 7 repliesSuperseded
- v16 patches 15 repliesSuperseded
Changes in v3 from the cover letter
0008: Fixed commit message
0009 & 0010: merged. All future patch number are one less then their
previous number.
0011 & 0012: Fixed commit messages
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/12 | libmultipath: signal device with no table in libmp_mapinfolibmultipath/ libmultipath/ | +10 | 0 replies | |
| 2/12 | multipath-tools tests: fix mapinfo teststests/ | +43 | 0 replies | |
| 3/12 | libmultipath: fix removing device after failed creationlibmultipath/ libmultipath/ | +5 | 0 replies | |
| 4/12 | libmultipath: set uuid, name, and dmi if a device is foundlibmultipath/ libmultipath/ libmultipath/ +1 more | +63 | 0 replies | |
| 5/12 | libmultipath: check table type in dm_find_map_by_wwidlibmultipath/ multipathd/ | +8 | 0 replies | |
| 6/12 | libmultipath: handle a create corner case for empty deviceslibmultipath/ | +20 | 0 replies | |
| 7/12 | libmultipath: handle empty maps in dm_flush_map__libmultipath/ | +7 | 0 replies | |
| 8/12 | libmultipath: factor out code to check if a device is a partitionlibmultipath/ | +29 | 0 replies | |
| 9/12 | libmultipath: remove recursive calls in partmap_funcslibmultipath/ | +31 | 0 replies | |
| 10/12 | libmultipath: assume device is in use if dm_get_opencount failslibmultipath/ | +5 | 0 replies | |
| 11/12 | libmultipath: accept empty partitions as valid in do_foreach_partmapslibmultipath/ | +17 | 0 replies | |
| 12/12 | libmultipath: reduce log level for DMP_NOT_FOUNDlibmultipath/ | +1 | 0 replies |
Reviews trailers per patch
8 of 12 patches have a Reviewed-by or Acked-by.
| Patch | Martin Wilck |
|---|---|
| 1/12 | R-b |
| 2/12 | |
| 3/12 | R-b |
| 4/12 | R-b |
| 5/12 | R-b |
| 6/12 | |
| 7/12 | R-b |
| 8/12 | |
| 9/12 | |
| 10/12 | R-b |
| 11/12 | R-b |
| 12/12 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v3 00/12] multipath-tools: Handle tableless DM devices
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 always fills in info.name, info.uuid and info.dmi if requested, whenever a device is found, even if it returns DMP_NO_MATCH, DMP_EMPTY, or DMP_ERR. dm_find_map_by_wwid() uses this, 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".
Finally, dm_flush_map__() and do_foreach_partmaps() also handle tabless devices. So multipath -F will remove tabless multipath devices, as well as tableless partition devices on top of multipath devices (tabless or not). I cleanup up a number of minor issues while working on this.
Changes from v2 (based on suggestions from Martin Wilck):
0008: Fixed commit message
0009 & 0010: merged. All future patch number are one less then their
previous number.
0011 & 0012: Fixed commit messages
Changes from v1 (based on discussions with Martin Wilck):
0004: Dropped the flag. libmp_mapinfo now always fills in uuid, name, and
dmi if a device was found and they are non-NULL.
0005: Adapt to the changes in 0004
0007-0013: New patches to handle tabless devices in dm_flush_map__() and
do_foreach_partmaps(), as well as some minor fixes/cleanups I encountered along the way.
Benjamin Marzinski (11):
libmultipath: signal device with no table in libmp_mapinfo
libmultipath: fix removing device after failed creation
libmultipath: set uuid, name, and dmi if a device is found
libmultipath: check table type in dm_find_map_by_wwid
libmultipath: handle a create corner case for empty devices
libmultipath: handle empty maps in dm_flush_map__
libmultipath: factor out code to check if a device is a partition
libmultipath: remove recursive calls in partmap_funcs
libmultipath: assume device is in use if dm_get_opencount fails
libmultipath: accept empty partitions as valid in do_foreach_partmaps
libmultipath: reduce log level for DMP_NOT_FOUND
Martin Wilck (1):
multipath-tools tests: fix mapinfo tests
libmultipath/configure.c | 21 +++- libmultipath/devmapper.c | 212 +++++++++++++++++++++---------------- libmultipath/devmapper.h | 13 ++- libmultipath/structs_vec.c | 5 +- multipathd/cli_handlers.c | 8 +- tests/mapinfo.c | 92 ++++++++++++---- 6 files changed, 235 insertions(+), 116 deletions(-)
Signature · 1 line
2.46.2