[libvirt] [PATCH v2 32/32] storage: Enable sparse streams for virStorageVol{Download, Upload}

Michal Privoznik mprivozn at redhat.com
Mon May 23 15:58:24 UTC 2016


NOT TO BE APPLIED UPSTREAM!

Now that we have everything prepared, let's enable the feature
for these two APIs.
Well, except we can't. Not just yet. Because of the previous
commit.

Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
---
 src/storage/storage_backend.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/storage/storage_backend.c b/src/storage/storage_backend.c
index 3a23cd7..b2a9e3b 100644
--- a/src/storage/storage_backend.c
+++ b/src/storage/storage_backend.c
@@ -2005,7 +2005,8 @@ virStorageBackendVolUploadLocal(virConnectPtr conn ATTRIBUTE_UNUSED,
     int ret = -1;
     int has_snap = 0;
 
-    virCheckFlags(0, -1);
+    virCheckFlags(VIR_STORAGE_VOL_UPLOAD_SPARSE_STREAM, -1);
+
     /* if volume has target format VIR_STORAGE_FILE_PLOOP
      * we need to restore DiskDescriptor.xml, according to
      * new contents of volume. This operation will be perfomed
@@ -2051,7 +2052,8 @@ virStorageBackendVolDownloadLocal(virConnectPtr conn ATTRIBUTE_UNUSED,
     int ret = -1;
     int has_snap = 0;
 
-    virCheckFlags(0, -1);
+    virCheckFlags(VIR_STORAGE_VOL_DOWNLOAD_SPARSE_STREAM, -1);
+
     if (vol->target.format == VIR_STORAGE_FILE_PLOOP) {
         has_snap = virStorageBackendPloopHasSnapshots(vol->target.path);
         if (has_snap < 0) {
-- 
2.8.3




More information about the libvir-list mailing list