mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-23 20:02:21 +00:00
storage: Directory shouldn't be listed as type 'file'
Fix internals of libvirt for new storage volume type. Libvirt reported an invalid type of the volume. BZ #727088
This commit is contained in:
parent
98369d314b
commit
6c55124f37
@ -1705,6 +1705,7 @@ typedef virStorageVol *virStorageVolPtr;
|
|||||||
typedef enum {
|
typedef enum {
|
||||||
VIR_STORAGE_VOL_FILE = 0, /* Regular file based volumes */
|
VIR_STORAGE_VOL_FILE = 0, /* Regular file based volumes */
|
||||||
VIR_STORAGE_VOL_BLOCK = 1, /* Block based volumes */
|
VIR_STORAGE_VOL_BLOCK = 1, /* Block based volumes */
|
||||||
|
VIR_STORAGE_VOL_DIR = 2, /* Directory-passthrough based volume */
|
||||||
} virStorageVolType;
|
} virStorageVolType;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
@ -675,6 +675,10 @@ virStorageBackendFileSystemRefresh(virConnectPtr conn ATTRIBUTE_UNUSED,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* directory based volume */
|
||||||
|
if (vol->target.format == VIR_STORAGE_FILE_DIR)
|
||||||
|
vol->type = VIR_STORAGE_VOL_DIR;
|
||||||
|
|
||||||
if (backingStore != NULL) {
|
if (backingStore != NULL) {
|
||||||
vol->backingStore.path = backingStore;
|
vol->backingStore.path = backingStore;
|
||||||
vol->backingStore.format = backingStoreFormat;
|
vol->backingStore.format = backingStoreFormat;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user