Skip to content

multipath-tools: improvements for pretty-printing code

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

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest13 patches 1 replyIn review
  2. v111 patches 0 repliesSuperseded

Changes in v2 from the cover letter

- 10/13: fix a compilation error with clang because of duplicate typedef for fieldwidth_t
- whitespace fixes
- 12/13: new, fix a compile error with clang-13
- 13/13: new, fix an asan error reported by Lixiaokeng

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/13libmultipath: make multipath_data etc. staticlibmultipath/print.c+3 -30 replies
2/13libmultipath: move path_data etc. to print.clibmultipath/print.c libmultipath/print.h+21 -210 replies
3/13libmultipath: make pd_lookup() etc. return an indexlibmultipath/print.c+38 -260 replies
4/13libmultipath: use ARRAY_SIZE for iterating over wildcard arrayslibmultipath/print.c+17 -190 replies
5/13libmultipath: drop padding code in _snprint_pathgroup()libmultipath/print.c+0 -90 replies
6/13libmultipath: snprint_foreign_topology(): split out lockless variantlibmultipath/foreign.c+16 -90 replies
7/13multipathd: drop unnecessary path layout callsmultipathd/cli_handlers.c+0 -50 replies
8/13libmultipath: add a cleanup function for unsigned char *libmultipath/util.c libmultipath/util.h+6 -00 replies
9/13libmultipath: make sprint_path_marginal() staticlibmultipath/print.c+1 -10 replies
10/13libmultipath: introduce width argument for pretty-printing functionslibmultipath/foreign.c libmultipath/foreign.h libmultipath/generic.h +5 more+218 -1140 replies
11/13libmultipath: change wildcard handler tables to static constlibmultipath/print.c+58 -610 replies
12/13libmultipath: fix compilation error with clang 13libmultipath/prioritizers/weightedpath.c+2 -10 replies
13/13libmultipath: remove_map(): make sure orphaned paths aren't referencedlibmultipath/structs_vec.c+4 -00 replies

Reviews trailers per patch

None of the 13 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchLixiaokengBenjamin Marzinski
SeriesR-b
1/13
2/13
3/13
4/13
5/13
6/13
7/13
8/13
9/13
10/13
11/13
12/13
13/13T-b

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

Read the v2 thread

Cover letter [dm-devel] [PATCH v2 00/13] multipath-tools: improvements for pretty-printing code

From: Martin Wilck <[email protected]>

Hi Christophe, hi Ben,

this series attempts to improve the robustness of the code by making the lookup tables used for pretty printing and wildcard handling static const arrays. This requires getting rid of the variable "width" field in these arrays. I could have simply split of "width" into a separate global array variable, but as the field width are designed to change depending on the data being printed, it makes more sense to use local variables for it and pass them to the actual table-formatting code.

A couple of minor cleanups are done along the way.

Changes in v2:

- 10/13: fix a compilation error with clang because of duplicate typedef for fieldwidth_t
- whitespace fixes
- 12/13: new, fix a compile error with clang-13
- 13/13: new, fix an asan error reported by Lixiaokeng

As always, feedback welcome
Martin

Martin Wilck (13):
libmultipath: make multipath_data etc. static
libmultipath: move path_data etc. to print.c
libmultipath: make pd_lookup() etc. return an index
libmultipath: use ARRAY_SIZE for iterating over wildcard arrays
libmultipath: drop padding code in _snprint_pathgroup()
libmultipath: snprint_foreign_topology(): split out lockless variant
multipathd: drop unnecessary path layout calls
libmultipath: add a cleanup function for unsigned char *
libmultipath: make sprint_path_marginal() static
libmultipath: introduce width argument for pretty-printing functions
libmultipath: change wildcard handler tables to static const
libmultipath: fix compilation error with clang 13
libmultipath: remove_map(): make sure orphaned paths aren't referenced

 libmultipath/foreign.c                   |  74 +++--
 libmultipath/foreign.h                   |  23 +-
 libmultipath/generic.h                   |   8 +
 libmultipath/libmultipath.version        |   5 +-
 libmultipath/print.c                     | 356 +++++++++++++----------
 libmultipath/print.h                     |  58 ++--
 libmultipath/prioritizers/weightedpath.c |   3 +-
 libmultipath/structs_vec.c               |   4 +
 libmultipath/util.c                      |   5 +
 libmultipath/util.h                      |   1 +
 multipath/main.c                         |   7 +-
 multipathd/cli_handlers.c                |  75 +++--
 12 files changed, 367 insertions(+), 252 deletions(-)
Signature · 7 lines
2.33.1


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