On 03/06/2018 12:14 AM, Martin Wilck wrote: > Add an API for "foreign" multipaths. Foreign libraries are loaded > from ${multipath_dir}/libforeign-*.so, as we do for checkers. > > Refer to "foreign.h" for details about the API itself. Like we do for > checkers, high-level multipath code isn't supposed to call the API directly, > but rather the wrapper functions declared in "foreign.h". > > This API is used only for displaying information and for logging. An extension to > other functionality (such as monitoring or administration) might be feasible, > but is not planned. > > Foreign libraries communicate with libmultipath through the API defined in > "foreign.h". The foreign library can implement multipath maps, pathgroups, > and paths as it likes, they just need to provide the simple interfaces > defined in "generic.h" to libmultipath. These interfaces are used in libmultipath's > "print" implementation to convey various bits of information to users. By > using the same interfaces for printing that libmultipath uses internally, > foreign library implementations can focus on the technical side without > worrying about output formatting compatibility. > > Signed-off-by: Martin Wilck <mwilck@xxxxxxxx> > --- > libmultipath/Makefile | 2 +- > libmultipath/foreign.c | 602 +++++++++++++++++++++++++++++++++++++++++++++++++ > libmultipath/foreign.h | 322 ++++++++++++++++++++++++++ > 3 files changed, 925 insertions(+), 1 deletion(-) > create mode 100644 libmultipath/foreign.c > create mode 100644 libmultipath/foreign.h > Reviewed-by: Hannes Reinecke <hare@xxxxxxxx> Cheers, Hannes -- Dr. Hannes Reinecke Teamlead Storage & Networking hare@xxxxxxx +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) -- dm-devel mailing list dm-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/dm-devel