All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: Gris Ge <fge@redhat.com>
Cc: dm-devel@redhat.com
Subject: Re: [PATCH] Introducing multipath C API <libdmmp/libdmmp.h>
Date: Thu, 28 Jan 2016 10:15:16 +0100	[thread overview]
Message-ID: <56A9DC24.3050507@suse.de> (raw)
In-Reply-To: <1453953120-7023-1-git-send-email-fge@redhat.com>

On 01/28/2016 04:52 AM, Gris Ge wrote:
> 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
>    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:
>         https://github.com/storaged-project/storaged/pull/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 for 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 developer notes?
> 
>     Following Linux kernel code style and libabc guideline.
>     Others are recorded in 'libdmmp/DEV_NOTES'
> 
>  4. Can the library be licensed as LGPL?
> 
>     Nope. LGPL library cannot link to any GPL code, but our dependent
>     libmultipath library 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.
> 
>  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 <fge@redhat.com>

Rather ... not.

In doing so you build a _separate_ multipath topology, which has
nothing to do with the current multipath topology as being used by
the multipathd.
With that you run into the risk of both getting out-of-sync, making
debugging and error recovery really hard.

I would very much advocate to use the IPC interface into multipathd;
we can easily define a stable ABI for that.
ATM it's just being use for the userland CLI, and hence it'll return
human-readable output. But I don't have any issues to define a
machine-readable output, too, so that it can be easily parsed from
other programs.
In fact, I had the problem already, so I would welcome such an
approach. But adding yet another library which duplicates existing
functionality is not the way to go.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare@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)

  reply	other threads:[~2016-01-28  9:15 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-28  3:52 [PATCH] Introducing multipath C API <libdmmp/libdmmp.h> Gris Ge
2016-01-28  9:15 ` Hannes Reinecke [this message]
2016-01-28  9:40   ` Gris Ge
2016-02-01 13:13   ` Todd Gill
2016-02-01 13:36     ` Hannes Reinecke
2016-02-12  8:10       ` [PATCH V2] Introducing multipath C API Gris Ge
2016-02-12  8:10         ` [PATCH V2] Introducing multipath C API <libdmmp/libdmmp.h> Gris Ge
2016-03-04 16:06           ` Benjamin Marzinski
2016-03-05  9:46             ` Gris Ge
2016-07-01 12:46           ` [PATCH V3 0/3] Introducing multipath C API Gris Ge
2016-07-01 12:46             ` [PATCH V3 1/3] multipath-tools: Increase MAX_REPLY_LEN Gris Ge
2016-07-01 14:46               ` Hannes Reinecke
2016-07-02  0:25                 ` Gris Ge
2016-07-04  6:05                   ` Hannes Reinecke
2016-07-04  9:11                     ` Gris Ge
2016-07-04  9:17                       ` [PATCH V4 0/3] Introducing multipath C API Gris Ge
2016-07-04  9:17                         ` [PATCH V4 1/3] multipath-tools: New way to limit the IPC command length Gris Ge
2016-07-04  9:17                         ` [PATCH V4 2/3] multipath-tools: Set errno mpath_recv_reply() when failure Gris Ge
2016-07-04  9:17                         ` [PATCH V4 3/3] multipath-tools: Introducing multipath C API Gris Ge
2016-07-04  9:27                         ` [PATCH V4 0/3] " Gris Ge
2016-07-04  9:29                         ` Please ignore this patch set. ([PATCH V4 0/3] Introducing multipath C API) Gris Ge
2016-07-04  9:40                         ` [PATCH V5 0/3] Introducing multipath C API Gris Ge
2016-07-04  9:40                           ` [PATCH V5 1/3] multipath-tools: New way to limit the IPC command length Gris Ge
2016-07-04  9:40                           ` [PATCH V5 2/3] multipath-tools: Set errno mpath_recv_reply() when failure Gris Ge
2016-07-04  9:40                           ` [PATCH V5 3/3] multipath-tools: Introducing multipath C API Gris Ge
2016-07-01 12:46             ` [PATCH V3 2/3] multipath-tools: Set errno mpath_recv_reply() when failure Gris Ge
2016-07-01 12:46             ` [PATCH V3 3/3] multipath-tools: Introducing multipath C API <libdmmp/libdmmp.h> Gris Ge
2016-07-01 12:55             ` [PATCH " Gris Ge
2016-07-01 13:06             ` [PATCH V3 " Gris Ge
2016-07-12  6:50 ` [PATCH V6 0/3] Introducing multipath C API Gris Ge
2016-07-12  6:50   ` [PATCH V6 1/3] multipath-tools: New way to limit the IPC command length Gris Ge
2016-07-15 21:35     ` Benjamin Marzinski
2016-07-18 12:38       ` Gris Ge
2016-08-12 15:57       ` Bart Van Assche
2016-08-12 21:35         ` Benjamin Marzinski
2016-08-12 21:49           ` Bart Van Assche
2016-07-12  6:50   ` [PATCH V6 2/3] multipath-tools: Set errno mpath_recv_reply() when failure Gris Ge
2016-07-12  6:50   ` [PATCH V6 3/3] multipath-tools: Introducing multipath C API Gris Ge
2016-07-15 21:36   ` [PATCH V6 0/3] " Benjamin Marzinski
2016-08-12 12:12 ` [PATCH V7 0/4] multipath: " Gris Ge
2016-08-12 12:12   ` [PATCH V7 1/4] libmpathcmd: Block SIGPIPE when write() Gris Ge
2016-08-12 16:01     ` Bart Van Assche
2016-08-12 12:12   ` [PATCH V7 2/4] multipath-tools: New way to limit the IPC command length Gris Ge
2016-08-12 15:48     ` Bart Van Assche
2016-08-12 21:53     ` Benjamin Marzinski
2016-08-12 12:12   ` [PATCH V7 3/4] multipath-tools: Set errno mpath_recv_reply() when failure Gris Ge
2016-08-12 12:12   ` [PATCH V7 4/4] multipath-tools: Introducing multipath C API Gris Ge
2017-02-24 12:50     ` [PATCH V5] " Gris Ge
2017-02-27  5:56       ` Christophe Varoqui
2017-02-24 13:07     ` Gris Ge
2016-08-12 13:26   ` [PATCH V7 0/4] multipath: " Gris Ge

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56A9DC24.3050507@suse.de \
    --to=hare@suse.de \
    --cc=dm-devel@redhat.com \
    --cc=fge@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.