multipath-tools: asynchronous checker framework
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest19 patches 10 repliesIn review
- v118 patches 20 repliesSuperseded
Changes in v2 from the cover letter
- Patch 05: rework the shared_ptr test
- Patch 06: new, separate patch for removing libcheck_tread code; remove libcheck_thread and start_checker_thread() from checkers.h Following patches are renumbered
- Patch 10 (was 09): add alignment for checker_ctx field in struct runner_data remove the unused chkr field from struct async_checker_context
- Patch 12: remove struct checker_context from checkers.h,
remove unused MSG_TUR_FAILED,
- patch 16: rename checker symbols to "libcheck_async_context_size" and "libcheck_async_init"
- Patch 17 (was 12): Try to set TAS bit in rdac checker (libcheck_async_init()); this requires moving it after patch 16
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/19 | libmpathutil: runner: reduce a message loglevellibmpathutil/ | +1 | 0 replies | |
| 2/19 | libmultipath: checkers: add two generic checker messageslibmultipath/ libmultipath/ | +4 | 0 replies | |
| 3/19 | libmultipath: checkers: move checker_class definition to checkers.hlibmultipath/ libmultipath/ | +19 | 0 replies | |
| 4/19 | libmpathutil: add implementation of generic shared pointerlibmpathutil/ libmpathutil/ libmpathutil/ | +53 | 4 replies | |
| 5/19 | multipath-tools tests: add tests for shared pointer codetests/ tests/ | +123 | 0 replies | |
| 6/19 | libmultipath: remove libcheck_thread related codelibmultipath/ libmultipath/ libmultipath/ | +2 | 0 replies | |
| 7/19 | libmultipath: use shared_ptr for checker classeslibmultipath/ libmultipath/ | +19 | 0 replies | |
| 8/19 | libmultipath: use shared_ptr for prioritizerslibmultipath/ libmultipath/ | +20 | 0 replies | |
| 9/19 | libmpathutil: runner: use shared_ptrlibmpathutil/ | +9 | 5 replies | |
| 10/19 | libmultipath: add generic async path checker codelibmultipath/ libmultipath/ libmultipath/ +2 more | +253 | 0 replies | |
| 11/19 | libmultipath: checkers: add support for async checkerlibmultipath/ libmultipath/ | +36 | 0 replies | |
| 12/19 | libmultipath: convert TUR checker to an async checker instancelibmultipath/ libmultipath/ | +15 | 0 replies | |
| 13/19 | libmultipath: convert cciss_tur checker to async checkerlibmultipath/ | +10 | 0 replies | |
| 14/19 | libmultipath: convert readsector0 checker to async checkerlibmultipath/ | +7 | 0 replies | |
| 15/19 | libmultipath: convert hp_sw checker to async checkerlibmultipath/ | +8 | 0 replies | |
| 16/19 | libmultipath: async_checker: add context_size and init symbolslibmultipath/ | +29 | 0 replies | |
| 17/19 | libmultipath: convert RDAC checker to async checkerlibmultipath/ | +14 | 0 replies | |
| 18/19 | libmultipath: checkers: rework mpcontext passinglibmultipath/ libmultipath/ libmultipath/ +8 more | +100 | 0 replies | |
| 19/19 | libmultipath: convert emc_clariion to async_checkerlibmultipath/ | +33 | 0 replies |
Reviews trailers per patch
11 of 19 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Benjamin Marzinski |
|---|---|
| Series | R-b |
| 1/19 | R-b |
| 2/19 | R-b |
| 3/19 | R-b |
| 4/19 | R-b |
| 5/19 | |
| 6/19 | |
| 7/19 | |
| 8/19 | R-b |
| 9/19 | R-b |
| 10/19 | |
| 11/19 | R-b |
| 12/19 | |
| 13/19 | R-b |
| 14/19 | R-b |
| 15/19 | R-b |
| 16/19 | |
| 17/19 | |
| 18/19 | R-b |
| 19/19 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 00/19] multipath-tools: asynchronous checker framework
Based on my previous patch set [1], which introduced the "runner" thread handling code as an abstract implementation of the asynchronous checker logic in the TUR checker, this set introduces a generic "async_checker" type and converts all existing checkers except directio to this framework. With this set applied, all checkers run asyncrhonously unless explicitly forbidden to do so with the "force_sync" option.
Patch 1-3 are minor preparations. Patch 4-8 introduce a general concept of a refcounted "shared" pointer and use it to replace multiple instances of hard-coded refcounts on objects. Patch 9 converts the current TUR code into a generic asynchronous checker type by separating the actual TUR code from the handling of the async runners. Patch 10 adds support for this async checker type in the checkers code by searching for "libcheck_async_func" with dlsym() in checker DSOs. Patch 11-15 convert all checkers except emc_clariion to the async_checker framework. emc_clariion is special because it needs extra context both for the checker itself and for multipath-related information. Patch 16 and 17 add the respective additional fields to the async_checker framework. The mpcontext handling is rewritten, because the current apporach of handling void ** pointers would be disastrous in scenarious with truly asynchronous checker threads that may hang forever. Patch 18 finally converts emc_clariion, using the concepts from patch 16 and 17.
Comments and reviews welcome.
Regards,
Martin
[1] https://lore.kernel.org/dm-devel/[email protected]/T/#m9369993a81c82b10ef42896505d4a354b6be3f79
Changes v1 -> v2 (suggestions by Ben Marzinski)
- Patch 05: rework the shared_ptr test
- Patch 06: new, separate patch for removing libcheck_tread code; remove libcheck_thread and start_checker_thread() from checkers.h Following patches are renumbered
- Patch 10 (was 09): add alignment for checker_ctx field in struct runner_data remove the unused chkr field from struct async_checker_context
- Patch 12: remove struct checker_context from checkers.h,
remove unused MSG_TUR_FAILED,
- patch 16: rename checker symbols to "libcheck_async_context_size" and "libcheck_async_init"
- Patch 17 (was 12): Try to set TAS bit in rdac checker (libcheck_async_init()); this requires moving it after patch 16
Martin Wilck (19):
libmpathutil: runner: reduce a message loglevel
libmultipath: checkers: add two generic checker messages
libmultipath: checkers: move checker_class definition to checkers.h
libmpathutil: add implementation of generic shared pointer multipath-tools tests: add tests for shared pointer code
libmultipath: remove libcheck_thread related code
libmultipath: use shared_ptr for checker classes
libmultipath: use shared_ptr for prioritizers
libmpathutil: runner: use shared_ptr
libmultipath: add generic async path checker code
libmultipath: checkers: add support for async checker
libmultipath: convert TUR checker to an async checker instance
libmultipath: convert cciss_tur checker to async checker
libmultipath: convert readsector0 checker to async checker
libmultipath: convert hp_sw checker to async checker
libmultipath: async_checker: add context_size and init symbols
libmultipath: convert RDAC checker to async checker
libmultipath: checkers: rework mpcontext passing
libmultipath: convert emc_clariion to async_checker
libmpathutil/libmpathutil.version | 7 + libmpathutil/runner.c | 32 ++-- libmpathutil/util.c | 45 ++++- libmpathutil/util.h | 5 + libmultipath/Makefile | 2 +- libmultipath/async_checker.c | 249 ++++++++++++++++++++++++++ libmultipath/async_checker.h | 36 ++++ libmultipath/checkers.c | 236 +++++++++---------------- libmultipath/checkers.h | 79 +++++---- libmultipath/checkers/cciss_tur.c | 41 ++--- libmultipath/checkers/directio.c | 6 +- libmultipath/checkers/emc_clariion.c | 104 +++++------ libmultipath/checkers/hp_sw.c | 32 +--- libmultipath/checkers/rdac.c | 38 ++-- libmultipath/checkers/readsector0.c | 28 +-- libmultipath/checkers/tur.c | 253 ++------------------------- libmultipath/discovery.c | 8 +- libmultipath/libmultipath.version | 3 +- libmultipath/prio.c | 47 +++-- libmultipath/prio.h | 1 - libmultipath/structs.c | 3 +- libmultipath/structs.h | 3 +- tests/Makefile | 4 +- tests/directio.c | 2 +- tests/shared_ptr.c | 120 +++++++++++++ 25 files changed, 728 insertions(+), 656 deletions(-) create mode 100644 libmultipath/async_checker.c create mode 100644 libmultipath/async_checker.h create mode 100644 tests/shared_ptr.c
Signature · 1 line
2.54.0