1 QA output created by 223
3 === Create partially sparse image, then add dirty bitmaps ===
5 Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=4194304
6 wrote 2097152/2097152 bytes at offset 1048576
7 2 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
15 {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}}
18 === Write part of the file under active bitmap ===
20 wrote 512/512 bytes at offset 512
21 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
22 wrote 2097152/2097152 bytes at offset 2097152
23 2 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
25 === End dirty bitmaps, and start serving image over NBD ===
27 {"execute":"qmp_capabilities"}
29 {"execute":"blockdev-add", "arguments":{"driver":"IMGFMT", "node-name":"n", "file":{"driver":"file", "filename":"TEST_DIR/t.IMGFMT"}}}
31 {"execute":"block-dirty-bitmap-disable", "arguments":{"node":"n", "name":"b"}}
34 === Set up NBD with normal access ===
36 {"execute":"nbd-server-add", "arguments":{"device":"n"}}
37 {"error": {"class": "GenericError", "desc": "NBD server not running"}}
38 {"execute":"nbd-server-start", "arguments":{"addr":{"type":"unix", "data":{"path":"SOCK_DIR/nbd"}}}}
40 {"execute":"nbd-server-start", "arguments":{"addr":{"type":"unix", "data":{"path":"SOCK_DIR/nbd1"}}}}
41 {"error": {"class": "GenericError", "desc": "NBD server already running"}}
43 {"execute":"nbd-server-add", "arguments":{"device":"n", "bitmap":"b"}}
45 {"execute":"nbd-server-add", "arguments":{"device":"nosuch"}}
46 {"error": {"class": "GenericError", "desc": "Cannot find device=nosuch nor node_name=nosuch"}}
47 {"execute":"nbd-server-add", "arguments":{"device":"n"}}
48 {"error": {"class": "GenericError", "desc": "Block export id 'n' is already in use"}}
49 {"execute":"nbd-server-add", "arguments":{"device":"n", "name":"n2", "bitmap":"b2"}}
50 {"error": {"class": "GenericError", "desc": "Enabled bitmap 'b2' incompatible with readonly export"}}
51 {"execute":"nbd-server-add", "arguments":{"device":"n", "name":"n2", "bitmap":"b3"}}
52 {"error": {"class": "GenericError", "desc": "Bitmap 'b3' is not found"}}
53 {"execute":"nbd-server-add", "arguments":{"device":"n", "name":"n2", "writable":true, "description":"some text", "bitmap":"b2"}}
58 flags: 0x58f ( readonly flush fua df multi cache )
62 available meta contexts: 2
66 description: some text
68 flags: 0xced ( flush fua trim zeroes df cache fast-zero )
72 available meta contexts: 2
76 === Contrast normal status to large granularity dirty-bitmap ===
78 read 512/512 bytes at offset 512
79 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
80 read 524288/524288 bytes at offset 524288
81 512 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
82 read 1048576/1048576 bytes at offset 1048576
83 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
84 read 2097152/2097152 bytes at offset 2097152
85 2 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
86 [{ "start": 0, "length": 4096, "depth": 0, "zero": false, "data": true, "offset": OFFSET},
87 { "start": 4096, "length": 1044480, "depth": 0, "zero": true, "data": false, "offset": OFFSET},
88 { "start": 1048576, "length": 3145728, "depth": 0, "zero": false, "data": true, "offset": OFFSET}]
89 [{ "start": 0, "length": 65536, "depth": 0, "zero": false, "data": false},
90 { "start": 65536, "length": 2031616, "depth": 0, "zero": false, "data": true, "offset": OFFSET},
91 { "start": 2097152, "length": 2097152, "depth": 0, "zero": false, "data": false}]
93 === Contrast to small granularity dirty-bitmap ===
95 [{ "start": 0, "length": 512, "depth": 0, "zero": false, "data": true, "offset": OFFSET},
96 { "start": 512, "length": 512, "depth": 0, "zero": false, "data": false},
97 { "start": 1024, "length": 2096128, "depth": 0, "zero": false, "data": true, "offset": OFFSET},
98 { "start": 2097152, "length": 2097152, "depth": 0, "zero": false, "data": false}]
100 === End qemu NBD server ===
102 {"execute":"nbd-server-remove", "arguments":{"name":"n"}}
104 {"execute":"nbd-server-remove", "arguments":{"name":"n2"}}
105 {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_EXPORT_DELETED", "data": {"id": "n"}}
107 {"execute":"nbd-server-remove", "arguments":{"name":"n2"}}
108 {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_EXPORT_DELETED", "data": {"id": "n2"}}
109 {"error": {"class": "GenericError", "desc": "Export 'n2' is not found"}}
110 {"execute":"nbd-server-stop"}
112 {"execute":"nbd-server-stop"}
113 {"error": {"class": "GenericError", "desc": "NBD server not running"}}
115 === Set up NBD with iothread access ===
117 {"execute":"x-blockdev-set-iothread", "arguments":{"node-name":"n", "iothread":"io0"}}
119 {"execute":"nbd-server-add", "arguments":{"device":"n"}}
120 {"error": {"class": "GenericError", "desc": "NBD server not running"}}
121 {"execute":"nbd-server-start", "arguments":{"addr":{"type":"unix", "data":{"path":"SOCK_DIR/nbd"}}}}
123 {"execute":"nbd-server-start", "arguments":{"addr":{"type":"unix", "data":{"path":"SOCK_DIR/nbd1"}}}}
124 {"error": {"class": "GenericError", "desc": "NBD server already running"}}
126 {"execute":"nbd-server-add", "arguments":{"device":"n", "bitmap":"b"}}
128 {"execute":"nbd-server-add", "arguments":{"device":"nosuch"}}
129 {"error": {"class": "GenericError", "desc": "Cannot find device=nosuch nor node_name=nosuch"}}
130 {"execute":"nbd-server-add", "arguments":{"device":"n"}}
131 {"error": {"class": "GenericError", "desc": "Block export id 'n' is already in use"}}
132 {"execute":"nbd-server-add", "arguments":{"device":"n", "name":"n2", "bitmap":"b2"}}
133 {"error": {"class": "GenericError", "desc": "Enabled bitmap 'b2' incompatible with readonly export"}}
134 {"execute":"nbd-server-add", "arguments":{"device":"n", "name":"n2", "bitmap":"b3"}}
135 {"error": {"class": "GenericError", "desc": "Bitmap 'b3' is not found"}}
136 {"execute":"nbd-server-add", "arguments":{"device":"n", "name":"n2", "writable":true, "description":"some text", "bitmap":"b2"}}
141 flags: 0x58f ( readonly flush fua df multi cache )
145 available meta contexts: 2
149 description: some text
151 flags: 0xced ( flush fua trim zeroes df cache fast-zero )
155 available meta contexts: 2
159 === Contrast normal status to large granularity dirty-bitmap ===
161 read 512/512 bytes at offset 512
162 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
163 read 524288/524288 bytes at offset 524288
164 512 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
165 read 1048576/1048576 bytes at offset 1048576
166 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
167 read 2097152/2097152 bytes at offset 2097152
168 2 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
169 [{ "start": 0, "length": 4096, "depth": 0, "zero": false, "data": true, "offset": OFFSET},
170 { "start": 4096, "length": 1044480, "depth": 0, "zero": true, "data": false, "offset": OFFSET},
171 { "start": 1048576, "length": 3145728, "depth": 0, "zero": false, "data": true, "offset": OFFSET}]
172 [{ "start": 0, "length": 65536, "depth": 0, "zero": false, "data": false},
173 { "start": 65536, "length": 2031616, "depth": 0, "zero": false, "data": true, "offset": OFFSET},
174 { "start": 2097152, "length": 2097152, "depth": 0, "zero": false, "data": false}]
176 === Contrast to small granularity dirty-bitmap ===
178 [{ "start": 0, "length": 512, "depth": 0, "zero": false, "data": true, "offset": OFFSET},
179 { "start": 512, "length": 512, "depth": 0, "zero": false, "data": false},
180 { "start": 1024, "length": 2096128, "depth": 0, "zero": false, "data": true, "offset": OFFSET},
181 { "start": 2097152, "length": 2097152, "depth": 0, "zero": false, "data": false}]
183 === End qemu NBD server ===
185 {"execute":"nbd-server-remove", "arguments":{"name":"n"}}
187 {"execute":"nbd-server-remove", "arguments":{"name":"n2"}}
188 {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_EXPORT_DELETED", "data": {"id": "n"}}
190 {"execute":"nbd-server-remove", "arguments":{"name":"n2"}}
191 {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_EXPORT_DELETED", "data": {"id": "n2"}}
192 {"error": {"class": "GenericError", "desc": "Export 'n2' is not found"}}
193 {"execute":"nbd-server-stop"}
195 {"execute":"nbd-server-stop"}
196 {"error": {"class": "GenericError", "desc": "NBD server not running"}}
199 {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}}
201 === Use qemu-nbd as server ===
203 [{ "start": 0, "length": 65536, "depth": 0, "zero": false, "data": false},
204 { "start": 65536, "length": 2031616, "depth": 0, "zero": false, "data": true, "offset": OFFSET},
205 { "start": 2097152, "length": 2097152, "depth": 0, "zero": false, "data": false}]
206 [{ "start": 0, "length": 512, "depth": 0, "zero": false, "data": true, "offset": OFFSET},
207 { "start": 512, "length": 512, "depth": 0, "zero": false, "data": false},
208 { "start": 1024, "length": 11321, "depth": 0, "zero": false, "data": true, "offset": OFFSET}]
209 [{ "start": 12345, "length": 2084807, "depth": 0, "zero": false, "data": true, "offset": OFFSET},
210 { "start": 2097152, "length": 2097152, "depth": 0, "zero": false, "data": false}]