]> xenbits.xensource.com Git - libvirt.git/commit
storage: Add flags to allow building pool during create processing
authorJohn Ferlan <jferlan@redhat.com>
Wed, 25 Nov 2015 15:01:45 +0000 (10:01 -0500)
committerJohn Ferlan <jferlan@redhat.com>
Thu, 17 Dec 2015 16:56:18 +0000 (11:56 -0500)
commitaeb1078ab52ad5394b6e477658ce2d42dac55b49
treef4e4ada6523adf85d83505fbe3b2196ef7fcba31
parent22f9754f1b377ba7646c731bc21350f38591c4e0
storage: Add flags to allow building pool during create processing

https://bugzilla.redhat.com/show_bug.cgi?id=830056

Add flags handling to the virStoragePoolCreate and virStoragePoolCreateXML
API's which will allow the caller to provide the capability for the storage
pool create API's to also perform a pool build during creation rather than
requiring the additional buildPool step. This will allow transient pools
to be defined, built, and started.

The new flags are:

    * VIR_STORAGE_POOL_CREATE_WITH_BUILD
      Perform buildPool without any flags passed.

    * VIR_STORAGE_POOL_CREATE_WITH_BUILD_OVERWRITE
      Perform buildPool using VIR_STORAGE_POOL_BUILD_OVERWRITE flag.

    * VIR_STORAGE_POOL_CREATE_WITH_BUILD_NO_OVERWRITE
      Perform buildPool using VIR_STORAGE_POOL_BUILD_NO_OVERWRITE flag.

It is up to the backend to handle the processing of build flags. The
overwrite and no-overwrite flags are mutually exclusive.

NB:
This patch is loosely based upon code originally authored by Osier
Yang that were not reviewed and pushed, see:

https://www.redhat.com/archives/libvir-list/2012-July/msg01328.html
include/libvirt/libvirt-storage.h
src/libvirt-storage.c
src/storage/storage_driver.c