[libvirt] [PATCH 00/11] storage: modularize the storage driver backends

Peter Krempa posted 11 patches 7 years, 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/cover.1486571179.git.pkrempa@redhat.com
daemon/libvirtd.c                      | 136 +++++++++-------------
docs/news.xml                          |  10 ++
libvirt.spec.in                        | 185 +++++++++++++++++++++++++-----
m4/virt-storage-rbd.m4                 |   2 +-
src/Makefile.am                        | 199 ++++++++++++++++++++++++++++++---
src/driver.c                           | 136 ++++++++++++++--------
src/driver.h                           |   6 +-
src/libvirt_driver_modules.syms        |   1 +
src/storage/storage_backend.c          | 151 +++++++++++++++++++------
src/storage/storage_backend.h          |   5 +
src/storage/storage_backend_disk.c     |   7 ++
src/storage/storage_backend_disk.h     |   4 +-
src/storage/storage_backend_fs.c       |  27 +++++
src/storage/storage_backend_fs.h       |  11 +-
src/storage/storage_backend_gluster.c  |  13 ++-
src/storage/storage_backend_gluster.h  |   5 +-
src/storage/storage_backend_iscsi.c    |   7 ++
src/storage/storage_backend_iscsi.h    |   4 +-
src/storage/storage_backend_logical.c  |   7 ++
src/storage/storage_backend_logical.h  |   4 +-
src/storage/storage_backend_mpath.c    |   8 ++
src/storage/storage_backend_mpath.h    |   4 +-
src/storage/storage_backend_rbd.c      |   7 ++
src/storage/storage_backend_rbd.h      |   4 +-
src/storage/storage_backend_scsi.c     |   7 ++
src/storage/storage_backend_scsi.h     |   4 +-
src/storage/storage_backend_sheepdog.c |   7 ++
src/storage/storage_backend_sheepdog.h |   4 +-
src/storage/storage_backend_vstorage.c |   7 ++
src/storage/storage_backend_vstorage.h |   4 +-
src/storage/storage_backend_zfs.c      |   7 ++
src/storage/storage_backend_zfs.h      |   4 +-
src/storage/storage_driver.c           |  19 +++-
src/storage/storage_driver.h           |   1 +
tests/Makefile.am                      |   4 +-
tests/storagepoolxml2xmltest.c         |   6 -
tests/virdrivermoduletest.c            |  52 +++++----
tests/virstoragetest.c                 |   4 +
38 files changed, 788 insertions(+), 285 deletions(-)
[libvirt] [PATCH 00/11] storage: modularize the storage driver backends
Posted by Peter Krempa 7 years, 1 month ago
Split up the storage driver backends into loadable modules so that
binary distributions don't have to compromise on shipping the storage
driver with all backends which may pull in too many dependencies.

Peter Krempa (11):
  configure: Fix configure output for RBD storage backend
  tests: storagepoolxml2xml: Remove compile conditionals
  tests: drivermodule: Drop unused macro arguments
  driver: Split/refactor driver module loading
  daemon: Refactor connection driver module loading
  storage: backend: Refactor registration of the backend drivers
  storage: Turn driver backends into (static) modules
  storage: Turn storage backends into dynamic modules
  tests: drivermodule: Make sure that all compiled storage backends can
    be loaded
  spec: Modularize the storage driver
  news: Mention storage driver split

 daemon/libvirtd.c                      | 136 +++++++++-------------
 docs/news.xml                          |  10 ++
 libvirt.spec.in                        | 185 +++++++++++++++++++++++++-----
 m4/virt-storage-rbd.m4                 |   2 +-
 src/Makefile.am                        | 199 ++++++++++++++++++++++++++++++---
 src/driver.c                           | 136 ++++++++++++++--------
 src/driver.h                           |   6 +-
 src/libvirt_driver_modules.syms        |   1 +
 src/storage/storage_backend.c          | 151 +++++++++++++++++++------
 src/storage/storage_backend.h          |   5 +
 src/storage/storage_backend_disk.c     |   7 ++
 src/storage/storage_backend_disk.h     |   4 +-
 src/storage/storage_backend_fs.c       |  27 +++++
 src/storage/storage_backend_fs.h       |  11 +-
 src/storage/storage_backend_gluster.c  |  13 ++-
 src/storage/storage_backend_gluster.h  |   5 +-
 src/storage/storage_backend_iscsi.c    |   7 ++
 src/storage/storage_backend_iscsi.h    |   4 +-
 src/storage/storage_backend_logical.c  |   7 ++
 src/storage/storage_backend_logical.h  |   4 +-
 src/storage/storage_backend_mpath.c    |   8 ++
 src/storage/storage_backend_mpath.h    |   4 +-
 src/storage/storage_backend_rbd.c      |   7 ++
 src/storage/storage_backend_rbd.h      |   4 +-
 src/storage/storage_backend_scsi.c     |   7 ++
 src/storage/storage_backend_scsi.h     |   4 +-
 src/storage/storage_backend_sheepdog.c |   7 ++
 src/storage/storage_backend_sheepdog.h |   4 +-
 src/storage/storage_backend_vstorage.c |   7 ++
 src/storage/storage_backend_vstorage.h |   4 +-
 src/storage/storage_backend_zfs.c      |   7 ++
 src/storage/storage_backend_zfs.h      |   4 +-
 src/storage/storage_driver.c           |  19 +++-
 src/storage/storage_driver.h           |   1 +
 tests/Makefile.am                      |   4 +-
 tests/storagepoolxml2xmltest.c         |   6 -
 tests/virdrivermoduletest.c            |  52 +++++----
 tests/virstoragetest.c                 |   4 +
 38 files changed, 788 insertions(+), 285 deletions(-)

-- 
2.11.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 00/11] storage: modularize the storage driver backends
Posted by Daniel P. Berrange 7 years ago
On Wed, Feb 08, 2017 at 05:27:00PM +0100, Peter Krempa wrote:
> Split up the storage driver backends into loadable modules so that
> binary distributions don't have to compromise on shipping the storage
> driver with all backends which may pull in too many dependencies.

BTW, it has been 9 years since we enabled dlopen for the main drivers.

Initially it was tedious to use when running from non-installed git
build dir, but we fixed that in 2014 with virFileFindResource, so that
it "just works".

The only bug we ever hit was when we initially tried to modularize
even the non-daemon drivers, and it broke usage from language bindings.

Every platform we care about, including Windows, has dlopen() or
equivalent functionality.

So perhaps it is time to *drop* support for building without modules.

It will simplify our makefiles quite a bit to be able to assume everything
is always dlopen'd modules, and will slightly simplify the code, and most
importantly ensure a single codepath, so we know the behaviour is always
the same.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list