All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/44] multipath-tools: devmapper API refactored
@ 2024-07-09 21:38 Martin Wilck
  2024-07-09 21:38 ` [PATCH 01/44] multipath-tools CI: more fixes for arm/v7 Martin Wilck
                   ` (44 more replies)
  0 siblings, 45 replies; 75+ messages in thread
From: Martin Wilck @ 2024-07-09 21:38 UTC (permalink / raw)
  To: Christophe Varoqui, Benjamin Marzinski; +Cc: dm-devel

Patch 1-9 are generic cleanups, partly targeting the previously reported
issues with multipath-tools installation on NixOS by removing hard-coded
paths as much as possible.

Patch 10-16 are basic cleanups for the devmapper code.

Patch 17 is the heart of this patch set, introducing the function
libmp_mapinfo(), which is supposed to serve as general API for fetching
information about maps from libdevmapper. It can work with arbitrary
input for identifying a map, and produce any combination of desired
outputs, with the most lightweight (combination of) ioctls possible.
This part of the set removes some code that had been changed
in patch 10-16. This is sort of suboptimal, but IMO it improves
the readability of the set as  a whole.

Patch 18 adds unit tests for this function.

Patch 19-44 change the libmultipath code to use the new API everywhere,
and add some additional minor improvements and fixes.

The code is pushed to https://github.com/openSUSE/multipath-tools/tree/tip.

Comments and reviews welcome.

Martin Wilck (44):
  multipath-tools CI: more fixes for arm/v7
  multipath-tools CI: fix dmevents test for Debian Sid, arm/v7
  create-config.mk: use printf instead of /bin/echo
  multipathd.service.in: use @BINDIR@ instead of /sbin
  Makefile.inc: replace @BINDIR@ with $(TGTDIR)/$(bindir)
  kpartx.rules: use @BINDIR@ to locate kpartx
  multipath-tools: Remove hard-coded paths to executables
  multipath-tools: compile_commands.json fixes
  multipath-tools: .gitignore: ignore o.wrap files for CI helpers
  libmultipath: remove unused includes in devmapper.h
  libmultipath: use DM_DEVICE_INFO in dm_mapname()
  multipath-tools: don't call dm_task_no_open_count()
  libmpathutil: export cleanup_udev_device()
  libmpathutil: add cleanup_vector()
  libmultipath: add cleanup helpers for struct multipath
  libmultipath: add cleanup_dm_task(), and use it in devmapper.c
  libmultipath: add libmp_mapinfo()
  libmultipath tests: add tests for libmp_mapinfo()
  libmultipath: implement dm_get_info() and dm_map_present() with new
    API
  libmultipath: remove dm_get_prefixed_uuid()
  libmultipath: is_mpath_part(): improve parsing
  libmultipath: rename dm_get_uuid() -> dm_get_wwid()
  libmultipath: improve dm_get_wwid() return value logic
  libmultipath: reimplement dm_map_name() with new API
  libmultipath: reimplement dm_map_present_by_uuid()
  libmultipath: reimplement dm_get_opencount() with new API
  libmpathpersist: skip redundant dm_map_present() call
  libmultipath: implement dm_is_mpath() with new API
  libmultipath: implement dm_get_multipath() with new API
  libmultipath: use libmp_mapinfo() in _dm_flush_map()
  libmultipath: add is_mpath_uuid() helper
  libmultipath: add is_mpath_part_uuid() helper
  libmultipath: add dmp_errstr() helper
  libmultipath: use libmp_mapinfo() in do_foreach_partmaps()
  libmultipath: use libmp_pathinfo() in update_multipath_table()
  libmultipath: update mpp->dmi in update_multipath_table()
  libmultipath: drop extra call to dm_map_present() in domap()
  libmultipath: split off update_multipath_table__()
  multipath: implement check_usable_paths() with libmp_pathinfo()
  multipathd: implement add_map_without_path() with libmp_mapinfo()
  libmultipath: simplify dm_get_maps()
  llibmultipath: fix return code check for dm_is_suspended()
  libmpathpersist: use libmp_mapinfo() in get_mpvec()
  libmpathpersist: use mpp->alias in do_mpath_persistent_reserve_out()

 .gitignore                               |    4 +
 Makefile                                 |    4 +-
 Makefile.inc                             |   29 +-
 create-config.mk                         |    4 +-
 kpartx/Makefile                          |    4 +-
 kpartx/devmapper.c                       |   15 -
 kpartx/{kpartx.rules => kpartx.rules.in} |    2 +-
 kpartx/kpartx_id                         |    8 +-
 libmpathpersist/mpath_persist_int.c      |   85 +-
 libmpathutil/libmpathutil.version        |    5 +
 libmpathutil/util.c                      |    6 +
 libmpathutil/util.h                      |    3 +
 libmpathutil/vector.c                    |    6 +
 libmpathutil/vector.h                    |    1 +
 libmultipath/alias.c                     |    5 +-
 libmultipath/configure.c                 |   27 +-
 libmultipath/devmapper.c                 | 1020 ++++++++------------
 libmultipath/devmapper.h                 |  101 +-
 libmultipath/libmultipath.version        |   10 +-
 libmultipath/print.c                     |    6 -
 libmultipath/structs.c                   |   12 +
 libmultipath/structs.h                   |    2 +
 libmultipath/structs_vec.c               |   50 +-
 libmultipath/structs_vec.h               |    2 +
 libmultipath/valid.c                     |    2 +-
 libmultipath/wwids.c                     |    2 +-
 multipath/11-dm-mpath.rules.in           |    4 +-
 multipath/main.c                         |   60 +-
 multipath/multipath.rules.in             |    6 +-
 multipathd/dmevents.c                    |    6 +-
 multipathd/main.c                        |   71 +-
 multipathd/multipathd.service.in         |    4 +-
 multipathd/waiter.c                      |    2 -
 tests/Makefile                           |    5 +-
 tests/alias.c                            |   32 +-
 tests/dmevents.c                         |   34 +-
 tests/mapinfo.c                          | 1121 ++++++++++++++++++++++
 tests/valid.c                            |   10 +-
 tests/wrap64.h                           |    9 +-
 39 files changed, 1916 insertions(+), 863 deletions(-)
 rename kpartx/{kpartx.rules => kpartx.rules.in} (96%)
 create mode 100644 tests/mapinfo.c

-- 
2.45.2


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

end of thread, other threads:[~2024-07-11 22:00 UTC | newest]

Thread overview: 75+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-09 21:38 [PATCH 00/44] multipath-tools: devmapper API refactored Martin Wilck
2024-07-09 21:38 ` [PATCH 01/44] multipath-tools CI: more fixes for arm/v7 Martin Wilck
2024-07-10  7:06   ` Martin Wilck
2024-07-09 21:38 ` [PATCH 02/44] multipath-tools CI: fix dmevents test for Debian Sid, arm/v7 Martin Wilck
2024-07-09 21:38 ` [PATCH 03/44] create-config.mk: use printf instead of /bin/echo Martin Wilck
2024-07-09 21:38 ` [PATCH 04/44] multipathd.service.in: use @BINDIR@ instead of /sbin Martin Wilck
2024-07-09 21:38 ` [PATCH 05/44] Makefile.inc: replace @BINDIR@ with $(TGTDIR)/$(bindir) Martin Wilck
2024-07-09 21:38 ` [PATCH 06/44] kpartx.rules: use @BINDIR@ to locate kpartx Martin Wilck
2024-07-10 16:30   ` Benjamin Marzinski
2024-07-10 20:15     ` Martin Wilck
2024-07-09 21:38 ` [PATCH 07/44] multipath-tools: Remove hard-coded paths to executables Martin Wilck
2024-07-09 21:38 ` [PATCH 08/44] multipath-tools: compile_commands.json fixes Martin Wilck
2024-07-09 21:39 ` [PATCH 09/44] multipath-tools: .gitignore: ignore o.wrap files for CI helpers Martin Wilck
2024-07-09 21:39 ` [PATCH 10/44] libmultipath: remove unused includes in devmapper.h Martin Wilck
2024-07-09 21:39 ` [PATCH 11/44] libmultipath: use DM_DEVICE_INFO in dm_mapname() Martin Wilck
2024-07-09 21:39 ` [PATCH 12/44] multipath-tools: don't call dm_task_no_open_count() Martin Wilck
2024-07-09 21:39 ` [PATCH 13/44] libmpathutil: export cleanup_udev_device() Martin Wilck
2024-07-09 21:39 ` [PATCH 14/44] libmpathutil: add cleanup_vector() Martin Wilck
2024-07-09 21:39 ` [PATCH 15/44] libmultipath: add cleanup helpers for struct multipath Martin Wilck
2024-07-09 21:39 ` [PATCH 16/44] libmultipath: add cleanup_dm_task(), and use it in devmapper.c Martin Wilck
2024-07-10 20:12   ` Benjamin Marzinski
2024-07-10 20:18     ` Martin Wilck
2024-07-09 21:39 ` [PATCH 17/44] libmultipath: add libmp_mapinfo() Martin Wilck
2024-07-10 22:53   ` Benjamin Marzinski
2024-07-11 11:00     ` Martin Wilck
2024-07-09 21:39 ` [PATCH 18/44] libmultipath tests: add tests for libmp_mapinfo() Martin Wilck
2024-07-09 21:39 ` [PATCH 19/44] libmultipath: implement dm_get_info() and dm_map_present() with new API Martin Wilck
2024-07-09 21:39 ` [PATCH 20/44] libmultipath: remove dm_get_prefixed_uuid() Martin Wilck
2024-07-09 21:39 ` [PATCH 21/44] libmultipath: is_mpath_part(): improve parsing Martin Wilck
2024-07-10 22:54   ` Benjamin Marzinski
2024-07-11 11:08     ` Martin Wilck
2024-07-11 17:01       ` Benjamin Marzinski
2024-07-11 17:41         ` Martin Wilck
2024-07-09 21:39 ` [PATCH 22/44] libmultipath: rename dm_get_uuid() -> dm_get_wwid() Martin Wilck
2024-07-09 21:39 ` [PATCH 23/44] libmultipath: improve dm_get_wwid() return value logic Martin Wilck
2024-07-10 23:34   ` Benjamin Marzinski
2024-07-11 12:25     ` Martin Wilck
2024-07-11 16:38       ` Benjamin Marzinski
2024-07-11 22:00       ` Martin Wilck
2024-07-09 21:39 ` [PATCH 24/44] libmultipath: reimplement dm_map_name() with new API Martin Wilck
2024-07-10 23:41   ` Benjamin Marzinski
2024-07-09 21:39 ` [PATCH 25/44] libmultipath: reimplement dm_map_present_by_uuid() Martin Wilck
2024-07-09 21:39 ` [PATCH 26/44] libmultipath: reimplement dm_get_opencount() with new API Martin Wilck
2024-07-09 21:39 ` [PATCH 27/44] libmpathpersist: skip redundant dm_map_present() call Martin Wilck
2024-07-09 21:39 ` [PATCH 28/44] libmultipath: implement dm_is_mpath() with new API Martin Wilck
2024-07-11  0:21   ` Benjamin Marzinski
2024-07-11 12:32     ` Martin Wilck
2024-07-09 21:39 ` [PATCH 29/44] libmultipath: implement dm_get_multipath() " Martin Wilck
2024-07-09 21:39 ` [PATCH 30/44] libmultipath: use libmp_mapinfo() in _dm_flush_map() Martin Wilck
2024-07-09 21:39 ` [PATCH 31/44] libmultipath: add is_mpath_uuid() helper Martin Wilck
2024-07-11  3:38   ` Benjamin Marzinski
2024-07-11 12:56     ` Martin Wilck
2024-07-11 18:39       ` Benjamin Marzinski
2024-07-11 18:59         ` Martin Wilck
2024-07-09 21:39 ` [PATCH 32/44] libmultipath: add is_mpath_part_uuid() helper Martin Wilck
2024-07-09 21:39 ` [PATCH 33/44] libmultipath: add dmp_errstr() helper Martin Wilck
2024-07-09 21:39 ` [PATCH 34/44] libmultipath: use libmp_mapinfo() in do_foreach_partmaps() Martin Wilck
2024-07-09 21:39 ` [PATCH 35/44] libmultipath: use libmp_pathinfo() in update_multipath_table() Martin Wilck
2024-07-11  5:16   ` Benjamin Marzinski
2024-07-11 15:29     ` Martin Wilck
2024-07-09 21:39 ` [PATCH 36/44] libmultipath: update mpp->dmi " Martin Wilck
2024-07-09 21:39 ` [PATCH 37/44] libmultipath: drop extra call to dm_map_present() in domap() Martin Wilck
2024-07-09 21:39 ` [PATCH 38/44] libmultipath: split off update_multipath_table__() Martin Wilck
2024-07-09 21:39 ` [PATCH 39/44] multipath: implement check_usable_paths() with libmp_pathinfo() Martin Wilck
2024-07-11  5:38   ` Benjamin Marzinski
2024-07-09 21:39 ` [PATCH 40/44] multipathd: implement add_map_without_path() with libmp_mapinfo() Martin Wilck
2024-07-11  6:11   ` Benjamin Marzinski
2024-07-09 21:39 ` [PATCH 41/44] libmultipath: simplify dm_get_maps() Martin Wilck
2024-07-09 21:39 ` [PATCH 42/44] llibmultipath: fix return code check for dm_is_suspended() Martin Wilck
2024-07-11  6:27   ` Benjamin Marzinski
2024-07-11 15:35     ` Martin Wilck
2024-07-09 21:39 ` [PATCH 43/44] libmpathpersist: use libmp_mapinfo() in get_mpvec() Martin Wilck
2024-07-11  6:43   ` Benjamin Marzinski
2024-07-09 21:39 ` [PATCH 44/44] libmpathpersist: use mpp->alias in do_mpath_persistent_reserve_out() Martin Wilck
2024-07-11  6:55 ` [PATCH 00/44] multipath-tools: devmapper API refactored 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.