multipath-tools: shutdown, libdevmapper races, globals
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest21 patches 3 repliesIn review
- v221 patches 13 repliesSuperseded
- v119 patches 11 repliesSuperseded
Changes in v3 from the cover letter
- 10/21 "libmultipath: devmapper: refactor libdm version determination" fixed commit message, as suggested by Ben
- 11/21 "libmultipath: protect racy libdevmapper calls with a mutex" add fix for dmevent unit test (Ben)
- 13/21 "libmultipath: provide defaults for {get,put}_multipath_config" Ben noted that applications can't control the log level while loading the multipath configuration. This will be fixed in additional patches which have been added to the follow-up series.
- 17/21 "libmultipath: add udev and logsink symbols":
removed _libmultipath_init() again, as suggested by Ben.
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/21 | multipathd: allow shutdown during configure()libmultipath/ libmultipath/ libmultipath/ +2 more | +32 | 0 replies | |
| 2/21 | multipathd: avoid sending "READY=1" to systemd on early shutdownmultipathd/ | +7 | 0 replies | |
| 3/21 | multipathd: send "STOPPING=1" to systemd on shutdownmultipathd/ | +3 | 0 replies | |
| 4/21 | multipathd: send "RELOADING=1" to systemd on DAEMON_CONFIGURE statemultipathd/ | +3 | 0 replies | |
| 5/21 | multipathd: use volatile qualifier for running_statemultipathd/ | +1 | 0 replies | |
| 6/21 | multipathd: generalize and fix wait_for_state_change_if()multipathd/ | +18 | 0 replies | |
| 7/21 | multipathd: set_config_state(): avoid code duplicationmultipathd/ | +5 | 0 replies | |
| 8/21 | multipathd: cancel threads early during shutdownmultipathd/ | +9 | 0 replies | |
| 9/21 | multipath-tools: don't call dm_lib_release() any morekpartx/ libmpathpersist/ multipath/ +2 more | +2 | 0 replies | |
| 10/21 | libmultipath: devmapper: refactor libdm version determinationlibmultipath/ libmultipath/ libmultipath/ +7 more | +141 | 1 reply | |
| 11/21 | libmultipath: protect racy libdevmapper calls with a mutexlibmultipath/ libmultipath/ libmultipath/ +6 more | +75 | 1 reply | |
| 12/21 | libmultipath: constify file argument in config parserlibmultipath/ libmultipath/ libmultipath/ +1 more | +8 | 0 replies | |
| 13/21 | libmultipath: provide defaults for {get, put}_multipath_configlibmultipath/ libmultipath/ libmultipath/ | +93 | 0 replies | |
| 14/21 | libmpathpersist: allow using libmultipath {get, put}_multipath_configlibmpathpersist/ libmpathpersist/ libmpathpersist/ | +70 | 0 replies | |
| 15/21 | multipath: use {get_put}_multipath_config from libmultipathmultipath/ | +4 | 0 replies | |
| 16/21 | mpathpersist: use {get, put}_multipath_config() from libmultipathmpathpersist/ | +2 | 0 replies | |
| 17/21 | libmultipath: add udev and logsink symbolslibmultipath/ libmultipath/ libmultipath/ +1 more | +96 | 1 reply | |
| 18/21 | multipath: remove logsink and udevmultipath/ | +2 | 0 replies | |
| 19/21 | libmpathpersist: call libmultipath_{init, exit}()libmpathpersist/ libmpathpersist/ | +14 | 0 replies | |
| 20/21 | mpathpersist: remove logsink and udevmpathpersist/ | +0 | 0 replies | |
| 21/21 | multipathd: remove logsink and udevmultipathd/ | +3 | 0 replies |
Reviews trailers per patch
All 21 patches have a Reviewed-by or Acked-by.
| Patch | Benjamin Marzinski |
|---|---|
| 1/21 | R-b |
| 2/21 | R-b |
| 3/21 | R-b |
| 4/21 | R-b |
| 5/21 | R-b |
| 6/21 | R-b |
| 7/21 | R-b |
| 8/21 | R-b |
| 9/21 | R-b |
| 10/21 | R-b |
| 11/21 | R-b |
| 12/21 | R-b |
| 13/21 | R-b |
| 14/21 | R-b |
| 15/21 | R-b |
| 16/21 | R-b |
| 17/21 | R-b |
| 18/21 | R-b |
| 19/21 | R-b |
| 20/21 | R-b |
| 21/21 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [dm-devel] [PATCH v3 00/21] multipath-tools: shutdown, libdevmapper races, globals
From: Martin Wilck <[email protected]>
Hi Christophe, hi Ben,
this series contains a number of patches I've wanted to do for some time. It's based on my "upstream-queue" tree
(https://github.com/openSUSE/multipath-tools/tree/upstream-queue),
plus my previously submitted "multipath-tools:add linker version scripts" (v2) series. The reason is that this series contains a number of ABI changes, and is thus suitable for demonstrating how to work with the libmultipath linker version scripts.
Patch 1-8 are related to multipathd shutdown and systemd notifcation. Patch 1 and 8 have been part of my earlier series "multipath-tools:
Fix remaining shutdown delay issues" from Jan, 2019. But this is so long ago that I didn't mark this as a v2. I have tried to address Ben's issues with #1 (size_mismatch_seen leak, and premature sd_notify)
(https://www.redhat.com/archives/dm-devel/2019-January/msg00097.html).
#8 is just resent, after the recent discussion
(https://www.redhat.com/archives/dm-devel/2020-August/msg00342.html).
Ben's remark about sd_notify() drove me to reexamine that feature, and actually improve a little by informing systemd of shutdown and reconfigure operations.
Patch 9-11 are an attempt to fix races in libdevmapper, as discussed a while ago in the "fix fd leak when iscsi device logs in" thread
(https://www.redhat.com/archives/dm-devel/2020-July/msg00321.html and references).
Patch 12ff. add definitions of the symbol get_multipath_config(), put_multipath_config(), udev, and logsink to libmultipath. This way callers won't have to bother with defining these global symbols any more in the future (but they still can).
Changes v1 -> v2:
- rebased on "version script" series. Some patches which modify the ABI (10, 11, 13, 14, 17) have the respective hunks added.
- 10/21: Added fix for the hwtable unit test. added comments. avoid logging a version that couldn't be determined.
- 11/21: renamed libmp_task_run -> libmp_dm_task_run
- 13/21: get_multipath_config(): return NULL if not initialized zero out configuration in _uninit_config() (Ben)
- 17/21: Changed initialization as discussed with Ben. Added documentation in config.h.
- 19/21: This one is new, as suggested by Ben
- 20/21: This was 19 before, simplified now as the real changes are in libmpathpersist.
- 21/21: New, also remove the globals in multipathd.
Changes v2 -> v3:
- 10/21 "libmultipath: devmapper: refactor libdm version determination" fixed commit message, as suggested by Ben
- 11/21 "libmultipath: protect racy libdevmapper calls with a mutex" add fix for dmevent unit test (Ben)
- 13/21 "libmultipath: provide defaults for {get,put}_multipath_config" Ben noted that applications can't control the log level while loading the multipath configuration. This will be fixed in additional patches which have been added to the follow-up series.
- 17/21 "libmultipath: add udev and logsink symbols":
removed _libmultipath_init() again, as suggested by Ben.
Regards
Martin
Martin Wilck (21):
multipathd: allow shutdown during configure()
multipathd: avoid sending "READY=1" to systemd on early shutdown
multipathd: send "STOPPING=1" to systemd on shutdown
multipathd: send "RELOADING=1" to systemd on DAEMON_CONFIGURE state
multipathd: use volatile qualifier for running_state
multipathd: generalize and fix wait_for_state_change_if()
multipathd: set_config_state(): avoid code duplication
multipathd: cancel threads early during shutdown
multipath-tools: don't call dm_lib_release() any more
libmultipath: devmapper: refactor libdm version determination
libmultipath: protect racy libdevmapper calls with a mutex
libmultipath: constify file argument in config parser
libmultipath: provide defaults for {get,put}_multipath_config
libmpathpersist: allow using libmultipath {get,put}_multipath_config
multipath: use {get_put}_multipath_config from libmultipath
mpathpersist: use {get,put}_multipath_config() from libmultipath
libmultipath: add udev and logsink symbols
multipath: remove logsink and udev
libmpathpersist: call libmultipath_{init,exit}()
mpathpersist: remove logsink and udev
multipathd: remove logsink and udev
kpartx/kpartx.c | 1 - libmpathpersist/libmpathpersist.version | 6 + libmpathpersist/mpath_persist.c | 50 ++++- libmpathpersist/mpath_persist.h | 31 ++++ libmultipath/config.c | 119 ++++++++++-- libmultipath/config.h | 70 ++++++- libmultipath/configure.c | 6 + libmultipath/debug.c | 2 + libmultipath/devmapper.c | 233 ++++++++++++++++-------- libmultipath/devmapper.h | 13 +- libmultipath/discovery.c | 3 + libmultipath/libmultipath.version | 29 ++- libmultipath/parser.c | 9 +- libmultipath/parser.h | 2 +- libmultipath/propsel.c | 10 +- libmultipath/util.c | 10 + libmultipath/util.h | 2 + mpathpersist/main.c | 22 +-- multipath/main.c | 28 +-- multipathd/cli_handlers.c | 2 - multipathd/dmevents.c | 4 +- multipathd/main.c | 126 ++++++------- multipathd/waiter.c | 2 +- tests/Makefile | 3 +- tests/dmevents.c | 12 ++ tests/hwtable.c | 3 - tests/test-lib.c | 13 ++ 27 files changed, 579 insertions(+), 232 deletions(-)
Signature · 7 lines
2.28.0 -- dm-devel mailing list [email protected] https://www.redhat.com/mailman/listinfo/dm-devel