Re: [PATCH] storage: Fix type PLOOP type check for storageVolUpload

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



You are absolutely right.�� 

Thanks a lot.



From: John Ferlan <jferlan@xxxxxxxxxx>
Sent: Friday, December 2, 2016 11:06:37 PM
To: libvir-list@xxxxxxxxxx
Cc: Olga Krishtal
Subject: [PATCH] storage: Fix type PLOOP type check for storageVolUpload
 
Commit id '03e750f3' added support for checking the PLOOP type; however,
it used 'target.type' which no storage code ever fills in, so it will
never be set.  Change to just vol->type (could use vol->target.format
as well).

Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
---

 Found this by chance while digging through the code to investigate
 something else. Turns out the storage/volume code does not fill in
 the target.type field.

 src/storage/storage_driver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c
index df65807..a79acc6 100644
--- a/src/storage/storage_driver.c
+++ b/src/storage/storage_driver.c
@@ -2427,7 +2427,7 @@ storageVolUpload(virStorageVolPtr obj,
     if (VIR_ALLOC(cbdata) < 0 ||
         VIR_STRDUP(cbdata->pool_name, pool->def->name) < 0)
         goto cleanup;
-    if (vol->target.type == VIR_STORAGE_VOL_PLOOP &&
+    if (vol->type == VIR_STORAGE_VOL_PLOOP &&
         VIR_STRDUP(cbdata->vol_path, vol->target.path) < 0)
         goto cleanup;
 
--
2.7.4

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

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux