Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multipath plugin #40

Closed
wants to merge 4 commits into from
Closed

Conversation

cathay4t
Copy link
Contributor

Do not commit yet, please wait dm-devl accept the changes about C API of multipath.

  • Use libdmmp.h to extend these existing interfaces:
org.storaged.Storaged.Drive
        |
        |
        v
org.storaged.Storaged.Multipath

org.storaged.Storaged.Block  (/dev/dm-2 or /dev/sdb)
        ^
        |
        v
org.storaged.Storaged.Multipath

org.storaged.Storaged.Block (/dev/sdb)
        ^
        |
        v
org.storaged.Storaged.Multipath.PathGroup.Path
  • How to install:
./autogen.sh  \
    --libdir=/usr/lib64 --prefix=/usr  --sysconfdir /etc
    --disable-lvm2 --disable-dummy --disable-iscsi \
    --enable-multipath
make -j5
sudo make install
sudo /usr/libexec/storaged/storaged --force-load-modules

 * On old gcc which is not using c99 as default, will got compile error:

    storagedlinuxdriveobject.c: In function 'storaged_linux_drive_object_get_device':
    storagedlinuxdriveobject.c:427:3: error: 'for' loop initial declarations are only allowed in C99 mode
       for (GList *devices = object->devices; devices; devices = devices->next)
       ^
    storagedlinuxdriveobject.c:427:3: note: use option -std=c99 or -std=gnu99 to compile your code

 * Fixed by initialize before use.

Signed-off-by: Gris Ge <fge@redhat.com>
Issue:
    The object path of org.storaged.Storaged.Drive for all multipath device
    is incorrect set as:
        /org/storaged/Storaged/drives/drive_1

Root cause:
    src/storagedlinuxdriveobject.c
        1. storaged_linux_drive_object_should_include_device() return TRUE
           on multipath device.
        2. storaged_linux_drive_object_constructed() failed to retrieve
           <VENDOR>_<MODEL>_<SERIAL> from mpath device-mapper udev device.
        3. storaged_linux_drive_update() failed to set vendor, model and etc
           property as `device->udev_device` does not has those property for dm
           multipath device.

Fix:
    * Move static method `is_dm_multipath()` to public:
        storaged_linux_device_is_multipath ()
    * New public method:
        storaged_linux_device_get_udev ()
                When provided StoragedLinuxDevice is a multipath device-mapper
                device, return its first slave device's GUdevDevice.
    * Fix storaged_linux_drive_update() to use udev device retrieved from
      storaged_linux_device_get_udev() instead of 'device->udev_device'.

Signed-off-by: Gris Ge <fge@redhat.com>
 * The return of g_dbus_object_get_interface() should be freed.

Signed-off-by: Gris Ge <fge@redhat.com>
@cathay4t cathay4t force-pushed the multipath branch 3 times, most recently from 69e0d7b to 4862950 Compare January 19, 2016 11:10
cathay4t added a commit to cathay4t/multipath-tools that referenced this pull request Jan 19, 2016
DONE:
 * Compile and test pass.
 * Documentation.

TODO:
 * Review code and add more debug messages.

==== real commit message goes below ===

Features:

 * Zero changes to existing codes.
 * Using existing libmultipath codes.
 * Auto generated manpage for every public function.

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

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

User case:

    Storaged multipath plugin:
        storaged-project/udisks#40

FAQ:

 1. Why not use better approach like wrapping multipathd IPC output?

    That often means a lot changes to existing code which might be
    rejected.
    I would like to create a stable set of API, while its internal
    implementation could be changed without breaking binary
    compatibility.

 2. Why not build on existing libmultipath internal library?

    The libmultipath has too many public symbols which seems a bad
    design of public library. Yes, we still expose some internal symbols
    via libdmmp currently, that's because we are depending on
    libmultipath right now, to fix that we need to change libmultipath
    which I intend to avoid at this initial path set.

 3. Any code style and rules?

    Following Linux kernel code style and libabc guideline.
    Other rules are recorded in 'libdmmp/DEV_NOTES'

 4. Can the library be licensed as LGPL?

    Nope. LGPL library cannot link to any GPL code, while libmultipath
    is GPL. You could create some D-BUS API use libdmmp if license
    concerns. We might able to license libdmmp to LGPL when some day we
    change our implementation to wrap multipathd IPC output.

 5. Why not expose all properties out?

    Let's do this step by step. This commit only contains minimum API
    set required to create the initial storaged multipath plugin.

Signed-off-by: Gris Ge <cnfourt@gmail.com>
cathay4t added a commit to cathay4t/multipath-tools that referenced this pull request Jan 19, 2016
DONE:
 * Compile and test pass.
 * Documentation.

TODO:
 * Review code and add more debug messages.

==== real commit message goes below ===

Features:

 * Zero changes to existing codes.
 * Using existing libmultipath codes.
 * Auto generated manpage for every public function.

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 libdmmp_check

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

User case:

    Storaged multipath plugin:
        storaged-project/udisks#40

FAQ:

 1. Why not use better approach like wrapping multipathd IPC output?

    That often means a lot changes to existing code which might be
    rejected.
    I would like to create a stable set of API, while its internal
    implementation could be changed without breaking binary
    compatibility.

 2. Why not build on existing libmultipath internal library?

    The libmultipath has too many public symbols which seems a bad
    design of public library. Yes, we still expose some internal symbols
    via libdmmp currently, that's because we are depending on
    libmultipath right now, to fix that we need to change libmultipath
    which I intend to avoid at this initial path set.

 3. Any code style and rules?

    Following Linux kernel code style and libabc guideline.
    Other rules are recorded in 'libdmmp/DEV_NOTES'

 4. Can the library be licensed as LGPL?

    Nope. LGPL library cannot link to any GPL code, while libmultipath
    is GPL. You could create some D-BUS API use libdmmp if license
    concerns. We might able to license libdmmp to LGPL when some day we
    change our implementation to wrap multipathd IPC output.

 5. Why not expose all properties out?

    Let's do this step by step. This commit only contains minimum API
    set required to create the initial storaged multipath plugin.

Signed-off-by: Gris Ge <cnfourt@gmail.com>
cathay4t added a commit to cathay4t/multipath-tools that referenced this pull request Jan 19, 2016
Features:

 * Zero changes to existing codes.
 * Using existing libmultipath codes.
 * Auto generated manpage for every public function.

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 libdmmp_check

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

User case:

    Storaged multipath plugin:
        storaged-project/udisks#40

FAQ:

 1. Why not use better approach like wrapping multipathd IPC output?

    That often means a lot changes to existing code which might be
    rejected.
    I would like to create a stable set of API, while its internal
    implementation could be changed without breaking binary
    compatibility.

 2. Why not build on existing libmultipath internal library?

    The libmultipath has too many public symbols which seems a bad
    design of public library. Yes, we still expose some internal symbols
    via libdmmp currently, that's because we are depending on
    libmultipath right now, to fix that we need to change libmultipath
    which I intend to avoid at this initial path set.

 3. Any code style and rules?

    Following Linux kernel code style and libabc guideline.
    Other rules are recorded in 'libdmmp/DEV_NOTES'

 4. Can the library be licensed as LGPL?

    Nope. LGPL library cannot link to any GPL code, while libmultipath
    is GPL. You could create some D-BUS API use libdmmp if license
    concerns. We might able to license libdmmp to LGPL when some day we
    change our implementation to wrap multipathd IPC output.

 5. Why not expose all properties out?

    Let's do this step by step. This commit only contains minimum API
    set required to create the initial storaged multipath plugin.

Signed-off-by: Gris Ge <cnfourt@gmail.com>
cathay4t added a commit to cathay4t/multipath-tools that referenced this pull request Jan 19, 2016
Features:

 * Zero changes to existing codes.
 * Utilizing existing libmultipath codes.
 * Library user guide is in 'man 3 libdmmp.h'.
 * Every public function has its own manpage in section 3.

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 libdmmp_check

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

User case:

    Storaged multipath plugin:
        storaged-project/udisks#40

FAQ:

 1. Why not use better approach like wrapping multipathd IPC output?

    That often means a lot changes to existing code which might be
    rejected.
    I would like to create a stable set of API, while its internal
    implementation could be changed without breaking binary
    compatibility.

 2. Why not build on existing libmultipath internal library?

    The libmultipath has too many public symbols which seems a bad
    design of public library. Yes, we still expose some internal symbols
    via libdmmp currently, that's because we are depending on
    libmultipath right now, to fix that we need to change libmultipath
    which I intend to avoid at this initial path set.

 3. Any code style and rules?

    Following Linux kernel code style and libabc guideline.
    Other rules are recorded in 'libdmmp/DEV_NOTES'

 4. Can the library be licensed as LGPL?

    Nope. LGPL library cannot link to any GPL code, while libmultipath
    is GPL. You could create some D-BUS API use libdmmp if license
    concerns. We might able to license libdmmp to LGPL when some day we
    change our implementation to wrap multipathd IPC output.

 5. Why not expose all properties out?

    Let's do this step by step. This commit only contains minimum API
    set required to create the initial storaged multipath plugin.

Signed-off-by: Gris Ge <cnfourt@gmail.com>
 * Use libdmmp.h[1] to extend these existing interfaces:
    org.storaged.Storaged.Drive
            |
            |
            v
    org.storaged.Storaged.Multipath

    org.storaged.Storaged.Block  (/dev/dm-2 or /dev/sdb)
            ^
            |
            v
    org.storaged.Storaged.Multipath

    org.storaged.Storaged.Block (/dev/sdb)
            ^
            |
            v
    org.storaged.Storaged.Multipath.PathGroup.Path

 * How to install:
    ./autogen.sh  \
        --libdir=/usr/lib64 --prefix=/usr  --sysconfdir /etc
        --disable-lvm2 --disable-dummy --disable-iscsi \
        --enable-multipath
    make -j5
    sudo make install
    sudo /usr/libexec/storaged/storaged --force-load-modules

[1]: Also in demo state:
    https://github.com/cathay4t/multipath-tools/tree/c_api

Signed-off-by: Gris Ge <fge@redhat.com>
cathay4t added a commit to cathay4t/multipath-tools that referenced this pull request Jan 21, 2016
Features:

 * Zero changes to existing codes.
 * Utilizing existing libmultipath codes.
 * Library user guide is in 'man 3 libdmmp.h'.
 * Every public function has its own manpage in section 3.

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 libdmmp_check

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

User case:

    Storaged multipath plugin:
        storaged-project/udisks#40

FAQ:

 1. Why not use better approach like wrapping multipathd IPC output?

    That often means a lot changes to existing code which might be
    rejected.
    I would like to create a stable set of API, while its internal
    implementation could be changed without breaking binary
    compatibility.

 2. Why not build on existing libmultipath internal library?

    The libmultipath has too many public symbols which seems a bad
    design of public library. Yes, we still expose some internal symbols
    via libdmmp currently, that's because we are depending on
    libmultipath right now, to fix that we need to change libmultipath
    which I intend to avoid at this initial path set.

 3. Any code style and rules?

    Following Linux kernel code style and libabc guideline.
    Other rules are recorded in 'libdmmp/DEV_NOTES'

 4. Can the library be licensed as LGPL?

    Nope. LGPL library cannot link to any GPL code, while libmultipath
    is GPL. You could create some D-BUS API use libdmmp if license
    concerns. We might able to license libdmmp to LGPL when some day we
    change our implementation to wrap multipathd IPC output.

 5. Why not expose all properties out?

    Let's do this step by step. This commit only contains minimum API
    set required to create the initial storaged multipath plugin.

Signed-off-by: Gris Ge <cnfourt@gmail.com>
cathay4t added a commit to cathay4t/multipath-tools that referenced this pull request Feb 4, 2016
Features:

 * Use multipathd IPC command 'show xxx raw format <fmt>'
 * Library user guide is in 'man 3 libdmmp.h'.
 * Every public function has its own manpage in section 3
   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 libdmmp_check

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

User case:

    Storaged multipath plugin:
        storaged-project/udisks#40

FAQ:

 1. Why not build on existing libmultipath internal library?

    The libmultipath has too many public symbols which seems a bad
    design for public library.

 2. Any developer notes?

    Following Linux kernel code style and libabc guideline.
    Others are recorded in 'libdmmp/DEV_NOTES'

 3. Can the library be licensed as LGPL?

    Nope. I used some socket codes from libmultipath which is GPL.
    You could create some D-BUS API use libdmmp if license concerns. We
    might able to license libdmmp to LGPL when some day we change our
    implementation.

Signed-off-by: Gris Ge <fge@redhat.com>
cathay4t added a commit to cathay4t/multipath-tools that referenced this pull request Feb 5, 2016
TODO:
 * Working on Performance issue. Compile will fail.

Features:

 * Use multipathd IPC command 'show xxx raw format <fmt>'
 * Library user guide is in 'man 3 libdmmp.h'.
 * Every public function has its own manpage in section 3
   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 libdmmp_check

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

User case:

    Storaged multipath plugin:
        storaged-project/udisks#40

FAQ:

 1. Why not build on existing libmultipath internal library?

    The libmultipath has too many public symbols which seems a bad
    design for public library.

 2. Any developer notes?

    Following Linux kernel code style and libabc guideline.
    Others are recorded in 'libdmmp/DEV_NOTES'

 3. Can the library be licensed as LGPL?

    Nope. I used some socket codes from libmultipath which is GPL.
    You could create some D-BUS API use libdmmp if license concerns. We
    might able to license libdmmp to LGPL when some day we change our
    implementation.

Signed-off-by: Gris Ge <fge@redhat.com>
cathay4t added a commit to cathay4t/multipath-tools that referenced this pull request Feb 5, 2016
TODO:
 * Working on Performance issue. Compile will fail.

Features:

 * Use multipathd IPC command 'show xxx raw format <fmt>'
 * Library user guide is in 'man 3 libdmmp.h'.
 * Every public function has its own manpage in section 3
   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 libdmmp_check

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

User case:

    Storaged multipath plugin:
        storaged-project/udisks#40

FAQ:

 1. Why not build on existing libmultipath internal library?

    The libmultipath has too many public symbols which seems a bad
    design for public library.

 2. Any developer notes?

    Following Linux kernel code style and libabc guideline.
    Others are recorded in 'libdmmp/DEV_NOTES'

 3. Can the library be licensed as LGPL?

    Nope. I used some socket codes from libmultipath which is GPL.
    You could create some D-BUS API use libdmmp if license concerns. We
    might able to license libdmmp to LGPL when some day we change our
    implementation.

Signed-off-by: Gris Ge <fge@redhat.com>
cathay4t added a commit to cathay4t/multipath-tools that referenced this pull request Feb 5, 2016
TODO:
 * Working on Performance issue. Compile will fail.

Features:

 * Use multipathd IPC command 'show xxx raw format <fmt>'
 * Library user guide is in 'man 3 libdmmp.h'.
 * Every public function has its own manpage in section 3
   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 libdmmp_check

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

User case:

    Storaged multipath plugin:
        storaged-project/udisks#40

FAQ:

 1. Why not build on existing libmultipath internal library?

    The libmultipath has too many public symbols which seems a bad
    design for public library.

 2. Any developer notes?

    Following Linux kernel code style and libabc guideline.
    Others are recorded in 'libdmmp/DEV_NOTES'

 3. Can the library be licensed as LGPL?

    Nope. I used some socket codes from libmultipath which is GPL.
    You could create some D-BUS API use libdmmp if license concerns. We
    might able to license libdmmp to LGPL when some day we change our
    implementation.

Signed-off-by: Gris Ge <fge@redhat.com>
cathay4t added a commit to cathay4t/multipath-tools that referenced this pull request Feb 5, 2016
Features:

 * Use multipathd IPC command 'show xxx raw format <fmt>'
 * Library user guide is in 'man 3 libdmmp.h'.
 * Every public function has its own manpage in section 3
   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 libdmmp_check

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

Performance:

  * 4k scsi_debug sdX with 2 disks per mpath (i7-3520M 4GiB RAM RHEL 7.2):
        $ make -C libdmmp speed_test
        Got 2000 mpath
        real 0.20
        user 0.03
        sys 0.01
  * 10k scsi_debug sdX with 2 disks per mpath (E5-2697 32GiB RAM RHEL 7.2):
        $ make -C libdmmp speed_test
        Got 5000 mpath
        real 1.51
        user 0.45
        sys 0.00

User case:

    Storaged multipath plugin:
        storaged-project/udisks#40

FAQ:

 1. Why not build on existing libmultipath internal library?

    The libmultipath has too many public symbols which seems a bad
    design for public library.

 2. Any developer notes?

    Following Linux kernel code style and libabc guideline.
    Others are recorded in 'libdmmp/DEV_NOTES'

 3. Can the library be licensed as LGPL?

    Nope. I used some socket codes from libmultipath which is GPL.
    You could create some D-BUS API use libdmmp if license concerns. We
    might able to license libdmmp to LGPL when some day we change our
    implementation.

Signed-off-by: Gris Ge <fge@redhat.com>
cathay4t added a commit to cathay4t/multipath-tools that referenced this pull request Feb 5, 2016
Features:

 * Use multipathd IPC command 'show xxx raw format <fmt>'
 * Library user guide is in 'man 3 libdmmp.h'.
 * Every public function has its own manpage in section 3
   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 libdmmp_check

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

Performance:

  * 4k scsi_debug sdX with 2 disks per mpath (i7-3520M 4GiB RAM RHEL 7.2):
        $ make -C libdmmp speed_test
        Got 2000 mpath
        real 0.20
        user 0.03
        sys 0.01
  * 10k scsi_debug sdX with 2 disks per mpath (E5-2697 32GiB RAM RHEL 7.2):
        $ make -C libdmmp speed_test
        Got 5000 mpath
        real 1.51
        user 0.45
        sys 0.00

User case:

    Storaged multipath plugin:
        storaged-project/udisks#40

FAQ:

 1. Why not build on existing libmultipath internal library?

    The libmultipath has too many public symbols which seems a bad
    design for public library.

 2. Any developer notes?

    Following Linux kernel code style and libabc guideline.
    Others are recorded in 'libdmmp/DEV_NOTES'

 3. Can the library be licensed as LGPL?

    Nope. I used some socket codes from libmultipath which is GPL.
    You could create some D-BUS API use libdmmp if license concerns. We
    might able to license libdmmp to LGPL when some day we change our
    implementation.

Signed-off-by: Gris Ge <fge@redhat.com>
cathay4t added a commit to cathay4t/multipath-tools that referenced this pull request Feb 5, 2016
Features:

 * Use multipathd IPC command 'show xxx raw format <fmt>'
 * Library user guide is in 'man 3 libdmmp.h'.
 * Every public function has its own manpage in section 3
   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

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

Performance:

  * 4k scsi_debug sdX with 2 disks per mpath (i7-3520M 4GiB RAM RHEL 7.2):
        $ make -C libdmmp speed_test
        Got 2000 mpath
        real 0.20
        user 0.03
        sys 0.01
  * 10k scsi_debug sdX with 2 disks per mpath (E5-2697 32GiB RAM RHEL 7.2):
        $ make -C libdmmp speed_test
        Got 5000 mpath
        real 1.51
        user 0.45
        sys 0.00

User case:

    Storaged multipath plugin:
        storaged-project/udisks#40

FAQ:

 1. Why not build on existing libmultipath internal library?

    The libmultipath has too many public symbols which seems a bad
    design for public library.

 2. Any developer notes?

    Following Linux kernel code style and libabc guideline.
    Others are recorded in 'libdmmp/DEV_NOTES'

 3. Can the library be licensed as LGPL?

    Nope. I used some socket codes from libmultipath which is GPL.
    You could create some D-BUS API use libdmmp if license concerns. We
    might able to license libdmmp to LGPL when some day we change our
    implementation.

Signed-off-by: Gris Ge <fge@redhat.com>
cathay4t added a commit to cathay4t/multipath-tools that referenced this pull request Feb 5, 2016
Features:

 * Use multipathd IPC command 'show xxx raw format <fmt>'
 * Library user guide is in 'man 3 libdmmp.h'.
 * Every public function has its own manpage in section 3
   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

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

Performance:

  * 4k scsi_debug sdX with 2 disks per mpath (i7-3520M 4GiB RAM RHEL 7.2):
        $ make -C libdmmp speed_test
        Got 2000 mpath
        real 0.20
        user 0.03
        sys 0.01
  * 10k scsi_debug sdX with 2 disks per mpath (E5-2697 32GiB RAM RHEL 7.2):
        $ make -C libdmmp speed_test
        Got 5000 mpath
        real 1.51
        user 0.45
        sys 0.00

User case:

    Storaged multipath plugin:
        storaged-project/udisks#40

FAQ:

 1. Why not build on existing libmultipath internal library?

    The libmultipath has too many public symbols which seems a bad
    design for public library.

 2. Any developer notes?

    Following Linux kernel code style and libabc guideline.
    Others are recorded in 'libdmmp/DEV_NOTES'

 3. Can the library be licensed as LGPL?

    Nope. I used some socket codes from libmultipath which is GPL.
    You could create some D-BUS API use libdmmp if license concerns. We
    might able to license libdmmp to LGPL when some day we change our
    implementation.

Signed-off-by: Gris Ge <fge@redhat.com>
cathay4t added a commit to cathay4t/multipath-tools that referenced this pull request Feb 5, 2016
Features:

 * Use three multipathd IPC commands:
    * 'show maps raw format <fmt>'
    * 'show groups raw format <fmt>'
    * 'show paths raw format <fmt>'
    # We might have inconsistent data when something changes during these
    # commands. If so, DMMP_ERR_INCONSISTENT_DATA will be raised and
    # suggest user to try again.
 * Library user guide will be 'man 3 libdmmp.h'.
 * Every public function has its own manpage in section 3
   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

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

Performance:

  * 4k scsi_debug sdX with 2 disks per mpath (i7-3520M 4GiB RAM RHEL 7.2):
        $ make -C libdmmp speed_test
        Got 2000 mpath
        real 0.20
        user 0.03
        sys 0.01
  * 10k scsi_debug sdX with 2 disks per mpath (E5-2697 32GiB RAM RHEL 7.2):
        $ make -C libdmmp speed_test
        Got 5000 mpath
        real 1.51
        user 0.45
        sys 0.00

User case:

    Storaged multipath plugin:
        storaged-project/udisks#40

FAQ:

 1. Any developer notes?

    Following Linux kernel code style and libabc guideline.
    Others are recorded in 'libdmmp/DEV_NOTES'

 2. Can the library be licensed as LGPL?

    Nope. I copied some socket codes from libmultipath which is GPL.
    You could create some D-BUS API use libdmmp if license concerns.
    We might able to license libdmmp to LGPL after rewrite those functions.

Signed-off-by: Gris Ge <fge@redhat.com>
cathay4t added a commit to cathay4t/multipath-tools that referenced this pull request Feb 7, 2016
Features:

 * Use three multipathd IPC commands:
    * 'show maps raw format <fmt>'
    * 'show groups raw format <fmt>'
    * 'show paths raw format <fmt>'
    # We might have inconsistent data when something changes during these
    # commands. If so, DMMP_ERR_INCONSISTENT_DATA will be raised and
    # suggest user to try again.
 * Library user guide will be 'man 3 libdmmp.h'.
 * Every public function has its own manpage in section 3
   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

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

Performance:

  * 4k scsi_debug sdX with 2 disks per mpath (i7-3520M 4GiB RAM RHEL 7.2):
        $ make -C libdmmp speed_test
        Got 2000 mpath
        real 0.20
        user 0.03
        sys 0.01
  * 10k scsi_debug sdX with 2 disks per mpath (E5-2697 32GiB RAM RHEL 7.2):
        $ make -C libdmmp speed_test
        Got 5000 mpath
        real 1.51
        user 0.45
        sys 0.00

User case:

    Storaged multipath plugin:
        storaged-project/udisks#40

FAQ:

 1. Any developer notes?

    Following Linux kernel code style and libabc guideline.
    Others are recorded in 'libdmmp/DEV_NOTES'

 2. Can the library be licensed as LGPL?

    Nope. I copied some socket codes from libmultipath which is GPL.
    You could create some D-BUS API use libdmmp if license concerns.
    We might able to license libdmmp to LGPL after rewrite those functions.

Signed-off-by: Gris Ge <fge@redhat.com>
cathay4t added a commit to cathay4t/multipath-tools that referenced this pull request Feb 8, 2016
Features:

 * Use three multipathd IPC commands:
    * 'show maps raw format <fmt>'
    * 'show groups raw format <fmt>'
    * 'show paths raw format <fmt>'
    # We might have inconsistent data when something changes during these
    # commands. If so, DMMP_ERR_INCONSISTENT_DATA will be raised and
    # suggest user to try again.
 * Library user guide will be 'man 3 libdmmp.h'.
 * Every public function has its own manpage in section 3
   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

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

Performance:

  * 4k scsi_debug sdX with 2 disks per mpath (i7-3520M 4GiB RAM RHEL 7.2):
        $ make -C libdmmp speed_test
        Got 2000 mpath
        real 0.20
        user 0.03
        sys 0.01
  * 10k scsi_debug sdX with 2 disks per mpath (E5-2697 32GiB RAM RHEL 7.2):
        $ make -C libdmmp speed_test
        Got 5000 mpath
        real 1.51
        user 0.45
        sys 0.00

User case:

    Storaged multipath plugin:
        storaged-project/udisks#40

FAQ:

 1. Any developer notes?

    Following Linux kernel code style and libabc guideline.
    Others are recorded in 'libdmmp/DEV_NOTES'

 2. Can the library be licensed as LGPL?

    Nope. I copied some socket codes from libmultipath which is GPL.
    You could create some D-BUS API use libdmmp if license concerns.
    We might able to license libdmmp to LGPL after rewrite those functions.

Signed-off-by: Gris Ge <fge@redhat.com>
cathay4t added a commit to cathay4t/multipath-tools that referenced this pull request Feb 9, 2016
Features:

 * Use three multipathd IPC commands:
    * 'show maps raw format <fmt>'
    * 'show groups raw format <fmt>'
    * 'show paths raw format <fmt>'
    # We might have inconsistent data when something changes during these
    # commands. If so, DMMP_ERR_INCONSISTENT_DATA will be raised and
    # suggest user to try again.
 * Library user guide will be 'man 3 libdmmp.h'.
 * Every public function has its own manpage in section 3
   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

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

Performance:

  * 4k scsi_debug sdX with 2 disks per mpath (i7-3520M 4GiB RAM RHEL 7.2):
        $ make -C libdmmp speed_test
        Got 2000 mpath
        real 0.20
        user 0.03
        sys 0.01
  * 10k scsi_debug sdX with 2 disks per mpath (E5-2697 32GiB RAM RHEL 7.2):
        $ make -C libdmmp speed_test
        Got 5000 mpath
        real 1.51
        user 0.45
        sys 0.00

User case:

    Storaged multipath plugin:
        storaged-project/udisks#40

FAQ:

 1. Any developer notes?

    Following Linux kernel code style and libabc guideline.
    Others are recorded in 'libdmmp/DEV_NOTES'

 2. Can the library be licensed as LGPL?

    Nope. I copied some socket codes from libmultipath which is GPL.
    You could create some D-BUS API use libdmmp if license concerns.
    We might able to license libdmmp to LGPL after rewrite those functions.

Signed-off-by: Gris Ge <fge@redhat.com>
cathay4t added a commit to cathay4t/multipath-tools that referenced this pull request Feb 12, 2016
Features:

 * Use three multipathd IPC commands:
    * 'show maps raw format <fmt>'
    * 'show groups raw format <fmt>'
    * 'show paths raw format <fmt>'
    # We might have inconsistent data when something changes during these
    # commands. If so, DMMP_ERR_INCONSISTENT_DATA will be raised and
    # suggest user to try again.
 * Library user guide will be 'man 3 libdmmp.h'.
 * Every public function has its own manpage in section 3
   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

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

Performance:

  * 4k scsi_debug sdX with 2 disks per mpath (i7-3520M 4GiB RAM RHEL 7.2):
        $ make -C libdmmp speed_test
        Got 2000 mpath
        real 0.20
        user 0.03
        sys 0.01
  * 10k scsi_debug sdX with 2 disks per mpath (E5-2697 32GiB RAM RHEL 7.2):
        $ make -C libdmmp speed_test
        Got 5000 mpath
        real 1.51
        user 0.45
        sys 0.00

User case:

    Storaged multipath plugin:
        storaged-project/udisks#40

FAQ:

 1. Any developer notes?

    Following Linux kernel code style and libabc guideline.
    Others are recorded in 'libdmmp/DEV_NOTES'

 2. Can the library be licensed as LGPL?

    Nope. I copied some socket codes from libmultipath which is GPL.
    You could create some D-BUS API use libdmmp if license concerns.
    We might able to license libdmmp to LGPL after rewrite those functions.

Signed-off-by: Gris Ge <fge@redhat.com>
cathay4t added a commit to cathay4t/multipath-tools that referenced this pull request Feb 12, 2016
Features:

 * Use three multipathd IPC commands:
    * 'show maps raw format <fmt>'
    * 'show groups raw format <fmt>'
    * 'show paths raw format <fmt>'
    # We might have inconsistent data when something changes during these
    # commands. If so, DMMP_ERR_INCONSISTENT_DATA will be raised and
    # suggest user to try again.
 * Library user guide will be 'man 3 libdmmp.h'.
 * Every public function has its own manpage in section 3
   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

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

Performance:

  * 4k scsi_debug sdX with 2 disks per mpath (i7-3520M 4GiB RAM RHEL 7.2):
        $ make -C libdmmp speed_test
        Got 2000 mpath
        real 0.20
        user 0.03
        sys 0.01
  * 10k scsi_debug sdX with 2 disks per mpath (E5-2697 32GiB RAM RHEL 7.2):
        $ make -C libdmmp speed_test
        Got 5000 mpath
        real 1.51
        user 0.45
        sys 0.00

User case:

    Storaged multipath plugin:
        storaged-project/udisks#40

FAQ:

 1. Any developer notes?

    Following Linux kernel code style and libabc guideline.
    Others are recorded in 'libdmmp/DEV_NOTES'

 2. Can the library be licensed as LGPL?

    Nope. I copied some socket codes from libmultipath which is GPL.
    You could create some D-BUS API use libdmmp if license concerns.
    We might able to license libdmmp to LGPL after rewrite those functions.

Signed-off-by: Gris Ge <fge@redhat.com>
cathay4t added a commit to cathay4t/multipath-tools that referenced this pull request Feb 12, 2016
Features:

 * Use three multipathd IPC commands:
    * 'show maps raw format <fmt>'
    * 'show groups raw format <fmt>'
    * 'show paths raw format <fmt>'
    # We might have inconsistent data when something changes during these
    # commands. If so, DMMP_ERR_INCONSISTENT_DATA will be raised and
    # suggest user to try again.
 * Library user guide will be 'man 3 libdmmp.h'.
 * Every public function has its own manpage in section 3
   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

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

Performance:

  * 4k scsi_debug sdX with 2 disks per mpath (i7-3520M 4GiB RAM RHEL 7.2):
        $ make -C libdmmp speed_test
        Got 2000 mpath
        real 0.20
        user 0.03
        sys 0.01
  * 10k scsi_debug sdX with 2 disks per mpath (E5-2697 32GiB RAM RHEL 7.2):
        $ make -C libdmmp speed_test
        Got 5000 mpath
        real 1.51
        user 0.45
        sys 0.00

User case:

    Storaged multipath plugin:
        storaged-project/udisks#40

FAQ:

 1. Any developer notes?

    Following Linux kernel code style and libabc guideline.
    Others are recorded in 'libdmmp/DEV_NOTES'

 2. Can the library be licensed as LGPL?

    Nope. I copied some socket codes from libmultipath which is GPL.
    You could create some D-BUS API use libdmmp if license concerns.
    We might able to license libdmmp to LGPL after rewrite those functions.

Signed-off-by: Gris Ge <fge@redhat.com>
@phatina
Copy link
Contributor

phatina commented Feb 17, 2016

Hi Gris, can you give me some heads up about the Multipath API? Can we merge this or do I have to wait a bit longer? Thanks

@cathay4t
Copy link
Contributor Author

@phatina Hi Peter, I am still waiting dm-devel to accept my V2 patch there. Once they commited, we could review this PR.

If we need this feature badly, we could follow the plan B:

  • Move the libdmmp to storaged multipath plugin instead as libdmmp is standalone[2].
  • Once dm-devel accepted libdmmp, we purge it out from storaged and use upstream one.

[2]: It just use multipathd IPC socket.

@phatina
Copy link
Contributor

phatina commented Feb 17, 2016

OK, Gris. I was curious, because Todd told me, that your patches were dismissed, but now I know, that you are still in the game. Let's wait then for the review...

@cathay4t
Copy link
Contributor Author

Yeah. The V1 patch was dismissed.

@phatina phatina force-pushed the master branch 4 times, most recently from dbf8abf to 370da0b Compare April 29, 2016 13:26
cathay4t added a commit to cathay4t/multipath-tools that referenced this pull request May 19, 2016
Features:

 * Use these multipathd IPC commands:
    * 'show maps raw format <fmt>'
    * 'show groups raw format <fmt>'
    * 'show paths raw format <fmt>'
    # We might have inconsistent data when something changes during these
    # commands. If so, DMMP_ERR_INCONSISTENT_DATA will be raised and
    # suggest user to try again.
 * 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

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

Performance:

  * 4k scsi_debug sdX with 2 disks per mpath (i7-3520M 4GiB RAM RHEL 7.2):
        $ make -C libdmmp speed_test
        Got 2000 mpath
        real 0.20
        user 0.03
        sys 0.01
  * 10k scsi_debug sdX with 2 disks per mpath (E5-2697 32GiB RAM RHEL 7.2):
        $ make -C libdmmp speed_test
        Got 5000 mpath
        real 1.51
        user 0.45
        sys 0.00

User case:

    Storaged multipath plugin:
        storaged-project/udisks#40

Misc:
 * Developer note is libdmmp/DEV_NOTES.

Signed-off-by: Gris Ge <fge@redhat.com>
cathay4t added a commit to cathay4t/multipath-tools that referenced this pull request May 19, 2016
Features:

 * Use mpath_cmd.h for IPC connection and use output of
   this command:
    * '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:

  * 4k scsi_debug sdX with 2 disks per mpath (i7-3520M 4GiB RAM RHEL 7.2):
        $ make -C libdmmp speed_test
        Got 2000 mpath
        real 0.20
        user 0.03
        sys 0.01
  * 10k scsi_debug sdX with 2 disks per mpath (E5-2697 32GiB RAM RHEL 7.2):
        $ make -C libdmmp speed_test
        Got 5000 mpath
        real 1.51
        user 0.45
        sys 0.00

User case:

    Storaged multipath plugin:
        storaged-project/udisks#40

Misc:
 * Developer note is libdmmp/DEV_NOTES.

Signed-off-by: Gris Ge <fge@redhat.com>
cathay4t added a commit to cathay4t/multipath-tools that referenced this pull request May 19, 2016
Features:

 * Use mpath_cmd.h for IPC connection and use output of
   this command:
    * '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:

  * 4k scsi_debug sdX with 2 disks per mpath (i7-3520M 4GiB RAM RHEL 7.2):
        $ make -C libdmmp speed_test
        Got 2000 mpath
        real 0.20
        user 0.03
        sys 0.01
  * 10k scsi_debug sdX with 2 disks per mpath (E5-2697 32GiB RAM RHEL 7.2):
        $ make -C libdmmp speed_test
        Got 5000 mpath
        real 1.51
        user 0.45
        sys 0.00

User case:

    Storaged multipath plugin:
        storaged-project/udisks#40

Misc:
 * Developer note is libdmmp/DEV_NOTES.

Signed-off-by: Gris Ge <fge@redhat.com>
cathay4t added a commit to cathay4t/multipath-tools that referenced this pull request May 20, 2016
Features:

 * Use mpath_cmd.h for IPC connection and use output of
   this command:
    * '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:

  * 4k scsi_debug sdX with 2 disks per mpath (i7-3520M 4GiB RAM RHEL 7.2):
        $ make -C libdmmp speed_test
        Got 2000 mpath
        real 0.20
        user 0.03
        sys 0.01
  * 10k scsi_debug sdX with 2 disks per mpath (E5-2697 32GiB RAM RHEL 7.2):
        $ make -C libdmmp speed_test
        Got 5000 mpath
        real 1.51
        user 0.45
        sys 0.00

User case:

    Storaged multipath plugin:
        storaged-project/udisks#40

Misc:
 * Developer note is libdmmp/DEV_NOTES.

Signed-off-by: Gris Ge <fge@redhat.com>
cathay4t added a commit to cathay4t/multipath-tools that referenced this pull request May 20, 2016
Features:

 * Use mpath_cmd.h for IPC connection and use output of
   this command:
    * '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:

  * 4k scsi_debug sdX with 2 disks per mpath (i7-3520M 4GiB RAM RHEL 7.2):
        $ make -C libdmmp speed_test
        Got 2000 mpath
        real 0.20
        user 0.03
        sys 0.01
  * 10k scsi_debug sdX with 2 disks per mpath (E5-2697 32GiB RAM RHEL 7.2):
        $ make -C libdmmp speed_test
        Got 5000 mpath
        real 1.51
        user 0.45
        sys 0.00

User case:

    Storaged multipath plugin:
        storaged-project/udisks#40

Misc:
 * Developer note is libdmmp/DEV_NOTES.

Signed-off-by: Gris Ge <fge@redhat.com>
cathay4t added a commit to cathay4t/multipath-tools that referenced this pull request May 24, 2016
Features:

 * Use mpath_cmd.h for IPC connection and use output of
   this command:
    * '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:

  * 4k scsi_debug sdX with 2 disks per mpath (i7-3520M 4GiB RAM RHEL 7.2):
        $ make -C libdmmp speed_test
        Got 2000 mpath
        real 0.20
        user 0.03
        sys 0.01
  * 10k scsi_debug sdX with 2 disks per mpath (E5-2697 32GiB RAM RHEL 7.2):
        $ make -C libdmmp speed_test
        Got 5000 mpath
        real 1.51
        user 0.45
        sys 0.00

User case:

    Storaged multipath plugin:
        storaged-project/udisks#40

Misc:
 * Developer note is libdmmp/DEV_NOTES.

Signed-off-by: Gris Ge <fge@redhat.com>
cathay4t added a commit to cathay4t/multipath-tools that referenced this pull request Jun 15, 2016
Features:

 * Use mpath_cmd.h for IPC connection and use output of
   this command:
    * '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:

  * 4k scsi_debug sdX with 2 disks per mpath (i7-3520M 4GiB RAM RHEL 7.2):
        $ make -C libdmmp speed_test
        Got 2000 mpath
        real 0.20
        user 0.03
        sys 0.01
  * 10k scsi_debug sdX with 2 disks per mpath (E5-2697 32GiB RAM RHEL 7.2):
        $ make -C libdmmp speed_test
        Got 5000 mpath
        real 1.51
        user 0.45
        sys 0.00

User case:

    Storaged multipath plugin:
        storaged-project/udisks#40

Misc:
 * Developer note is libdmmp/DEV_NOTES.

Signed-off-by: Gris Ge <fge@redhat.com>
@tsmetana tsmetana closed this Sep 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants