Skip to content

Split libmultipath and libmpathutil

[email protected] dm-devel 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest12 patches 4 repliesIn review
  2. v32 of 11 patches 1 replySuperseded
  3. v211 patches 2 repliesSuperseded

Changes in v4 from the cover letter

- 01/11: don't drop add_history() call if readline library is in use
- 01/11: remove key_generator from cli.h if unused
- 09/11: fix a defect detected by coverity
- 10/11: better error messages, and error out on negative timeout value
- 12/11: added, found by coverity

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12multipathd: replace libreadline with getline()Makefile.inc multipathd/cli.c multipathd/cli.h +1 more+43 -161 reply
2/12.gitignore: ignore generated ABI files.gitignore+2 -00 replies
3/12libmultipath: move all reservation key functions to prkey.clibmultipath/Makefile libmultipath/dict.c libmultipath/dict.h +4 more+53 -530 replies
4/12libmultipath: always set _GNU_SOURCElibmultipath/Makefile+2 -20 replies
5/12multipath-tools: Makefile: fix dependencies for "install" targetMakefile+2 -20 replies
6/12libmultipath checkers/prioritizers: search for includes in libmultipathlibmultipath/checkers/Makefile libmultipath/checkers/directio.c libmultipath/checkers/emc_clariion.c +6 more+20 -170 replies
7/12libmultipath: remove weak attribute for {get, put}_multipath_configlibmultipath/config.c libmultipath/config.h+2 -130 replies
8/12libmultipath: split off libmpathutilMakefile Makefile.inc libmpathpersist/Makefile +35 more+290 -840 replies
9/12multipathc: add new interactive client program.gitignore multipathd/Makefile multipathd/cli.c +3 more+299 -2531 reply
10/12multipathd: exec multipathc in interactive modemultipathd/Makefile multipathd/main.c multipathd/multipathc.c+36 -71 reply
11/12multipathd: fix incompatible pointer type error with libeditmultipathd/Makefile+4 -00 replies
12/12multipathd: fix use-after-free in handle_path_wwid_change()multipathd/main.c+3 -21 reply

Reviews trailers per patch

All 12 patches have a Reviewed-by or Acked-by.

PatchBenjamin Marzinski
1/12R-b
2/12R-b
3/12R-b
4/12R-b
5/12R-b
6/12R-b
7/12R-b
8/12R-b
9/12R-b R-b
10/12R-b
11/12R-b
12/12R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [dm-devel] [PATCH v4 00/12] Split libmultipath and libmpathutil

From: Martin Wilck <[email protected]>

Following the recent discussions about the licensing conflict between parts of libmultipath and libreadline, here comes another series for cleaning up the situation further.

Patch 1 is a modified version of https://github.com/opensvc/multipath-tools/pull/41.
Patch 2-7 are minor cleanups in preparation of the library split.

In patch8, a part of libmultipath is split off into a new library, libmpathutil. This new library contains no GPL-2.0-only code, and is thus shipped under GPL-2.0-or-later license, which is compatible with libreadline. The bulk of the multipath-specific code, including the GPL-2.0-only files, remains in libmultipath, which is thus still shipped under
a GPL-2.0-only license.

A new command "multipathc" is created in patch 9 that is now the only part of the code that uses libreadline functionality. This program links to libmpathutil only. With patch 10, in interactive mode, "multipathd -k" just exec()s this new program.

This split makes it rather obvious that the part of the multipath-tools code that depended on libreadline is small. It is still possible to control whether a readline library is used at all. This is done with the READLINE make variable, which can be empty (in which case no readline library is needed), or have the value "libreadline", or "libedit".

Patch 11 is a minor fix for older versions of libreadline.

Changes v3 -> v4 (suggested by Ben Marzinski, unless noted otherwise):
- 01/11: don't drop add_history() call if readline library is in use
- 01/11: remove key_generator from cli.h if unused
- 09/11: fix a defect detected by coverity
- 10/11: better error messages, and error out on negative timeout value
- 12/11: added, found by coverity

Changes v2->v3:
fix compilation errors on Alpine an CI errors.

Changes v1(RFC) -> v2:
- added patches 03 and 11. Numbering changes accordingly
- added SPDX header to multipathc.c
- fix some compilation errors

Hannes Reinecke (1):
multipathd: replace libreadline with getline()

Martin Wilck (11):
.gitignore: ignore generated ABI files
libmultipath: move all reservation key functions to prkey.c
libmultipath: always set _GNU_SOURCE
multipath-tools: Makefile: fix dependencies for "install" target libmultipath checkers/prioritizers: search for includes in
libmultipath
libmultipath: remove weak attribute for {get,put}_multipath_config
libmultipath: split off libmpathutil
multipathc: add new interactive client program
multipathd: exec multipathc in interactive mode
multipathd: fix incompatible pointer type error with libedit
multipathd: fix use-after-free in handle_path_wwid_change()

 .gitignore                                   |   3 +
 Makefile                                     |   8 +-
 Makefile.inc                                 |   5 +-
 libmpathpersist/Makefile                     |   6 +-
 libmpathutil/Makefile                        |  70 +++++
 {libmultipath => libmpathutil}/debug.c       |   0
 {libmultipath => libmpathutil}/debug.h       |   0
 libmpathutil/globals.c                       |  12 +
 libmpathutil/globals.h                       |  39 +++
 libmpathutil/libmpathutil.version            | 123 +++++++++
 {libmultipath => libmpathutil}/log.c         |   0
 {libmultipath => libmpathutil}/log.h         |   0
 {libmultipath => libmpathutil}/log_pthread.c |   0
 {libmultipath => libmpathutil}/log_pthread.h |   0
 {libmultipath => libmpathutil}/msort.c       |   0
 {libmultipath => libmpathutil}/msort.h       |   0
 {libmultipath => libmpathutil}/parser.c      |   0
 {libmultipath => libmpathutil}/parser.h      |   2 +-
 {libmultipath => libmpathutil}/strbuf.c      |   0
 {libmultipath => libmpathutil}/strbuf.h      |   0
 {libmultipath => libmpathutil}/time-util.c   |   0
 {libmultipath => libmpathutil}/time-util.h   |   0
 {libmultipath => libmpathutil}/util.c        |  32 ---
 {libmultipath => libmpathutil}/util.h        |   2 -
 {libmultipath => libmpathutil}/uxsock.c      |   0
 {libmultipath => libmpathutil}/uxsock.h      |   0
 {libmultipath => libmpathutil}/vector.c      |   0
 {libmultipath => libmpathutil}/vector.h      |   0
 libmpathvalid/Makefile                       |   6 +-
 libmultipath/Makefile                        |  17 +-
 libmultipath/checkers/Makefile               |   7 +-
 libmultipath/checkers/directio.c             |   4 +-
 libmultipath/checkers/emc_clariion.c         |   2 +-
 libmultipath/checkers/hp_sw.c                |   4 +-
 libmultipath/checkers/rdac.c                 |   2 +-
 libmultipath/checkers/tur.c                  |   8 +-
 libmultipath/config.c                        |   4 +-
 libmultipath/config.h                        |  14 +-
 libmultipath/dict.c                          |  16 +-
 libmultipath/dict.h                          |   2 -
 libmultipath/foreign/Makefile                |   6 +-
 libmultipath/libmultipath.version            |  41 ---
 libmultipath/prioritizers/Makefile           |   8 +-
 libmultipath/prioritizers/alua_rtpg.c        |   2 +-
 libmultipath/prkey.c                         |  49 +++-
 libmultipath/prkey.h                         |   3 +
 mpathpersist/Makefile                        |   4 +-
 multipath/Makefile                           |   6 +-
 multipathd/Makefile                          |  43 ++-
 multipathd/cli.c                             | 128 +--------
 multipathd/cli.h                             |   5 +-
 multipathd/main.c                            |  20 +-
 multipathd/multipathc.c                      | 276 +++++++++++++++++++
 multipathd/uxclnt.c                          | 108 +-------
 tests/Makefile                               |  12 +-
 55 files changed, 703 insertions(+), 396 deletions(-)
 create mode 100644 libmpathutil/Makefile
 rename {libmultipath => libmpathutil}/debug.c (100%)
 rename {libmultipath => libmpathutil}/debug.h (100%)
 create mode 100644 libmpathutil/globals.c
 create mode 100644 libmpathutil/globals.h
 create mode 100644 libmpathutil/libmpathutil.version
 rename {libmultipath => libmpathutil}/log.c (100%)
 rename {libmultipath => libmpathutil}/log.h (100%)
 rename {libmultipath => libmpathutil}/log_pthread.c (100%)
 rename {libmultipath => libmpathutil}/log_pthread.h (100%)
 rename {libmultipath => libmpathutil}/msort.c (100%)
 rename {libmultipath => libmpathutil}/msort.h (100%)
 rename {libmultipath => libmpathutil}/parser.c (100%)
 rename {libmultipath => libmpathutil}/parser.h (99%)
 rename {libmultipath => libmpathutil}/strbuf.c (100%)
 rename {libmultipath => libmpathutil}/strbuf.h (100%)
 rename {libmultipath => libmpathutil}/time-util.c (100%)
 rename {libmultipath => libmpathutil}/time-util.h (100%)
 rename {libmultipath => libmpathutil}/util.c (92%)
 rename {libmultipath => libmpathutil}/util.h (96%)
 rename {libmultipath => libmpathutil}/uxsock.c (100%)
 rename {libmultipath => libmpathutil}/uxsock.h (100%)
 rename {libmultipath => libmpathutil}/vector.c (100%)
 rename {libmultipath => libmpathutil}/vector.h (100%)
 create mode 100644 multipathd/multipathc.c
Signature · 6 lines
2.37.1

--
dm-devel mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/dm-devel