[libvirt] [PATCH 0/8] Converge Storage Pool vHBA logic with Node Device

John Ferlan jferlan at redhat.com
Mon Feb 20 13:18:11 UTC 2017


Similar to the recent node device focused vHBA patches, but these focus
more on adjustments to the Storage Pool vHBA logic and finally the mechanism
to define a vHBA for a domain.

The first patch fixes a leak found by coverity that showed up because
node_device_conf had enough changes so that coverity looked harder...

The second patch creates a mechanism to mock creation of the vHBA in
order to test the ability for the storage pool to create a vHBA. As
much as I dislike forward refs for testNodeDeviceMockCreateVport, it
was better than moving all the code....

The third patch extracts out storage device mgmt into it's own set of
src/util API's - similar to the existing virstoragefile, but for devices.

The fourth patch was uncovered while moving code from storage_backend_scsi
into node_device_conf (the fifth patch)...

The fifth patch moves the createVport/deleteVport guts into the
node_device_conf (although they could have moved to virvhba)...

The sixth patch alters the logic to use the node_device API's as the
"preferred" mechanism to create/delete the vport...

The seventh patch tests the storage pool vHBA creation algorithms.

The eigth patch is the reason for all this stirring of the pot. Alter
the domain <controller> XML in order to allow definition of a vHBA which
more or less sits between a "scsi_hostX" host device and a controller. This
is in preparation for https://bugzilla.redhat.com/show_bug.cgi?id=1404962
which can take that created vHBA and automagically add the LUNs from the
vHBA to the domain although that requires a bit more magic for which there
are already onlist patches to let qemu driver know when a node device has
been added/removed. Once all that's in place - the next step will be to
converge the two sets of patches. It's a chicken/egg type problem - one
has to exist before the other can truly work.


John Ferlan (8):
  conf: Fix leak in virNodeDeviceDefParseXML
  tests: Add createVHBAByStoragePool-by-parent to fchosttest
  util: Convert virStoragePoolSourceAdapter to virStorageAdapter
  util: Rename virFileWaitForDevices
  storage: Move/rename createVport and deleteVport
  util: Alter virNodeDevice{Create|Delete}Vport to use nodedev APIs
  tests: Add more storage pool vHBA tests
  conf: Add vHBA controller definition to domain

 docs/schemas/basictypes.rng                        |  66 ++--
 docs/schemas/domaincommon.rng                      |  12 +-
 po/POTFILES.in                                     |   1 +
 src/Makefile.am                                    |   1 +
 src/conf/domain_audit.c                            |  32 ++
 src/conf/domain_conf.c                             | 180 ++++++++++-
 src/conf/domain_conf.h                             |   2 +
 src/conf/node_device_conf.c                        | 342 ++++++++++++++++++++-
 src/conf/node_device_conf.h                        |   9 +
 src/conf/storage_conf.c                            | 338 +++++---------------
 src/conf/storage_conf.h                            |  35 +--
 src/libvirt_private.syms                           |  20 +-
 src/libxl/libxl_conf.c                             |   1 +
 src/node_device/node_device_driver.c               |   2 +-
 src/phyp/phyp_driver.c                             |   3 +-
 src/qemu/qemu_alias.c                              |   5 +
 src/qemu/qemu_command.c                            |   4 +
 src/qemu/qemu_hotplug.c                            |  16 +
 src/storage/storage_backend_disk.c                 |   6 +-
 src/storage/storage_backend_iscsi.c                |   2 +-
 src/storage/storage_backend_logical.c              |   4 +-
 src/storage/storage_backend_mpath.c                |   2 +-
 src/storage/storage_backend_scsi.c                 | 267 +++-------------
 src/storage/storage_util.c                         |   2 +-
 src/test/test_driver.c                             | 101 +++++-
 src/util/virfile.h                                 |   2 -
 src/util/virscsihost.c                             |  28 +-
 src/util/virscsihost.h                             |   8 +-
 src/util/virstoragedevice.c                        | 292 ++++++++++++++++++
 src/util/virstoragedevice.h                        |  89 ++++++
 src/util/virutil.c                                 |   4 +-
 src/util/virutil.h                                 |   2 +
 tests/fchosttest.c                                 | 111 +++++++
 .../qemuxml2argv-vhba-no-parent.xml                |  38 +++
 .../qemuxml2argv-vhba-parent-fabric.xml            |  38 +++
 .../qemuxml2argv-vhba-parent-name.xml              |  38 +++
 .../qemuxml2argv-vhba-parent-wwns.xml              |  38 +++
 .../qemuxml2xmlout-vhba-no-parent.xml              |  47 +++
 .../qemuxml2xmlout-vhba-parent-fabric.xml          |  47 +++
 .../qemuxml2xmlout-vhba-parent-name.xml            |  47 +++
 .../qemuxml2xmlout-vhba-parent-wwns.xml            |  47 +++
 tests/qemuxml2xmltest.c                            |   9 +
 42 files changed, 1727 insertions(+), 611 deletions(-)
 create mode 100644 src/util/virstoragedevice.c
 create mode 100644 src/util/virstoragedevice.h
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-vhba-no-parent.xml
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-vhba-parent-fabric.xml
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-vhba-parent-name.xml
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-vhba-parent-wwns.xml
 create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-vhba-no-parent.xml
 create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-vhba-parent-fabric.xml
 create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-vhba-parent-name.xml
 create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-vhba-parent-wwns.xml

-- 
2.9.3




More information about the libvir-list mailing list