]> xenbits.xensource.com Git - libvirt.git/commitdiff
Revert "storageVolCreateXMLFrom: Check if backend knows how to createVol"
authorJán Tomko <jtomko@redhat.com>
Mon, 15 Feb 2016 08:04:58 +0000 (09:04 +0100)
committerJán Tomko <jtomko@redhat.com>
Wed, 17 Feb 2016 12:29:41 +0000 (13:29 +0100)
This reverts commit 611a278fa46d3136b7fe5c6ab05e660ca3c8fdf4.

According to the original commit message, this is dead code:

  It is highly unlikely that a backend will know how to create a
  volume from a different volume (buildVolFrom) and not know how to
  create an empty volume (createVol).

src/storage/storage_driver.c

index 81b158497d26bf688a99732a5bcdd7f653383be4..e0ded0161994930a7483930516ca6aaf9a0595ad 100644 (file)
@@ -2037,13 +2037,6 @@ storageVolCreateXMLFrom(virStoragePoolPtr obj,
     if (newvol->target.capacity < origvol->target.capacity)
         newvol->target.capacity = origvol->target.capacity;
 
-    if (!backend->createVol) {
-        virReportError(VIR_ERR_NO_SUPPORT,
-                       "%s", _("storage pool does not support volume "
-                               "creation"));
-        goto cleanup;
-    }
-
     if (!backend->buildVolFrom) {
         virReportError(VIR_ERR_NO_SUPPORT,
                        "%s", _("storage pool does not support"