1 --- Implicit backing file ---
3 {"execute": "blockdev-add", "arguments": {"driver": "IMGFMT", "file": {"driver": "file", "filename": "TEST_DIR/PID-top.img"}, "node-name": "node0"}}
6 bs->filename: TEST_DIR/PID-top.img
7 bs->backing_file: file:TEST_DIR/PID-base.img
8 bs->backing->bs->filename: TEST_DIR/PID-base.img
10 {"execute": "blockdev-del", "arguments": {"node-name": "node0"}}
13 --- change-backing-file ---
15 {"execute": "blockdev-add", "arguments": {"driver": "IMGFMT", "file": {"driver": "file", "filename": "TEST_DIR/PID-top.img"}, "node-name": "node0"}}
17 {"execute": "change-backing-file", "arguments": {"backing-file": "null-co://", "device": "node0", "image-node-name": "node0"}}
20 bs->filename: json:{"backing": {"driver": "IMGFMT", "file": {"driver": "file", "filename": "TEST_DIR/PID-base.img"}}, "driver": "IMGFMT", "file": {"driver": "file", "filename": "TEST_DIR/PID-top.img"}}
21 bs->backing_file: null-co://
22 bs->backing->bs->filename: TEST_DIR/PID-base.img
24 {"execute": "change-backing-file", "arguments": {"backing-file": "TEST_DIR/PID-base.img", "device": "node0", "image-node-name": "node0"}}
27 bs->filename: TEST_DIR/PID-top.img
28 bs->backing_file: TEST_DIR/PID-base.img
29 bs->backing->bs->filename: TEST_DIR/PID-base.img
31 {"execute": "change-backing-file", "arguments": {"backing-file": "file:TEST_DIR/PID-base.img", "device": "node0", "image-node-name": "node0"}}
34 bs->filename: json:{"backing": {"driver": "IMGFMT", "file": {"driver": "file", "filename": "TEST_DIR/PID-base.img"}}, "driver": "IMGFMT", "file": {"driver": "file", "filename": "TEST_DIR/PID-top.img"}}
35 bs->backing_file: file:TEST_DIR/PID-base.img
36 bs->backing->bs->filename: TEST_DIR/PID-base.img
38 {"execute": "blockdev-del", "arguments": {"node-name": "node0"}}
40 {"execute": "blockdev-add", "arguments": {"driver": "IMGFMT", "file": {"driver": "file", "filename": "TEST_DIR/PID-top.img"}, "node-name": "node0"}}
43 bs->filename: TEST_DIR/PID-top.img
44 bs->backing_file: file:TEST_DIR/PID-base.img
45 bs->backing->bs->filename: TEST_DIR/PID-base.img
47 {"execute": "blockdev-del", "arguments": {"node-name": "node0"}}
50 --- Override backing file ---
52 {"execute": "blockdev-add", "arguments": {"driver": "null-co", "node-name": "null"}}
54 {"execute": "blockdev-add", "arguments": {"backing": "null", "driver": "IMGFMT", "file": {"driver": "file", "filename": "TEST_DIR/PID-top.img"}, "node-name": "node0"}}
57 bs->filename: json:{"backing": {"driver": "null-co"}, "driver": "IMGFMT", "file": {"driver": "file", "filename": "TEST_DIR/PID-top.img"}}
58 bs->backing_file: TEST_DIR/PID-base.img
59 bs->backing->bs->filename: null-co://
61 {"execute": "blockdev-del", "arguments": {"node-name": "node0"}}
63 {"execute": "blockdev-del", "arguments": {"node-name": "null"}}
65 {"execute": "blockdev-add", "arguments": {"backing": null, "driver": "IMGFMT", "file": {"driver": "file", "filename": "TEST_DIR/PID-top.img"}, "node-name": "node0"}}
68 bs->filename: json:{"backing": null, "driver": "IMGFMT", "file": {"driver": "file", "filename": "TEST_DIR/PID-top.img"}}
69 bs->backing_file: TEST_DIR/PID-base.img
72 {"execute": "blockdev-add", "arguments": {"driver": "IMGFMT", "file": {"driver": "file", "filename": "TEST_DIR/PID-base.img"}, "node-name": "original-backing"}}
74 {"execute": "blockdev-snapshot", "arguments": {"node": "original-backing", "overlay": "node0"}}
77 bs->filename: TEST_DIR/PID-top.img
78 bs->backing_file: TEST_DIR/PID-base.img
79 bs->backing->bs->filename: TEST_DIR/PID-base.img
81 {"execute": "blockdev-del", "arguments": {"node-name": "node0"}}
83 {"execute": "blockdev-del", "arguments": {"node-name": "original-backing"}}