[dm-devel] [PATCH v2 13/23] libmultipath: print: convert API to generic data type
Hannes Reinecke
hare at suse.de
Tue Mar 6 07:11:29 UTC 2018
On 03/06/2018 12:14 AM, Martin Wilck wrote:
> Convert higher level API (snprint_multipath_topology() etc) to
> using the generic multipath API. This will allow "foreign"
> multipath objects that implement the generic API to be printed
> exactly like native multipathd objects.
>
> The previous API (using "struct multipath*" and "struct path" remains
> in place through macros mapping to the new functions. By doing this
> and testing in regular setups, it's easily verified that the new
> API works and produces the same results.
>
> Moreover, abstract out the code to determine the output format from multipath
> properties into snprint_multipath_style(), to be able to use it as generic
> ->style() method.
>
> Signed-off-by: Martin Wilck <mwilck at suse.com>
> ---
> libmultipath/configure.c | 1 +
> libmultipath/dm-generic.c | 2 +-
> libmultipath/print.c | 115 +++++++++++++++++++++++++++++-----------------
> libmultipath/print.h | 24 +++++++---
> multipath/main.c | 1 +
> multipathd/cli_handlers.c | 1 +
> 6 files changed, 95 insertions(+), 49 deletions(-)
>
Reviewed-by: Hannes Reinecke <hare at suse.com>
Cheers,
Hannes
--
Dr. Hannes Reinecke Teamlead Storage & Networking
hare at suse.de +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
More information about the dm-devel
mailing list