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)
14 {"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",
30 "arguments":{"driver":"IMGFMT", "node-name":"n",
31 "file":{"driver":"file", "filename":"TEST_DIR/t.IMGFMT"}}}
33 {"execute":"block-dirty-bitmap-disable",
34 "arguments":{"node":"n", "name":"b"}}
36 {"execute":"blockdev-add",
37 "arguments":{"driver":"null-co", "node-name":"null",
40 {"execute":"block-dirty-bitmap-add",
41 "arguments":{"node":"null", "name":"b3"}}
44 === Set up NBD with normal access ===
46 {"execute":"nbd-server-add",
47 "arguments":{"device":"n"}}
48 {"error": {"class": "GenericError", "desc": "NBD server not running"}}
49 {"execute":"nbd-server-start",
50 "arguments":{"addr":{"type":"unix",
51 "data":{"path":"SOCK_DIR/nbd"}}}}
53 {"execute":"nbd-server-start",
54 "arguments":{"addr":{"type":"unix",
55 "data":{"path":"SOCK_DIR/nbd1"}}}}
56 {"error": {"class": "GenericError", "desc": "NBD server already running"}}
58 {"execute":"nbd-server-add",
59 "arguments":{"device":"n", "bitmap":"b"}}
61 {"execute":"nbd-server-add",
62 "arguments":{"device":"nosuch"}}
63 {"error": {"class": "GenericError", "desc": "Cannot find device='nosuch' nor node-name='nosuch'"}}
64 {"execute":"nbd-server-add",
65 "arguments":{"device":"n"}}
66 {"error": {"class": "GenericError", "desc": "Block export id 'n' is already in use"}}
67 {"execute":"nbd-server-add",
68 "arguments":{"device":"n", "name":"n2",
70 {"error": {"class": "GenericError", "desc": "Enabled bitmap 'b2' incompatible with readonly export"}}
71 {"execute":"nbd-server-add",
72 "arguments":{"device":"n", "name":"n2",
74 {"error": {"class": "GenericError", "desc": "Bitmap 'b3' is not found"}}
75 {"execute":"nbd-server-add",
76 "arguments":{"device":"n", "name":"n2", "writable":true,
77 "description":"some text", "bitmap":"b2"}}
79 {"execute":"block-export-add",
80 "arguments":{"type": "nbd", "node-name":"n", "id":"n3", "name": "n3",
81 "bitmaps":[{"node":"null","name":"b3"}]}}
86 flags: 0x158f ( readonly flush fua df multi cache block-status-payload )
90 transaction size: 64-bit
91 available meta contexts: 2
95 description: some text
97 flags: 0x1ded ( flush fua trim zeroes df multi cache fast-zero block-status-payload )
101 transaction size: 64-bit
102 available meta contexts: 2
107 flags: 0x158f ( readonly flush fua df multi cache block-status-payload )
111 transaction size: 64-bit
112 available meta contexts: 2
116 === Contrast normal status to large granularity dirty-bitmap ===
118 read 512/512 bytes at offset 512
119 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
120 read 524288/524288 bytes at offset 524288
121 512 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
122 read 1048576/1048576 bytes at offset 1048576
123 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
124 read 2097152/2097152 bytes at offset 2097152
125 2 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
126 [{ "start": 0, "length": 4096, "depth": 0, "present": true, "zero": false, "data": true, "compressed": false, "offset": OFFSET},
127 { "start": 4096, "length": 1044480, "depth": 0, "present": true, "zero": true, "data": false, "compressed": false, "offset": OFFSET},
128 { "start": 1048576, "length": 3145728, "depth": 0, "present": true, "zero": false, "data": true, "compressed": false, "offset": OFFSET}]
129 [{ "start": 0, "length": 65536, "depth": 0, "present": false, "zero": false, "data": false, "compressed": false},
130 { "start": 65536, "length": 2031616, "depth": 0, "present": true, "zero": false, "data": true, "compressed": false, "offset": OFFSET},
131 { "start": 2097152, "length": 2097152, "depth": 0, "present": false, "zero": false, "data": false, "compressed": false}]
133 === Contrast to small granularity dirty-bitmap ===
135 [{ "start": 0, "length": 512, "depth": 0, "present": true, "zero": false, "data": true, "compressed": false, "offset": OFFSET},
136 { "start": 512, "length": 512, "depth": 0, "present": false, "zero": false, "data": false, "compressed": false},
137 { "start": 1024, "length": 2096128, "depth": 0, "present": true, "zero": false, "data": true, "compressed": false, "offset": OFFSET},
138 { "start": 2097152, "length": 2097152, "depth": 0, "present": false, "zero": false, "data": false, "compressed": false}]
140 === Check bitmap taken from another node ===
142 [{ "start": 0, "length": 4194304, "depth": 0, "present": true, "zero": false, "data": true, "compressed": false, "offset": OFFSET}]
144 === End qemu NBD server ===
146 {"execute":"nbd-server-remove",
147 "arguments":{"name":"n"}}
148 {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_EXPORT_DELETED", "data": {"id": "n"}}
150 {"execute":"nbd-server-remove",
151 "arguments":{"name":"n2"}}
152 {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_EXPORT_DELETED", "data": {"id": "n2"}}
154 {"execute":"nbd-server-remove",
155 "arguments":{"name":"n2"}}
156 {"error": {"class": "GenericError", "desc": "Export 'n2' is not found"}}
157 {"execute":"nbd-server-stop"}
158 {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_EXPORT_DELETED", "data": {"id": "n3"}}
160 {"execute":"nbd-server-stop"}
161 {"error": {"class": "GenericError", "desc": "NBD server not running"}}
163 === Set up NBD with iothread access ===
165 {"execute":"x-blockdev-set-iothread",
166 "arguments":{"node-name":"n", "iothread":"io0"}}
168 {"execute":"nbd-server-add",
169 "arguments":{"device":"n"}}
170 {"error": {"class": "GenericError", "desc": "NBD server not running"}}
171 {"execute":"nbd-server-start",
172 "arguments":{"addr":{"type":"unix",
173 "data":{"path":"SOCK_DIR/nbd"}}}}
175 {"execute":"nbd-server-start",
176 "arguments":{"addr":{"type":"unix",
177 "data":{"path":"SOCK_DIR/nbd1"}}}}
178 {"error": {"class": "GenericError", "desc": "NBD server already running"}}
180 {"execute":"nbd-server-add",
181 "arguments":{"device":"n", "bitmap":"b"}}
183 {"execute":"nbd-server-add",
184 "arguments":{"device":"nosuch"}}
185 {"error": {"class": "GenericError", "desc": "Cannot find device='nosuch' nor node-name='nosuch'"}}
186 {"execute":"nbd-server-add",
187 "arguments":{"device":"n"}}
188 {"error": {"class": "GenericError", "desc": "Block export id 'n' is already in use"}}
189 {"execute":"nbd-server-add",
190 "arguments":{"device":"n", "name":"n2",
192 {"error": {"class": "GenericError", "desc": "Enabled bitmap 'b2' incompatible with readonly export"}}
193 {"execute":"nbd-server-add",
194 "arguments":{"device":"n", "name":"n2",
196 {"error": {"class": "GenericError", "desc": "Bitmap 'b3' is not found"}}
197 {"execute":"nbd-server-add",
198 "arguments":{"device":"n", "name":"n2", "writable":true,
199 "description":"some text", "bitmap":"b2"}}
201 {"execute":"block-export-add",
202 "arguments":{"type": "nbd", "node-name":"n", "id":"n3", "name": "n3",
203 "bitmaps":[{"node":"null","name":"b3"}]}}
208 flags: 0x158f ( readonly flush fua df multi cache block-status-payload )
212 transaction size: 64-bit
213 available meta contexts: 2
217 description: some text
219 flags: 0x1ded ( flush fua trim zeroes df multi cache fast-zero block-status-payload )
223 transaction size: 64-bit
224 available meta contexts: 2
229 flags: 0x158f ( readonly flush fua df multi cache block-status-payload )
233 transaction size: 64-bit
234 available meta contexts: 2
238 === Contrast normal status to large granularity dirty-bitmap ===
240 read 512/512 bytes at offset 512
241 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
242 read 524288/524288 bytes at offset 524288
243 512 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
244 read 1048576/1048576 bytes at offset 1048576
245 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
246 read 2097152/2097152 bytes at offset 2097152
247 2 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
248 [{ "start": 0, "length": 4096, "depth": 0, "present": true, "zero": false, "data": true, "compressed": false, "offset": OFFSET},
249 { "start": 4096, "length": 1044480, "depth": 0, "present": true, "zero": true, "data": false, "compressed": false, "offset": OFFSET},
250 { "start": 1048576, "length": 3145728, "depth": 0, "present": true, "zero": false, "data": true, "compressed": false, "offset": OFFSET}]
251 [{ "start": 0, "length": 65536, "depth": 0, "present": false, "zero": false, "data": false, "compressed": false},
252 { "start": 65536, "length": 2031616, "depth": 0, "present": true, "zero": false, "data": true, "compressed": false, "offset": OFFSET},
253 { "start": 2097152, "length": 2097152, "depth": 0, "present": false, "zero": false, "data": false, "compressed": false}]
255 === Contrast to small granularity dirty-bitmap ===
257 [{ "start": 0, "length": 512, "depth": 0, "present": true, "zero": false, "data": true, "compressed": false, "offset": OFFSET},
258 { "start": 512, "length": 512, "depth": 0, "present": false, "zero": false, "data": false, "compressed": false},
259 { "start": 1024, "length": 2096128, "depth": 0, "present": true, "zero": false, "data": true, "compressed": false, "offset": OFFSET},
260 { "start": 2097152, "length": 2097152, "depth": 0, "present": false, "zero": false, "data": false, "compressed": false}]
262 === Check bitmap taken from another node ===
264 [{ "start": 0, "length": 4194304, "depth": 0, "present": true, "zero": false, "data": true, "compressed": false, "offset": OFFSET}]
266 === End qemu NBD server ===
268 {"execute":"nbd-server-remove",
269 "arguments":{"name":"n"}}
270 {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_EXPORT_DELETED", "data": {"id": "n"}}
272 {"execute":"nbd-server-remove",
273 "arguments":{"name":"n2"}}
274 {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_EXPORT_DELETED", "data": {"id": "n2"}}
276 {"execute":"nbd-server-remove",
277 "arguments":{"name":"n2"}}
278 {"error": {"class": "GenericError", "desc": "Export 'n2' is not found"}}
279 {"execute":"nbd-server-stop"}
280 {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_EXPORT_DELETED", "data": {"id": "n3"}}
282 {"execute":"nbd-server-stop"}
283 {"error": {"class": "GenericError", "desc": "NBD server not running"}}
285 {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}}
288 === Use qemu-nbd as server ===
290 [{ "start": 0, "length": 65536, "depth": 0, "present": false, "zero": false, "data": false, "compressed": false},
291 { "start": 65536, "length": 2031616, "depth": 0, "present": true, "zero": false, "data": true, "compressed": false, "offset": OFFSET},
292 { "start": 2097152, "length": 2097152, "depth": 0, "present": false, "zero": false, "data": false, "compressed": false}]
293 [{ "start": 0, "length": 512, "depth": 0, "present": true, "zero": false, "data": true, "compressed": false, "offset": OFFSET},
294 { "start": 512, "length": 512, "depth": 0, "present": false, "zero": false, "data": false, "compressed": false},
295 { "start": 1024, "length": 11321, "depth": 0, "present": true, "zero": false, "data": true, "compressed": false, "offset": OFFSET}]
296 [{ "start": 12345, "length": 2084807, "depth": 0, "present": true, "zero": false, "data": true, "compressed": false, "offset": OFFSET},
297 { "start": 2097152, "length": 2097152, "depth": 0, "present": false, "zero": false, "data": false, "compressed": false}]