提交 1423ae29 编写于 作者: P Peter Krempa

storage: Traverse backing chains of network disks

Now we don't need to skip backing chain detection for remote disks.
上级 b225444e
...@@ -2428,12 +2428,10 @@ qemuDomainDetermineDiskChain(virQEMUDriverPtr driver, ...@@ -2428,12 +2428,10 @@ qemuDomainDetermineDiskChain(virQEMUDriverPtr driver,
int ret = 0; int ret = 0;
uid_t uid; uid_t uid;
gid_t gid; gid_t gid;
const char *src = virDomainDiskGetSource(disk); int type = virStorageSourceGetActualType(&disk->src);
int type = virDomainDiskGetType(disk);
if (!src || if (type != VIR_STORAGE_TYPE_NETWORK &&
type == VIR_STORAGE_TYPE_NETWORK || !disk->src.path)
type == VIR_STORAGE_TYPE_VOLUME)
goto cleanup; goto cleanup;
if (disk->src.backingStore) { if (disk->src.backingStore) {
......
...@@ -3189,19 +3189,13 @@ virStorageFileGetMetadata(virStorageSourcePtr src, ...@@ -3189,19 +3189,13 @@ virStorageFileGetMetadata(virStorageSourcePtr src,
if (!(cycle = virHashCreate(5, NULL))) if (!(cycle = virHashCreate(5, NULL)))
return -1; return -1;
if (virStorageSourceGetActualType(src) != VIR_STORAGE_TYPE_NETWORK) { if (!src->relPath &&
if (!src->relPath && VIR_STRDUP(src->relPath, src->path) < 0)
VIR_STRDUP(src->relPath, src->path) < 0) goto cleanup;
goto cleanup;
if (!src->relDir && if (!src->relDir &&
!(src->relDir = mdir_name(src->path))) { !(src->relDir = mdir_name(src->path))) {
virReportOOMError(); virReportOOMError();
goto cleanup;
}
} else {
/* TODO: currently unimplemented for non-local storage */
ret = 0;
goto cleanup; goto cleanup;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册