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",
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: 0x58f ( readonly flush fua df multi cache )
90 available meta contexts: 2
94 description: some text
96 flags: 0xced ( flush fua trim zeroes df cache fast-zero )
100 available meta contexts: 2
105 flags: 0x58f ( readonly flush fua df multi cache )
109 available meta contexts: 2
113 === Contrast normal status to large granularity dirty-bitmap ===
115 read 512/512 bytes at offset 512
116 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
117 read 524288/524288 bytes at offset 524288
118 512 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
119 read 1048576/1048576 bytes at offset 1048576
120 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
121 read 2097152/2097152 bytes at offset 2097152
122 2 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
123 [{ "start": 0, "length": 4096, "depth": 0, "present": true, "zero": false, "data": true, "offset": OFFSET},
124 { "start": 4096, "length": 1044480, "depth": 0, "present": true, "zero": true, "data": false, "offset": OFFSET},
125 { "start": 1048576, "length": 3145728, "depth": 0, "present": true, "zero": false, "data": true, "offset": OFFSET}]
126 [{ "start": 0, "length": 65536, "depth": 0, "present": false, "zero": false, "data": false},
127 { "start": 65536, "length": 2031616, "depth": 0, "present": true, "zero": false, "data": true, "offset": OFFSET},
128 { "start": 2097152, "length": 2097152, "depth": 0, "present": false, "zero": false, "data": false}]
130 === Contrast to small granularity dirty-bitmap ===
132 [{ "start": 0, "length": 512, "depth": 0, "present": true, "zero": false, "data": true, "offset": OFFSET},
133 { "start": 512, "length": 512, "depth": 0, "present": false, "zero": false, "data": false},
134 { "start": 1024, "length": 2096128, "depth": 0, "present": true, "zero": false, "data": true, "offset": OFFSET},
135 { "start": 2097152, "length": 2097152, "depth": 0, "present": false, "zero": false, "data": false}]
137 === Check bitmap taken from another node ===
139 [{ "start": 0, "length": 4194304, "depth": 0, "present": true, "zero": false, "data": true, "offset": OFFSET}]
141 === End qemu NBD server ===
143 {"execute":"nbd-server-remove",
144 "arguments":{"name":"n"}}
146 {"execute":"nbd-server-remove",
147 "arguments":{"name":"n2"}}
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"}}
153 {"error": {"class": "GenericError", "desc": "Export 'n2' is not found"}}
154 {"execute":"nbd-server-stop"}
155 {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_EXPORT_DELETED", "data": {"id": "n3"}}
157 {"execute":"nbd-server-stop"}
158 {"error": {"class": "GenericError", "desc": "NBD server not running"}}
160 === Set up NBD with iothread access ===
162 {"execute":"x-blockdev-set-iothread",
163 "arguments":{"node-name":"n", "iothread":"io0"}}
165 {"execute":"nbd-server-add",
166 "arguments":{"device":"n"}}
167 {"error": {"class": "GenericError", "desc": "NBD server not running"}}
168 {"execute":"nbd-server-start",
169 "arguments":{"addr":{"type":"unix",
170 "data":{"path":"SOCK_DIR/nbd"}}}}
172 {"execute":"nbd-server-start",
173 "arguments":{"addr":{"type":"unix",
174 "data":{"path":"SOCK_DIR/nbd1"}}}}
175 {"error": {"class": "GenericError", "desc": "NBD server already running"}}
177 {"execute":"nbd-server-add",
178 "arguments":{"device":"n", "bitmap":"b"}}
180 {"execute":"nbd-server-add",
181 "arguments":{"device":"nosuch"}}
182 {"error": {"class": "GenericError", "desc": "Cannot find device='nosuch' nor node-name='nosuch'"}}
183 {"execute":"nbd-server-add",
184 "arguments":{"device":"n"}}
185 {"error": {"class": "GenericError", "desc": "Block export id 'n' is already in use"}}
186 {"execute":"nbd-server-add",
187 "arguments":{"device":"n", "name":"n2",
189 {"error": {"class": "GenericError", "desc": "Enabled bitmap 'b2' incompatible with readonly export"}}
190 {"execute":"nbd-server-add",
191 "arguments":{"device":"n", "name":"n2",
193 {"error": {"class": "GenericError", "desc": "Bitmap 'b3' is not found"}}
194 {"execute":"nbd-server-add",
195 "arguments":{"device":"n", "name":"n2", "writable":true,
196 "description":"some text", "bitmap":"b2"}}
198 {"execute":"block-export-add",
199 "arguments":{"type": "nbd", "node-name":"n", "id":"n3", "name": "n3",
200 "bitmaps":[{"node":"null","name":"b3"}]}}
205 flags: 0x58f ( readonly flush fua df multi cache )
209 available meta contexts: 2
213 description: some text
215 flags: 0xced ( flush fua trim zeroes df cache fast-zero )
219 available meta contexts: 2
224 flags: 0x58f ( readonly flush fua df multi cache )
228 available meta contexts: 2
232 === Contrast normal status to large granularity dirty-bitmap ===
234 read 512/512 bytes at offset 512
235 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
236 read 524288/524288 bytes at offset 524288
237 512 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
238 read 1048576/1048576 bytes at offset 1048576
239 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
240 read 2097152/2097152 bytes at offset 2097152
241 2 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
242 [{ "start": 0, "length": 4096, "depth": 0, "present": true, "zero": false, "data": true, "offset": OFFSET},
243 { "start": 4096, "length": 1044480, "depth": 0, "present": true, "zero": true, "data": false, "offset": OFFSET},
244 { "start": 1048576, "length": 3145728, "depth": 0, "present": true, "zero": false, "data": true, "offset": OFFSET}]
245 [{ "start": 0, "length": 65536, "depth": 0, "present": false, "zero": false, "data": false},
246 { "start": 65536, "length": 2031616, "depth": 0, "present": true, "zero": false, "data": true, "offset": OFFSET},
247 { "start": 2097152, "length": 2097152, "depth": 0, "present": false, "zero": false, "data": false}]
249 === Contrast to small granularity dirty-bitmap ===
251 [{ "start": 0, "length": 512, "depth": 0, "present": true, "zero": false, "data": true, "offset": OFFSET},
252 { "start": 512, "length": 512, "depth": 0, "present": false, "zero": false, "data": false},
253 { "start": 1024, "length": 2096128, "depth": 0, "present": true, "zero": false, "data": true, "offset": OFFSET},
254 { "start": 2097152, "length": 2097152, "depth": 0, "present": false, "zero": false, "data": false}]
256 === Check bitmap taken from another node ===
258 [{ "start": 0, "length": 4194304, "depth": 0, "present": true, "zero": false, "data": true, "offset": OFFSET}]
260 === End qemu NBD server ===
262 {"execute":"nbd-server-remove",
263 "arguments":{"name":"n"}}
265 {"execute":"nbd-server-remove",
266 "arguments":{"name":"n2"}}
267 {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_EXPORT_DELETED", "data": {"id": "n"}}
269 {"execute":"nbd-server-remove",
270 "arguments":{"name":"n2"}}
271 {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_EXPORT_DELETED", "data": {"id": "n2"}}
272 {"error": {"class": "GenericError", "desc": "Export 'n2' is not found"}}
273 {"execute":"nbd-server-stop"}
274 {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_EXPORT_DELETED", "data": {"id": "n3"}}
276 {"execute":"nbd-server-stop"}
277 {"error": {"class": "GenericError", "desc": "NBD server not running"}}
280 {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}}
282 === Use qemu-nbd as server ===
284 [{ "start": 0, "length": 65536, "depth": 0, "present": false, "zero": false, "data": false},
285 { "start": 65536, "length": 2031616, "depth": 0, "present": true, "zero": false, "data": true, "offset": OFFSET},
286 { "start": 2097152, "length": 2097152, "depth": 0, "present": false, "zero": false, "data": false}]
287 [{ "start": 0, "length": 512, "depth": 0, "present": true, "zero": false, "data": true, "offset": OFFSET},
288 { "start": 512, "length": 512, "depth": 0, "present": false, "zero": false, "data": false},
289 { "start": 1024, "length": 11321, "depth": 0, "present": true, "zero": false, "data": true, "offset": OFFSET}]
290 [{ "start": 12345, "length": 2084807, "depth": 0, "present": true, "zero": false, "data": true, "offset": OFFSET},
291 { "start": 2097152, "length": 2097152, "depth": 0, "present": false, "zero": false, "data": false}]