1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-07 17:28:15 +00:00

storage_file: Add a new flag to mark backing files that are safe to probe

Signed-off-by: Adam Litke <agl@us.ibm.com>
This commit is contained in:
Adam Litke 2010-11-19 10:18:17 -06:00 committed by Eric Blake
parent 5dca07e272
commit fd93d46642
3 changed files with 6 additions and 1 deletions

View File

@ -8230,6 +8230,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;

View File

@ -42,7 +42,7 @@
VIR_ENUM_IMPL(virStorageFileFormat,
VIR_STORAGE_FILE_LAST,
"raw", "dir", "bochs",
"raw", "probe", "dir", "bochs",
"cloop", "cow", "dmg", "iso",
"qcow", "qcow2", "qed", "vmdk", "vpc")

View File

@ -30,6 +30,7 @@
enum virStorageFileFormat {
VIR_STORAGE_FILE_AUTO = -1,
VIR_STORAGE_FILE_RAW = 0,
VIR_STORAGE_FILE_AUTO_SAFE,
VIR_STORAGE_FILE_DIR,
VIR_STORAGE_FILE_BOCHS,
VIR_STORAGE_FILE_CLOOP,