[PATCH 3/4] storage_file: Add a new flag to mark backing files that are safe to probe

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

 



Signed-off-by: Adam Litke <agl@xxxxxxxxxx>
Acked-by: Eric Blake <eblake@xxxxxxxxxx>
---
 src/conf/domain_conf.c  |    4 ++++
 src/util/storage_file.h |    1 +
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 2d11785..a08c846 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -7825,6 +7825,10 @@ int virDomainDiskDefForeachPath(virDomainDiskDefPtr disk,
         if (format == VIR_STORAGE_FILE_AUTO &&
             !allowProbing)
             format = VIR_STORAGE_FILE_RAW; /* Stops further recursion */
+
+        /* Allow probing for image formats that are safe */
+        if (format == VIR_STORAGE_FILE_AUTO_SAFE)
+            format = VIR_STORAGE_FILE_AUTO;
     } while (nextpath);
 
     ret = 0;
diff --git a/src/util/storage_file.h b/src/util/storage_file.h
index c4d4650..1eef4c5 100644
--- a/src/util/storage_file.h
+++ b/src/util/storage_file.h
@@ -28,6 +28,7 @@
 # include <stdbool.h>
 
 enum virStorageFileFormat {
+    VIR_STORAGE_FILE_AUTO_SAFE = -2,
     VIR_STORAGE_FILE_AUTO = -1,
     VIR_STORAGE_FILE_RAW = 0,
     VIR_STORAGE_FILE_DIR,
-- 
1.7.3.2.164.g6f10c

--
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]