multipath-tools: Introducing multipath C API
authorGris Ge <fge@redhat.com>
Fri, 24 Feb 2017 12:50:26 +0000 (20:50 +0800)
committerChristophe Varoqui <christophe.varoqui@opensvc.com>
Mon, 27 Feb 2017 05:55:33 +0000 (06:55 +0100)
commit4335abb36f33f12eadc943729901fac31f3dc012
treeb12c508d207eb67dcda32d381304e87ce1d6d5bb
parent5ea3e33368193b24e3b4c5b3ba8076fed27b4cb9
multipath-tools: Introducing multipath C API

Features:

 * Use mpath_cmd.h for IPC connection and use output of 'show maps json'.
 * Library user guide will be 'man 3 libdmmp.h'.
 * Every public function has its own manpage in section 3 which is
   generated by linux 'kernel-doc' tool.

Usage:

    make -j5
    sudo make install \
            bindir=/usr/sbin/ \
            syslibdir=/usr/lib64/ \
            libdir=/usr/lib64/multipath \
            rcdir=/etc/rc.d/init.d \
            unitdir=/usr/lib/systemd/system \
            includedir=/usr/include
    make -C libdmmp check
    make -C libdmmp speed_test

    man libdmmp.h
    man dmmp_mpath_array_get
    man <dmmp function name>

Performance:

 * 10k scsi_debug sdX with 2 disks per mpath (i7-6820HQ 16GiB RAM):
   $ make -C libdmmp speed_test
   Got 5000 mpath
   real 3.22
   user 0.15
   sys 0.01

Misc:
 * Developer note is libdmmp/DEV_NOTES.

Changes since V4:

 * Add new function dmmp_mpath_kdev_name_get() to query the '/dev/dm-01' for
   mpath.
 * Updated manpages.
 * Rebased to current master ea4367159d32444e48a409a4f1c4f18324b737a9.

Signed-off-by: Gris Ge <fge@redhat.com>
20 files changed:
.gitignore
Makefile
Makefile.inc
libdmmp/DEV_NOTES [new file with mode: 0644]
libdmmp/Makefile [new file with mode: 0644]
libdmmp/docs/doc-preclean.pl [new file with mode: 0644]
libdmmp/docs/kernel-doc [new file with mode: 0644]
libdmmp/docs/libdmmp.h.3 [new file with mode: 0644]
libdmmp/docs/split-man.pl [new file with mode: 0644]
libdmmp/libdmmp.c [new file with mode: 0644]
libdmmp/libdmmp.pc.in [new file with mode: 0644]
libdmmp/libdmmp/libdmmp.h [new file with mode: 0644]
libdmmp/libdmmp_misc.c [new file with mode: 0644]
libdmmp/libdmmp_mp.c [new file with mode: 0644]
libdmmp/libdmmp_path.c [new file with mode: 0644]
libdmmp/libdmmp_pg.c [new file with mode: 0644]
libdmmp/libdmmp_private.h [new file with mode: 0644]
libdmmp/test/Makefile [new file with mode: 0644]
libdmmp/test/libdmmp_speed_test.c [new file with mode: 0644]
libdmmp/test/libdmmp_test.c [new file with mode: 0644]