提交 b8240fe7 编写于 作者: P Peter Krempa

qemu: block: Don't nest storage layer properties into format layer

Reference the storage via node name rather than inlining it. This is
the approach that will be used with -blockdev/blockdev-add since it
allows more control and is more future proof.
Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
上级 cf9683ca
......@@ -1432,7 +1432,6 @@ virJSONValuePtr
qemuBlockStorageSourceGetBlockdevProps(virStorageSourcePtr src)
{
bool backingSupported = src->format >= VIR_STORAGE_FILE_BACKING;
virJSONValuePtr storage = NULL;
virJSONValuePtr props = NULL;
virJSONValuePtr ret = NULL;
......@@ -1446,13 +1445,9 @@ qemuBlockStorageSourceGetBlockdevProps(virStorageSourcePtr src)
if (!(props = qemuBlockStorageSourceGetBlockdevFormatProps(src)))
goto cleanup;
if (!(storage = qemuBlockStorageSourceGetBackendProps(src, false)))
if (virJSONValueObjectAppendString(props, "file", src->nodestorage) < 0)
goto cleanup;
if (virJSONValueObjectAppend(props, "file", storage) < 0)
goto cleanup;
storage = NULL;
if (src->backingStore && backingSupported) {
if (virStorageSourceHasBacking(src)) {
if (virJSONValueObjectAppendString(props, "backing",
......@@ -1469,7 +1464,6 @@ qemuBlockStorageSourceGetBlockdevProps(virStorageSourcePtr src)
VIR_STEAL_PTR(ret, props);
cleanup:
virJSONValueFree(storage);
virJSONValueFree(props);
return ret;
}
......@@ -191,7 +191,8 @@ testQemuDiskXMLToProps(const void *opaque)
struct testQemuDiskXMLToJSONData *data = (void *) opaque;
virDomainDiskDefPtr disk = NULL;
virStorageSourcePtr n;
virJSONValuePtr props = NULL;
virJSONValuePtr formatProps = NULL;
virJSONValuePtr storageProps = NULL;
char *xmlpath = NULL;
char *xmlstr = NULL;
int ret = -1;
......@@ -221,7 +222,8 @@ testQemuDiskXMLToProps(const void *opaque)
if (testQemuDiskXMLToJSONFakeSecrets(n) < 0)
goto cleanup;
if (!(props = qemuBlockStorageSourceGetBlockdevProps(n))) {
if (!(formatProps = qemuBlockStorageSourceGetBlockdevProps(n)) ||
!(storageProps = qemuBlockStorageSourceGetBackendProps(n, false))) {
if (!data->fail) {
VIR_TEST_VERBOSE("failed to generate qemu blockdev props\n");
goto cleanup;
......@@ -231,13 +233,16 @@ testQemuDiskXMLToProps(const void *opaque)
goto cleanup;
}
if (VIR_APPEND_ELEMENT(data->props, data->nprops, props) < 0)
if (VIR_APPEND_ELEMENT(data->props, data->nprops, formatProps) < 0 ||
VIR_APPEND_ELEMENT(data->props, data->nprops, storageProps) < 0)
goto cleanup;
}
ret = 0;
cleanup:
virJSONValueFree(formatProps);
virJSONValueFree(storageProps);
virDomainDiskDefFree(disk);
VIR_FREE(xmlpath);
VIR_FREE(xmlstr);
......
......@@ -2,11 +2,12 @@
"node-name": "0123456789ABCDEF0123456789ABCDE",
"read-only": false,
"driver": "raw",
"file": {
"driver": "host_device",
"filename": "/dev/blah",
"node-name": "0123456789ABCDEF0123456789ABCDE",
"read-only": false,
"discard": "unmap"
}
"file": "0123456789ABCDEF0123456789ABCDE"
}
{
"driver": "host_device",
"filename": "/dev/blah",
"node-name": "0123456789ABCDEF0123456789ABCDE",
"read-only": false,
"discard": "unmap"
}
......@@ -6,17 +6,18 @@
"no-flush": false
},
"driver": "raw",
"file": {
"driver": "vvfat",
"dir": "/var/somefiles",
"floppy": false,
"rw": false,
"node-name": "node-s",
"cache": {
"direct": true,
"no-flush": false
},
"read-only": true,
"discard": "unmap"
}
"file": "node-s"
}
{
"driver": "vvfat",
"dir": "/var/somefiles",
"floppy": false,
"rw": false,
"node-name": "node-s",
"cache": {
"direct": true,
"no-flush": false
},
"read-only": true,
"discard": "unmap"
}
......@@ -2,13 +2,14 @@
"node-name": "node-f",
"read-only": true,
"driver": "raw",
"file": {
"driver": "vvfat",
"dir": "/var/somefiles",
"floppy": true,
"rw": false,
"node-name": "node-s",
"read-only": true,
"discard": "unmap"
}
"file": "node-s"
}
{
"driver": "vvfat",
"dir": "/var/somefiles",
"floppy": true,
"rw": false,
"node-name": "node-s",
"read-only": true,
"discard": "unmap"
}
......@@ -2,13 +2,14 @@
"node-name": "node-f",
"read-only": true,
"driver": "raw",
"file": {
"driver": "vvfat",
"dir": "/var/somefiles",
"floppy": false,
"rw": false,
"node-name": "node-s",
"read-only": true,
"discard": "unmap"
}
"file": "node-s"
}
{
"driver": "vvfat",
"dir": "/var/somefiles",
"floppy": false,
"rw": false,
"node-name": "node-s",
"read-only": true,
"discard": "unmap"
}
......@@ -2,61 +2,65 @@
"node-name": "node-a-f",
"read-only": false,
"driver": "qcow",
"file": {
"driver": "file",
"filename": "/var/lib/libvirt/images/a",
"aio": "threads",
"node-name": "node-a-s",
"read-only": false,
"discard": "unmap"
},
"file": "node-a-s",
"backing": "node-b-f"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/a",
"aio": "threads",
"node-name": "node-a-s",
"read-only": false,
"discard": "unmap"
}
{
"node-name": "node-b-f",
"read-only": true,
"driver": "qed",
"file": {
"driver": "file",
"filename": "/var/lib/libvirt/images/b",
"aio": "threads",
"node-name": "node-b-s",
"read-only": true,
"discard": "unmap"
},
"file": "node-b-s",
"backing": "node-c-f"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/b",
"aio": "threads",
"node-name": "node-b-s",
"read-only": true,
"discard": "unmap"
}
{
"node-name": "node-c-f",
"read-only": true,
"driver": "vmdk",
"file": {
"driver": "gluster",
"volume": "images",
"path": "c",
"server": [
{
"type": "inet",
"host": "test.org",
"port": "24007"
}
],
"node-name": "node-c-s",
"read-only": true,
"discard": "unmap"
},
"file": "node-c-s",
"backing": "node-d-f"
}
{
"driver": "gluster",
"volume": "images",
"path": "c",
"server": [
{
"type": "inet",
"host": "test.org",
"port": "24007"
}
],
"node-name": "node-c-s",
"read-only": true,
"discard": "unmap"
}
{
"node-name": "node-d-f",
"read-only": true,
"driver": "raw",
"file": {
"driver": "file",
"filename": "/var/lib/libvirt/images/d",
"aio": "threads",
"node-name": "node-d-s",
"read-only": true,
"discard": "unmap"
}
"file": "node-d-s"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/d",
"aio": "threads",
"node-name": "node-d-s",
"read-only": true,
"discard": "unmap"
}
......@@ -6,19 +6,20 @@
"no-flush": false
},
"driver": "qcow2",
"file": {
"driver": "file",
"filename": "/var/lib/libvirt/images/a",
"node-name": "node-a-s",
"cache": {
"direct": true,
"no-flush": false
},
"read-only": false,
"discard": "unmap"
},
"file": "node-a-s",
"backing": "node-b-f"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/a",
"node-name": "node-a-s",
"cache": {
"direct": true,
"no-flush": false
},
"read-only": false,
"discard": "unmap"
}
{
"node-name": "node-b-f",
"read-only": true,
......@@ -27,19 +28,20 @@
"no-flush": false
},
"driver": "qcow2",
"file": {
"driver": "file",
"filename": "/var/lib/libvirt/images/b",
"node-name": "node-b-s",
"cache": {
"direct": true,
"no-flush": false
},
"read-only": true,
"discard": "unmap"
},
"file": "node-b-s",
"backing": "node-c-f"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/b",
"node-name": "node-b-s",
"cache": {
"direct": true,
"no-flush": false
},
"read-only": true,
"discard": "unmap"
}
{
"node-name": "node-c-f",
"read-only": true,
......@@ -48,27 +50,28 @@
"no-flush": false
},
"driver": "qcow2",
"file": {
"driver": "gluster",
"volume": "images",
"path": "c",
"server": [
{
"type": "inet",
"host": "test.org",
"port": "24007"
}
],
"node-name": "node-c-s",
"cache": {
"direct": true,
"no-flush": false
},
"read-only": true,
"discard": "unmap"
},
"file": "node-c-s",
"backing": "node-d-f"
}
{
"driver": "gluster",
"volume": "images",
"path": "c",
"server": [
{
"type": "inet",
"host": "test.org",
"port": "24007"
}
],
"node-name": "node-c-s",
"cache": {
"direct": true,
"no-flush": false
},
"read-only": true,
"discard": "unmap"
}
{
"node-name": "node-d-f",
"read-only": true,
......@@ -77,15 +80,16 @@
"no-flush": false
},
"driver": "raw",
"file": {
"driver": "file",
"filename": "/var/lib/libvirt/images/d",
"node-name": "node-d-s",
"cache": {
"direct": true,
"no-flush": false
},
"read-only": true,
"discard": "unmap"
}
"file": "node-d-s"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/d",
"node-name": "node-d-s",
"cache": {
"direct": true,
"no-flush": false
},
"read-only": true,
"discard": "unmap"
}
......@@ -6,19 +6,20 @@
"no-flush": false
},
"driver": "qcow2",
"file": {
"driver": "file",
"filename": "/var/lib/libvirt/images/a",
"node-name": "node-a-s",
"cache": {
"direct": true,
"no-flush": false
},
"read-only": false,
"discard": "unmap"
},
"file": "node-a-s",
"backing": "node-b-f"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/a",
"node-name": "node-a-s",
"cache": {
"direct": true,
"no-flush": false
},
"read-only": false,
"discard": "unmap"
}
{
"node-name": "node-b-f",
"read-only": true,
......@@ -27,19 +28,20 @@
"no-flush": false
},
"driver": "qcow2",
"file": {
"driver": "file",
"filename": "/var/lib/libvirt/images/b",
"node-name": "node-b-s",
"cache": {
"direct": true,
"no-flush": false
},
"read-only": true,
"discard": "unmap"
},
"file": "node-b-s",
"backing": "node-c-f"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/b",
"node-name": "node-b-s",
"cache": {
"direct": true,
"no-flush": false
},
"read-only": true,
"discard": "unmap"
}
{
"node-name": "node-c-f",
"read-only": true,
......@@ -48,27 +50,28 @@
"no-flush": false
},
"driver": "qcow2",
"file": {
"driver": "gluster",
"volume": "images",
"path": "c",
"server": [
{
"type": "inet",
"host": "test.org",
"port": "24007"
}
],
"node-name": "node-c-s",
"cache": {
"direct": true,
"no-flush": false
},
"read-only": true,
"discard": "unmap"
},
"file": "node-c-s",
"backing": "node-d-f"
}
{
"driver": "gluster",
"volume": "images",
"path": "c",
"server": [
{
"type": "inet",
"host": "test.org",
"port": "24007"
}
],
"node-name": "node-c-s",
"cache": {
"direct": true,
"no-flush": false
},
"read-only": true,
"discard": "unmap"
}
{
"node-name": "node-d-f",
"read-only": true,
......@@ -77,15 +80,16 @@
"no-flush": false
},
"driver": "raw",
"file": {
"driver": "file",
"filename": "/var/lib/libvirt/images/d",
"node-name": "node-d-s",
"cache": {
"direct": true,
"no-flush": false
},
"read-only": true,
"discard": "unmap"
}
"file": "node-d-s"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/d",
"node-name": "node-d-s",
"cache": {
"direct": true,
"no-flush": false
},
"read-only": true,
"discard": "unmap"
}
......@@ -6,19 +6,20 @@
"no-flush": true
},
"driver": "qcow2",
"file": {
"driver": "file",
"filename": "/var/lib/libvirt/images/a",
"node-name": "node-a-s",
"cache": {
"direct": false,
"no-flush": true
},
"read-only": false,
"discard": "unmap"
},
"file": "node-a-s",
"backing": "node-b-f"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/a",
"node-name": "node-a-s",
"cache": {
"direct": false,
"no-flush": true
},
"read-only": false,
"discard": "unmap"
}
{
"node-name": "node-b-f",
"read-only": true,
......@@ -27,19 +28,20 @@
"no-flush": true
},
"driver": "qcow2",
"file": {
"driver": "file",
"filename": "/var/lib/libvirt/images/b",
"node-name": "node-b-s",
"cache": {
"direct": false,
"no-flush": true
},
"read-only": true,
"discard": "unmap"
},
"file": "node-b-s",
"backing": "node-c-f"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/b",
"node-name": "node-b-s",
"cache": {
"direct": false,
"no-flush": true
},
"read-only": true,
"discard": "unmap"
}
{
"node-name": "node-c-f",
"read-only": true,
......@@ -48,27 +50,28 @@
"no-flush": true
},
"driver": "qcow2",
"file": {
"driver": "gluster",
"volume": "images",
"path": "c",
"server": [
{
"type": "inet",
"host": "test.org",
"port": "24007"
}
],
"node-name": "node-c-s",
"cache": {
"direct": false,
"no-flush": true
},
"read-only": true,
"discard": "unmap"
},
"file": "node-c-s",
"backing": "node-d-f"
}
{
"driver": "gluster",
"volume": "images",
"path": "c",
"server": [
{
"type": "inet",
"host": "test.org",
"port": "24007"
}
],
"node-name": "node-c-s",
"cache": {
"direct": false,
"no-flush": true
},
"read-only": true,
"discard": "unmap"
}
{
"node-name": "node-d-f",
"read-only": true,
......@@ -77,15 +80,16 @@
"no-flush": true
},
"driver": "raw",
"file": {
"driver": "file",
"filename": "/var/lib/libvirt/images/d",
"node-name": "node-d-s",
"cache": {
"direct": false,
"no-flush": true
},
"read-only": true,
"discard": "unmap"
}
"file": "node-d-s"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/d",
"node-name": "node-d-s",
"cache": {
"direct": false,
"no-flush": true
},
"read-only": true,
"discard": "unmap"
}
......@@ -6,19 +6,20 @@
"no-flush": false
},
"driver": "qcow2",
"file": {
"driver": "file",
"filename": "/var/lib/libvirt/images/a",
"node-name": "node-a-s",
"cache": {
"direct": false,
"no-flush": false
},
"read-only": false,
"discard": "unmap"
},
"file": "node-a-s",
"backing": "node-b-f"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/a",
"node-name": "node-a-s",
"cache": {
"direct": false,
"no-flush": false
},
"read-only": false,
"discard": "unmap"
}
{
"node-name": "node-b-f",
"read-only": true,
......@@ -27,19 +28,20 @@
"no-flush": false
},
"driver": "qcow2",
"file": {
"driver": "file",
"filename": "/var/lib/libvirt/images/b",
"node-name": "node-b-s",
"cache": {
"direct": false,
"no-flush": false
},
"read-only": true,
"discard": "unmap"
},
"file": "node-b-s",
"backing": "node-c-f"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/b",
"node-name": "node-b-s",
"cache": {
"direct": false,
"no-flush": false
},
"read-only": true,
"discard": "unmap"
}
{
"node-name": "node-c-f",
"read-only": true,
......@@ -48,27 +50,28 @@
"no-flush": false
},
"driver": "qcow2",
"file": {
"driver": "gluster",
"volume": "images",
"path": "c",
"server": [
{
"type": "inet",
"host": "test.org",
"port": "24007"
}
],
"node-name": "node-c-s",
"cache": {
"direct": false,
"no-flush": false
},
"read-only": true,
"discard": "unmap"
},
"file": "node-c-s",
"backing": "node-d-f"
}
{
"driver": "gluster",
"volume": "images",
"path": "c",
"server": [
{
"type": "inet",
"host": "test.org",
"port": "24007"
}
],
"node-name": "node-c-s",
"cache": {
"direct": false,
"no-flush": false
},
"read-only": true,
"discard": "unmap"
}
{
"node-name": "node-d-f",
"read-only": true,
......@@ -77,15 +80,16 @@
"no-flush": false
},
"driver": "raw",
"file": {
"driver": "file",
"filename": "/var/lib/libvirt/images/d",
"node-name": "node-d-s",
"cache": {
"direct": false,
"no-flush": false
},
"read-only": true,
"discard": "unmap"
}
"file": "node-d-s"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/d",
"node-name": "node-d-s",
"cache": {
"direct": false,
"no-flush": false
},
"read-only": true,
"discard": "unmap"
}
......@@ -6,19 +6,20 @@
"no-flush": false
},
"driver": "qcow2",
"file": {
"driver": "file",
"filename": "/var/lib/libvirt/images/a",
"node-name": "node-a-s",
"cache": {
"direct": false,
"no-flush": false
},
"read-only": false,
"discard": "unmap"
},
"file": "node-a-s",
"backing": "node-b-f"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/a",
"node-name": "node-a-s",
"cache": {
"direct": false,
"no-flush": false
},
"read-only": false,
"discard": "unmap"
}
{
"node-name": "node-b-f",
"read-only": true,
......@@ -27,19 +28,20 @@
"no-flush": false
},
"driver": "qcow2",
"file": {
"driver": "file",
"filename": "/var/lib/libvirt/images/b",
"node-name": "node-b-s",
"cache": {
"direct": false,
"no-flush": false
},
"read-only": true,
"discard": "unmap"
},
"file": "node-b-s",
"backing": "node-c-f"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/b",
"node-name": "node-b-s",
"cache": {
"direct": false,
"no-flush": false
},
"read-only": true,
"discard": "unmap"
}
{
"node-name": "node-c-f",
"read-only": true,
......@@ -48,27 +50,28 @@
"no-flush": false
},
"driver": "qcow2",
"file": {
"driver": "gluster",
"volume": "images",
"path": "c",
"server": [
{
"type": "inet",
"host": "test.org",
"port": "24007"
}
],
"node-name": "node-c-s",
"cache": {
"direct": false,
"no-flush": false
},
"read-only": true,
"discard": "unmap"
},
"file": "node-c-s",
"backing": "node-d-f"
}
{
"driver": "gluster",
"volume": "images",
"path": "c",
"server": [
{
"type": "inet",
"host": "test.org",
"port": "24007"
}
],
"node-name": "node-c-s",
"cache": {
"direct": false,
"no-flush": false
},
"read-only": true,
"discard": "unmap"
}
{
"node-name": "node-d-f",
"read-only": true,
......@@ -77,15 +80,16 @@
"no-flush": false
},
"driver": "raw",
"file": {
"driver": "file",
"filename": "/var/lib/libvirt/images/d",
"node-name": "node-d-s",
"cache": {
"direct": false,
"no-flush": false
},
"read-only": true,
"discard": "unmap"
}
"file": "node-d-s"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/d",
"node-name": "node-d-s",
"cache": {
"direct": false,
"no-flush": false
},
"read-only": true,
"discard": "unmap"
}
......@@ -3,58 +3,62 @@
"read-only": false,
"detect-zeroes": "on",
"driver": "qcow",
"file": {
"driver": "file",
"filename": "/var/lib/libvirt/images/a",
"node-name": "node-a-s",
"read-only": false,
"discard": "unmap"
},
"file": "node-a-s",
"backing": "node-b-f"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/a",
"node-name": "node-a-s",
"read-only": false,
"discard": "unmap"
}
{
"node-name": "node-b-f",
"read-only": true,
"driver": "qed",
"file": {
"driver": "file",
"filename": "/var/lib/libvirt/images/b",
"node-name": "node-b-s",
"read-only": true,
"discard": "unmap"
},
"file": "node-b-s",
"backing": "node-c-f"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/b",
"node-name": "node-b-s",
"read-only": true,
"discard": "unmap"
}
{
"node-name": "node-c-f",
"read-only": true,
"driver": "vmdk",
"file": {
"driver": "gluster",
"volume": "images",
"path": "c",
"server": [
{
"type": "inet",
"host": "test.org",
"port": "24007"
}
],
"node-name": "node-c-s",
"read-only": true,
"discard": "unmap"
},
"file": "node-c-s",
"backing": "node-d-f"
}
{
"driver": "gluster",
"volume": "images",
"path": "c",
"server": [
{
"type": "inet",
"host": "test.org",
"port": "24007"
}
],
"node-name": "node-c-s",
"read-only": true,
"discard": "unmap"
}
{
"node-name": "node-d-f",
"read-only": true,
"driver": "raw",
"file": {
"driver": "file",
"filename": "/var/lib/libvirt/images/d",
"node-name": "node-d-s",
"read-only": true,
"discard": "unmap"
}
"file": "node-d-s"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/d",
"node-name": "node-d-s",
"read-only": true,
"discard": "unmap"
}
......@@ -2,50 +2,54 @@
"node-name": "node-a-f",
"read-only": false,
"driver": "qed",
"file": {
"driver": "file",
"filename": "/var/lib/libvirt/images/a",
"node-name": "node-a-s",
"read-only": false,
"discard": "unmap"
},
"file": "node-a-s",
"backing": "node-b-f"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/a",
"node-name": "node-a-s",
"read-only": false,
"discard": "unmap"
}
{
"node-name": "node-b-f",
"read-only": true,
"driver": "qcow",
"file": {
"driver": "file",
"filename": "/var/lib/libvirt/images/b",
"node-name": "node-b-s",
"read-only": true,
"discard": "unmap"
},
"file": "node-b-s",
"backing": "node-c-f"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/b",
"node-name": "node-b-s",
"read-only": true,
"discard": "unmap"
}
{
"node-name": "node-c-f",
"read-only": true,
"driver": "vmdk",
"file": {
"driver": "file",
"filename": "/var/lib/libvirt/images/c",
"node-name": "node-c-s",
"read-only": true,
"discard": "unmap"
},
"file": "node-c-s",
"backing": "node-d-f"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/c",
"node-name": "node-c-s",
"read-only": true,
"discard": "unmap"
}
{
"node-name": "node-d-f",
"read-only": true,
"driver": "raw",
"file": {
"driver": "file",
"filename": "/var/lib/libvirt/images/d",
"node-name": "node-d-s",
"read-only": true,
"discard": "unmap"
}
"file": "node-d-s"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/d",
"node-name": "node-d-s",
"read-only": true,
"discard": "unmap"
}
......@@ -4,61 +4,65 @@
"discard": "unmap",
"detect-zeroes": "unmap",
"driver": "qcow",
"file": {
"driver": "file",
"filename": "/var/lib/libvirt/images/a",
"node-name": "node-a-s",
"read-only": false,
"discard": "unmap"
},
"file": "node-a-s",
"backing": "node-b-f"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/a",
"node-name": "node-a-s",
"read-only": false,
"discard": "unmap"
}
{
"node-name": "node-b-f",
"read-only": true,
"discard": "unmap",
"driver": "qed",
"file": {
"driver": "file",
"filename": "/var/lib/libvirt/images/b",
"node-name": "node-b-s",
"read-only": true,
"discard": "unmap"
},
"file": "node-b-s",
"backing": "node-c-f"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/b",
"node-name": "node-b-s",
"read-only": true,
"discard": "unmap"
}
{
"node-name": "node-c-f",
"read-only": true,
"discard": "unmap",
"driver": "vmdk",
"file": {
"driver": "gluster",
"volume": "images",
"path": "c",
"server": [
{
"type": "inet",
"host": "test.org",
"port": "24007"
}
],
"node-name": "node-c-s",
"read-only": true,
"discard": "unmap"
},
"file": "node-c-s",
"backing": "node-d-f"
}
{
"driver": "gluster",
"volume": "images",
"path": "c",
"server": [
{
"type": "inet",
"host": "test.org",
"port": "24007"
}
],
"node-name": "node-c-s",
"read-only": true,
"discard": "unmap"
}
{
"node-name": "node-d-f",
"read-only": true,
"discard": "unmap",
"driver": "raw",
"file": {
"driver": "file",
"filename": "/var/lib/libvirt/images/d",
"node-name": "node-d-s",
"read-only": true,
"discard": "unmap"
}
"file": "node-d-s"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/d",
"node-name": "node-d-s",
"read-only": true,
"discard": "unmap"
}
......@@ -4,61 +4,65 @@
"discard": "ignore",
"detect-zeroes": "on",
"driver": "qcow",
"file": {
"driver": "file",
"filename": "/var/lib/libvirt/images/a",
"node-name": "node-a-s",
"read-only": false,
"discard": "unmap"
},
"file": "node-a-s",
"backing": "node-b-f"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/a",
"node-name": "node-a-s",
"read-only": false,
"discard": "unmap"
}
{
"node-name": "node-b-f",
"read-only": true,
"discard": "ignore",
"driver": "qed",
"file": {
"driver": "file",
"filename": "/var/lib/libvirt/images/b",
"node-name": "node-b-s",
"read-only": true,
"discard": "unmap"
},
"file": "node-b-s",
"backing": "node-c-f"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/b",
"node-name": "node-b-s",
"read-only": true,
"discard": "unmap"
}
{
"node-name": "node-c-f",
"read-only": true,
"discard": "ignore",
"driver": "vmdk",
"file": {
"driver": "gluster",
"volume": "images",
"path": "c",
"server": [
{
"type": "inet",
"host": "test.org",
"port": "24007"
}
],
"node-name": "node-c-s",
"read-only": true,
"discard": "unmap"
},
"file": "node-c-s",
"backing": "node-d-f"
}
{
"driver": "gluster",
"volume": "images",
"path": "c",
"server": [
{
"type": "inet",
"host": "test.org",
"port": "24007"
}
],
"node-name": "node-c-s",
"read-only": true,
"discard": "unmap"
}
{
"node-name": "node-d-f",
"read-only": true,
"discard": "ignore",
"driver": "raw",
"file": {
"driver": "file",
"filename": "/var/lib/libvirt/images/d",
"node-name": "node-d-s",
"read-only": true,
"discard": "unmap"
}
"file": "node-d-s"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/d",
"node-name": "node-d-s",
"read-only": true,
"discard": "unmap"
}
......@@ -3,61 +3,65 @@
"read-only": false,
"discard": "unmap",
"driver": "qcow",
"file": {
"driver": "file",
"filename": "/var/lib/libvirt/images/a",
"node-name": "node-a-s",
"read-only": false,
"discard": "unmap"
},
"file": "node-a-s",
"backing": "node-b-f"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/a",
"node-name": "node-a-s",
"read-only": false,
"discard": "unmap"
}
{
"node-name": "node-b-f",
"read-only": true,
"discard": "unmap",
"driver": "qed",
"file": {
"driver": "file",
"filename": "/var/lib/libvirt/images/b",
"node-name": "node-b-s",
"read-only": true,
"discard": "unmap"
},
"file": "node-b-s",
"backing": "node-c-f"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/b",
"node-name": "node-b-s",
"read-only": true,
"discard": "unmap"
}
{
"node-name": "node-c-f",
"read-only": true,
"discard": "unmap",
"driver": "vmdk",
"file": {
"driver": "gluster",
"volume": "images",
"path": "c",
"server": [
{
"type": "inet",
"host": "test.org",
"port": "24007"
}
],
"node-name": "node-c-s",
"read-only": true,
"discard": "unmap"
},
"file": "node-c-s",
"backing": "node-d-f"
}
{
"driver": "gluster",
"volume": "images",
"path": "c",
"server": [
{
"type": "inet",
"host": "test.org",
"port": "24007"
}
],
"node-name": "node-c-s",
"read-only": true,
"discard": "unmap"
}
{
"node-name": "node-d-f",
"read-only": true,
"discard": "unmap",
"driver": "raw",
"file": {
"driver": "file",
"filename": "/var/lib/libvirt/images/d",
"node-name": "node-d-s",
"read-only": true,
"discard": "unmap"
}
"file": "node-d-s"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/d",
"node-name": "node-d-s",
"read-only": true,
"discard": "unmap"
}
......@@ -2,11 +2,12 @@
"node-name": "test1",
"read-only": false,
"driver": "bochs",
"file": {
"driver": "file",
"filename": "/path/to/i.img",
"node-name": "test2",
"read-only": false,
"discard": "unmap"
}
"file": "test2"
}
{
"driver": "file",
"filename": "/path/to/i.img",
"node-name": "test2",
"read-only": false,
"discard": "unmap"
}
......@@ -2,11 +2,12 @@
"node-name": "test1",
"read-only": false,
"driver": "cloop",
"file": {
"driver": "file",
"filename": "/path/to/i.img",
"node-name": "test2",
"read-only": false,
"discard": "unmap"
}
"file": "test2"
}
{
"driver": "file",
"filename": "/path/to/i.img",
"node-name": "test2",
"read-only": false,
"discard": "unmap"
}
......@@ -2,11 +2,12 @@
"node-name": "test1",
"read-only": false,
"driver": "dmg",
"file": {
"driver": "file",
"filename": "/path/to/i.img",
"node-name": "test2",
"read-only": false,
"discard": "unmap"
}
"file": "test2"
}
{
"driver": "file",
"filename": "/path/to/i.img",
"node-name": "test2",
"read-only": false,
"discard": "unmap"
}
......@@ -2,11 +2,12 @@
"node-name": "test1",
"read-only": false,
"driver": "parallels",
"file": {
"driver": "file",
"filename": "/path/to/i.img",
"node-name": "test2",
"read-only": false,
"discard": "unmap"
}
"file": "test2"
}
{
"driver": "file",
"filename": "/path/to/i.img",
"node-name": "test2",
"read-only": false,
"discard": "unmap"
}
......@@ -6,15 +6,16 @@
"format": "luks",
"key-secret": "node-b-f-encalias"
},
"file": {
"driver": "file",
"filename": "/var/lib/libvirt/images/a",
"node-name": "node-a-s",
"read-only": false,
"discard": "unmap"
},
"file": "node-a-s",
"backing": "node-b-f"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/a",
"node-name": "node-a-s",
"read-only": false,
"discard": "unmap"
}
{
"node-name": "node-b-f",
"read-only": true,
......@@ -23,12 +24,13 @@
"format": "aes",
"key-secret": "node-b-f-encalias"
},
"file": {
"driver": "file",
"filename": "/var/lib/libvirt/images/b",
"node-name": "node-b-s",
"read-only": true,
"discard": "unmap"
},
"file": "node-b-s",
"backing": null
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/b",
"node-name": "node-b-s",
"read-only": true,
"discard": "unmap"
}
......@@ -2,129 +2,139 @@
"node-name": "#block126",
"read-only": false,
"driver": "qcow2",
"file": {
"driver": "file",
"filename": "/var/lib/libvirt/images/rhel7.3.1507297895",
"node-name": "#block004",
"read-only": false,
"discard": "unmap"
},
"file": "#block004",
"backing": "#block313"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/rhel7.3.1507297895",
"node-name": "#block004",
"read-only": false,
"discard": "unmap"
}
{
"node-name": "#block313",
"read-only": true,
"driver": "qcow2",
"file": {
"driver": "file",
"filename": "/var/lib/libvirt/images/rhel7.3.1484071872",
"node-name": "#block256",
"read-only": true,
"discard": "unmap"
},
"file": "#block256",
"backing": "#block556"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/rhel7.3.1484071872",
"node-name": "#block256",
"read-only": true,
"discard": "unmap"
}
{
"node-name": "#block556",
"read-only": true,
"driver": "qcow2",
"file": {
"driver": "file",
"filename": "/var/lib/libvirt/images/rhel7.3.1483615252",
"node-name": "#block418",
"read-only": true,
"discard": "unmap"
},
"file": "#block418",
"backing": "#block767"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/rhel7.3.1483615252",
"node-name": "#block418",
"read-only": true,
"discard": "unmap"
}
{
"node-name": "#block767",
"read-only": true,
"driver": "qcow2",
"file": {
"driver": "file",
"filename": "/var/lib/libvirt/images/rhel7.3.1483605924",
"node-name": "#block624",
"read-only": true,
"discard": "unmap"
},
"file": "#block624",
"backing": "#block937"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/rhel7.3.1483605924",
"node-name": "#block624",
"read-only": true,
"discard": "unmap"
}
{
"node-name": "#block937",
"read-only": true,
"driver": "qcow2",
"file": {
"driver": "file",
"filename": "/var/lib/libvirt/images/rhel7.3.1483605920",
"node-name": "#block869",
"read-only": true,
"discard": "unmap"
},
"file": "#block869",
"backing": "#block1157"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/rhel7.3.1483605920",
"node-name": "#block869",
"read-only": true,
"discard": "unmap"
}
{
"node-name": "#block1157",
"read-only": true,
"driver": "qcow2",
"file": {
"driver": "file",
"filename": "/var/lib/libvirt/images/rhel7.3.1483546244",
"node-name": "#block1047",
"read-only": true,
"discard": "unmap"
},
"file": "#block1047",
"backing": "#block1392"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/rhel7.3.1483546244",
"node-name": "#block1047",
"read-only": true,
"discard": "unmap"
}
{
"node-name": "#block1392",
"read-only": true,
"driver": "qcow2",
"file": {
"driver": "file",
"filename": "/var/lib/libvirt/images/rhel7.3.1483545901",
"node-name": "#block1279",
"read-only": true,
"discard": "unmap"
},
"file": "#block1279",
"backing": "#block1523"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/rhel7.3.1483545901",
"node-name": "#block1279",
"read-only": true,
"discard": "unmap"
}
{
"node-name": "#block1523",
"read-only": true,
"driver": "qcow2",
"file": {
"driver": "file",
"filename": "/var/lib/libvirt/images/rhel7.3.1483545313",
"node-name": "#block1444",
"read-only": true,
"discard": "unmap"
},
"file": "#block1444",
"backing": "#block1742"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/rhel7.3.1483545313",
"node-name": "#block1444",
"read-only": true,
"discard": "unmap"
}
{
"node-name": "#block1742",
"read-only": true,
"driver": "qcow2",
"file": {
"driver": "file",
"filename": "/var/lib/libvirt/images/rhel7.3.1483536402",
"node-name": "#block1602",
"read-only": true,
"discard": "unmap"
},
"file": "#block1602",
"backing": "#block1909"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/rhel7.3.1483536402",
"node-name": "#block1602",
"read-only": true,
"discard": "unmap"
}
{
"node-name": "#block1909",
"read-only": true,
"driver": "qcow2",
"file": {
"driver": "file",
"filename": "/var/lib/libvirt/images/rhel7.3.qcow2",
"node-name": "#block1864",
"read-only": true,
"discard": "unmap"
},
"file": "#block1864",
"backing": null
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/rhel7.3.qcow2",
"node-name": "#block1864",
"read-only": true,
"discard": "unmap"
}
......@@ -2,24 +2,26 @@
"node-name": "#block126",
"read-only": false,
"driver": "qcow2",
"file": {
"driver": "file",
"filename": "/var/lib/libvirt/images/rhel7.3.1507297895",
"node-name": "#block004",
"read-only": false,
"discard": "unmap"
},
"file": "#block004",
"backing": "#block313"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/rhel7.3.1507297895",
"node-name": "#block004",
"read-only": false,
"discard": "unmap"
}
{
"node-name": "#block313",
"read-only": true,
"driver": "qcow2",
"file": {
"driver": "file",
"filename": "/var/lib/libvirt/images/rhel7.3.1484071872",
"node-name": "#block256",
"read-only": true,
"discard": "unmap"
}
"file": "#block256"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/rhel7.3.1484071872",
"node-name": "#block256",
"read-only": true,
"discard": "unmap"
}
......@@ -6,16 +6,17 @@
"no-flush": false
},
"driver": "raw",
"file": {
"driver": "file",
"filename": "/path/to/i.img",
"aio": "native",
"node-name": "test2",
"cache": {
"direct": true,
"no-flush": false
},
"read-only": false,
"discard": "unmap"
}
"file": "test2"
}
{
"driver": "file",
"filename": "/path/to/i.img",
"aio": "native",
"node-name": "test2",
"cache": {
"direct": true,
"no-flush": false
},
"read-only": false,
"discard": "unmap"
}
......@@ -3,11 +3,12 @@
"read-only": false,
"driver": "luks",
"key-secret": "test1-encalias",
"file": {
"driver": "file",
"filename": "/path/luks.img",
"node-name": "test2",
"read-only": false,
"discard": "unmap"
}
"file": "test2"
}
{
"driver": "file",
"filename": "/path/luks.img",
"node-name": "test2",
"read-only": false,
"discard": "unmap"
}
......@@ -2,11 +2,12 @@
"node-name": "0123456789ABCDEF0123456789ABCDE",
"read-only": false,
"driver": "raw",
"file": {
"driver": "file",
"filename": "/var/lib/libvirt/images/i.img",
"node-name": "0123456789ABCDEF0123456789ABCDE",
"read-only": false,
"discard": "unmap"
}
"file": "0123456789ABCDEF0123456789ABCDE"
}
{
"driver": "file",
"filename": "/var/lib/libvirt/images/i.img",
"node-name": "0123456789ABCDEF0123456789ABCDE",
"read-only": false,
"discard": "unmap"
}
......@@ -2,11 +2,12 @@
"node-name": "test1",
"read-only": false,
"driver": "vdi",
"file": {
"driver": "file",
"filename": "/path/to/i.img",
"node-name": "test2",
"read-only": false,
"discard": "unmap"
}
"file": "test2"
}
{
"driver": "file",
"filename": "/path/to/i.img",
"node-name": "test2",
"read-only": false,
"discard": "unmap"
}
......@@ -2,11 +2,12 @@
"node-name": "test1",
"read-only": false,
"driver": "vhdx",
"file": {
"driver": "file",
"filename": "/path/to/i.img",
"node-name": "test2",
"read-only": false,
"discard": "unmap"
}
"file": "test2"
}
{
"driver": "file",
"filename": "/path/to/i.img",
"node-name": "test2",
"read-only": false,
"discard": "unmap"
}
......@@ -2,11 +2,12 @@
"node-name": "test1",
"read-only": false,
"driver": "vpc",
"file": {
"driver": "file",
"filename": "/path/to/i.img",
"node-name": "test2",
"read-only": false,
"discard": "unmap"
}
"file": "test2"
}
{
"driver": "file",
"filename": "/path/to/i.img",
"node-name": "test2",
"read-only": false,
"discard": "unmap"
}
......@@ -6,30 +6,31 @@
"no-flush": true
},
"driver": "qcow2",
"file": {
"driver": "rbd",
"pool": "rbdpool",
"image": "rbdimg",
"server": [
{
"host": "host1.example.com",
"port": "0"
},
{
"host": "host2.example.com",
"port": "0"
}
],
"user": "testuser-rbd",
"node-name": "node-a-s",
"cache": {
"direct": false,
"no-flush": true
"file": "node-a-s",
"backing": "node-b-f"
}
{
"driver": "rbd",
"pool": "rbdpool",
"image": "rbdimg",
"server": [
{
"host": "host1.example.com",
"port": "0"
},
"read-only": false,
"discard": "unmap"
{
"host": "host2.example.com",
"port": "0"
}
],
"user": "testuser-rbd",
"node-name": "node-a-s",
"cache": {
"direct": false,
"no-flush": true
},
"backing": "node-b-f"
"read-only": false,
"discard": "unmap"
}
{
"node-name": "node-b-f",
......@@ -39,19 +40,20 @@
"no-flush": true
},
"driver": "qcow2",
"file": {
"driver": "iscsi",
"portal": "example.org:3260",
"target": "iscsitarget",
"lun": 1,
"transport": "tcp",
"node-name": "node-b-s",
"cache": {
"direct": false,
"no-flush": true
},
"read-only": true,
"discard": "unmap"
},
"file": "node-b-s",
"backing": null
}
{
"driver": "iscsi",
"portal": "example.org:3260",
"target": "iscsitarget",
"lun": 1,
"transport": "tcp",
"node-name": "node-b-s",
"cache": {
"direct": false,
"no-flush": true
},
"read-only": true,
"discard": "unmap"
}
......@@ -6,27 +6,28 @@
"format": "luks",
"key-secret": "node-b-f-encalias"
},
"file": {
"driver": "rbd",
"pool": "rbdpool",
"image": "rbdimg",
"server": [
{
"host": "host1.example.com",
"port": "0"
},
{
"host": "host2.example.com",
"port": "0"
}
],
"user": "testuser-rbd",
"node-name": "node-a-s",
"read-only": false,
"discard": "unmap"
},
"file": "node-a-s",
"backing": "node-b-f"
}
{
"driver": "rbd",
"pool": "rbdpool",
"image": "rbdimg",
"server": [
{
"host": "host1.example.com",
"port": "0"
},
{
"host": "host2.example.com",
"port": "0"
}
],
"user": "testuser-rbd",
"node-name": "node-a-s",
"read-only": false,
"discard": "unmap"
}
{
"node-name": "node-b-f",
"read-only": true,
......@@ -35,17 +36,18 @@
"format": "aes",
"key-secret": "node-b-f-encalias"
},
"file": {
"driver": "iscsi",
"portal": "example.org:3260",
"target": "iqn.2016-09.com.example:iscsitarget",
"lun": 1,
"transport": "tcp",
"user": "testuser-iscsi",
"password-secret": "node-b-s-secalias",
"node-name": "node-b-s",
"read-only": true,
"discard": "unmap"
},
"file": "node-b-s",
"backing": null
}
{
"driver": "iscsi",
"portal": "example.org:3260",
"target": "iqn.2016-09.com.example:iscsitarget",
"lun": 1,
"transport": "tcp",
"user": "testuser-iscsi",
"password-secret": "node-b-s-secalias",
"node-name": "node-b-s",
"read-only": true,
"discard": "unmap"
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册