[libvirt] [PATCH 00/15] Make use of autofree within storage code

John Ferlan posted 15 patches 11 weeks ago
Test syntax-check passed
Failed in applying to current master (apply log)
src/conf/domain_conf.c                     |  35 +-
src/conf/storage_conf.c                    | 335 +++++------
src/conf/storage_conf.h                    |   4 +
src/conf/virstorageobj.c                   |  27 +-
src/esx/esx_storage_backend_vmfs.c         |   6 +-
src/phyp/phyp_driver.c                     |   6 +-
src/qemu/qemu_domain.c                     |   3 +-
src/qemu/qemu_driver.c                     |   9 +-
src/qemu/qemu_migration.c                  |   3 +-
src/qemu/qemu_parse_command.c              |   6 +-
src/storage/storage_backend.c              |   9 +-
src/storage/storage_backend_disk.c         | 147 ++---
src/storage/storage_backend_fs.c           |  59 +-
src/storage/storage_backend_gluster.c      |  45 +-
src/storage/storage_backend_iscsi.c        |  76 +--
src/storage/storage_backend_iscsi_direct.c |  62 +--
src/storage/storage_backend_logical.c      | 139 ++---
src/storage/storage_backend_mpath.c        |  42 +-
src/storage/storage_backend_rbd.c          |  44 +-
src/storage/storage_backend_scsi.c         |  65 +--
src/storage/storage_backend_sheepdog.c     |  98 ++--
src/storage/storage_backend_vstorage.c     |  39 +-
src/storage/storage_backend_zfs.c          |  77 +--
src/storage/storage_driver.c               |  93 ++--
src/storage/storage_file_fs.c              |  15 +-
src/storage/storage_file_gluster.c         |  16 +-
src/storage/storage_util.c                 | 553 +++++++-----------
src/test/test_driver.c                     | 209 +++----
src/util/virstoragefile.c                  | 615 +++++++++------------
src/util/virstoragefile.h                  |   2 +
src/vbox/vbox_storage.c                    |   3 +-
tests/qemublocktest.c                      |   6 +-
tests/storagebackendsheepdogtest.c         |  59 +-
tests/storagepoolxml2argvtest.c            |  42 +-
tests/storagepoolxml2xmltest.c             |  36 +-
tests/storagevolxml2argvtest.c             |  69 +--
tests/storagevolxml2xmltest.c              |  44 +-
tests/virstoragetest.c                     | 111 ++--
tests/virstorageutiltest.c                 |   7 +-
39 files changed, 1189 insertions(+), 2027 deletions(-)

[libvirt] [PATCH 00/15] Make use of autofree within storage code

Posted by John Ferlan 11 weeks ago
A tedious series of patches that will make use of the autofree
functionality within (many/most) storage modules. As part of the
changes I've added a few new AUTOPTR's and made use of existing
ones. The diffstat I think shows quite a bit of code removed -
mostly in the goto cleanup/error handling that isn't necessary.

I've run the series through the Coverity checker with no issues
and I've run the Avocado pool and volume tests. The Avocado test
did find a couple of issues that were fixed before posting this
(assuming a virString on a char ** that was really a counted list
managed by VIR_APPEND_ELEMENT - there's a golden egg comment in
one module in the middle of the series).

John Ferlan (15):
  util: Introduce VIR_DEFINE_AUTOPTR_FUNC for virStorageAuthDef
  conf: Introduce VIR_DEFINE_AUTOPTR_FUNC for virStoragePoolSource
  conf: Introduce VIR_DEFINE_AUTOPTR_FUNC for virStorageVolDef
  conf: Introduce VIR_DEFINE_AUTOPTR_FUNC for virStoragePoolDef
  storage: Use VIR_AUTOPTR(virString)
  storage: Use VIR_AUTOPTR(virCommand)
  storage: Use VIR_AUTOFREE for storage backends
  storage: Use VIR_AUTOFREE for storage driver
  storage: Use VIR_AUTOFREE for storage util
  conf: Use VIR_AUTOFREE for storage_conf
  util: Use VIR_AUTOFREE for virstoragefile
  test: Use VIR_AUTOFREE for test driver
  tests: Use VIR_AUTOFREE for various storage tests
  storage: Use VIR_AUTOCLOSE
  util: Introduce VIR_DEFINE_AUTOPTR_FUNC for virStorageSource

 src/conf/domain_conf.c                     |  35 +-
 src/conf/storage_conf.c                    | 335 +++++------
 src/conf/storage_conf.h                    |   4 +
 src/conf/virstorageobj.c                   |  27 +-
 src/esx/esx_storage_backend_vmfs.c         |   6 +-
 src/phyp/phyp_driver.c                     |   6 +-
 src/qemu/qemu_domain.c                     |   3 +-
 src/qemu/qemu_driver.c                     |   9 +-
 src/qemu/qemu_migration.c                  |   3 +-
 src/qemu/qemu_parse_command.c              |   6 +-
 src/storage/storage_backend.c              |   9 +-
 src/storage/storage_backend_disk.c         | 147 ++---
 src/storage/storage_backend_fs.c           |  59 +-
 src/storage/storage_backend_gluster.c      |  45 +-
 src/storage/storage_backend_iscsi.c        |  76 +--
 src/storage/storage_backend_iscsi_direct.c |  62 +--
 src/storage/storage_backend_logical.c      | 139 ++---
 src/storage/storage_backend_mpath.c        |  42 +-
 src/storage/storage_backend_rbd.c          |  44 +-
 src/storage/storage_backend_scsi.c         |  65 +--
 src/storage/storage_backend_sheepdog.c     |  98 ++--
 src/storage/storage_backend_vstorage.c     |  39 +-
 src/storage/storage_backend_zfs.c          |  77 +--
 src/storage/storage_driver.c               |  93 ++--
 src/storage/storage_file_fs.c              |  15 +-
 src/storage/storage_file_gluster.c         |  16 +-
 src/storage/storage_util.c                 | 553 +++++++-----------
 src/test/test_driver.c                     | 209 +++----
 src/util/virstoragefile.c                  | 615 +++++++++------------
 src/util/virstoragefile.h                  |   2 +
 src/vbox/vbox_storage.c                    |   3 +-
 tests/qemublocktest.c                      |   6 +-
 tests/storagebackendsheepdogtest.c         |  59 +-
 tests/storagepoolxml2argvtest.c            |  42 +-
 tests/storagepoolxml2xmltest.c             |  36 +-
 tests/storagevolxml2argvtest.c             |  69 +--
 tests/storagevolxml2xmltest.c              |  44 +-
 tests/virstoragetest.c                     | 111 ++--
 tests/virstorageutiltest.c                 |   7 +-
 39 files changed, 1189 insertions(+), 2027 deletions(-)

-- 
2.20.1

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