[libvirt] [PATCH 1/5] virlog: Don't log devmapper

Peter Krempa pkrempa at redhat.com
Mon Mar 26 08:44:13 UTC 2018


On Mon, Mar 26, 2018 at 09:49:08 +0200, Peter Krempa wrote:
> On Mon, Mar 26, 2018 at 07:16:42 +0200, Michal Privoznik wrote:
> > Unless overridden, libdevmapper logs all messages to stderr.
> > Therefore if something goes wrong in storage_backend_mpath.c or
> > parthelper.c we don't honour user set logging targets.

'parthelper.c' does not use our logging code and also does not use any
libdevmapper.h functions. According to my experiment the header file
include can be dropped.

> > 
> > Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
> > ---
> >  src/util/virlog.c | 23 +++++++++++++++++++++++
> >  1 file changed, 23 insertions(+)
> 
> I think this should be done in the function which registers the mpath
> storage backend. For now it should work as is, but given that we are
> going to split the daemons this code will not really be necessary in
> other places.

So looking at the new code you've added in this series, it still might
be desirable to move all the libdevmapper use into the storage driver
and keep it there, so users wanting to use multipath would need to
install the corresponding storage driver.

Given that moving it there might be impractical, I'll suggest that you
move it to a separate util file and add virOnce infrastructure to set
the error helpers.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20180326/76d90856/attachment-0001.sig>


More information about the libvir-list mailing list