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"}}
37 === Set up NBD with normal access ===
39 {"execute":"nbd-server-add",
40 "arguments":{"device":"n"}}
41 {"error": {"class": "GenericError", "desc": "NBD server not running"}}
42 {"execute":"nbd-server-start",
43 "arguments":{"addr":{"type":"unix",
44 "data":{"path":"SOCK_DIR/nbd"}}}}
46 {"execute":"nbd-server-start",
47 "arguments":{"addr":{"type":"unix",
48 "data":{"path":"SOCK_DIR/nbd1"}}}}
49 {"error": {"class": "GenericError", "desc": "NBD server already running"}}
51 {"execute":"nbd-server-add",
52 "arguments":{"device":"n", "bitmap":"b"}}
54 {"execute":"nbd-server-add",
55 "arguments":{"device":"nosuch"}}
56 {"error": {"class": "GenericError", "desc": "Cannot find device='nosuch' nor node-name='nosuch'"}}
57 {"execute":"nbd-server-add",
58 "arguments":{"device":"n"}}
59 {"error": {"class": "GenericError", "desc": "Block export id 'n' is already in use"}}
60 {"execute":"nbd-server-add",
61 "arguments":{"device":"n", "name":"n2",
63 {"error": {"class": "GenericError", "desc": "Enabled bitmap 'b2' incompatible with readonly export"}}
64 {"execute":"nbd-server-add",
65 "arguments":{"device":"n", "name":"n2",
67 {"error": {"class": "GenericError", "desc": "Bitmap 'b3' is not found"}}
68 {"execute":"nbd-server-add",
69 "arguments":{"device":"n", "name":"n2", "writable":true,
70 "description":"some text", "bitmap":"b2"}}
75 flags: 0x58f ( readonly flush fua df multi cache )
79 available meta contexts: 2
83 description: some text
85 flags: 0xced ( flush fua trim zeroes df cache fast-zero )
89 available meta contexts: 2
93 === Contrast normal status to large granularity dirty-bitmap ===
95 read 512/512 bytes at offset 512
96 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
97 read 524288/524288 bytes at offset 524288
98 512 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
99 read 1048576/1048576 bytes at offset 1048576
100 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
101 read 2097152/2097152 bytes at offset 2097152
102 2 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
103 [{ "start": 0, "length": 4096, "depth": 0, "present": true, "zero": false, "data": true, "offset": OFFSET},
104 { "start": 4096, "length": 1044480, "depth": 0, "present": true, "zero": true, "data": false, "offset": OFFSET},
105 { "start": 1048576, "length": 3145728, "depth": 0, "present": true, "zero": false, "data": true, "offset": OFFSET}]
106 [{ "start": 0, "length": 65536, "depth": 0, "present": false, "zero": false, "data": false},
107 { "start": 65536, "length": 2031616, "depth": 0, "present": true, "zero": false, "data": true, "offset": OFFSET},
108 { "start": 2097152, "length": 2097152, "depth": 0, "present": false, "zero": false, "data": false}]
110 === Contrast to small granularity dirty-bitmap ===
112 [{ "start": 0, "length": 512, "depth": 0, "present": true, "zero": false, "data": true, "offset": OFFSET},
113 { "start": 512, "length": 512, "depth": 0, "present": false, "zero": false, "data": false},
114 { "start": 1024, "length": 2096128, "depth": 0, "present": true, "zero": false, "data": true, "offset": OFFSET},
115 { "start": 2097152, "length": 2097152, "depth": 0, "present": false, "zero": false, "data": false}]
117 === End qemu NBD server ===
119 {"execute":"nbd-server-remove",
120 "arguments":{"name":"n"}}
122 {"execute":"nbd-server-remove",
123 "arguments":{"name":"n2"}}
124 {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_EXPORT_DELETED", "data": {"id": "n"}}
126 {"execute":"nbd-server-remove",
127 "arguments":{"name":"n2"}}
128 {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_EXPORT_DELETED", "data": {"id": "n2"}}
129 {"error": {"class": "GenericError", "desc": "Export 'n2' is not found"}}
130 {"execute":"nbd-server-stop"}
132 {"execute":"nbd-server-stop"}
133 {"error": {"class": "GenericError", "desc": "NBD server not running"}}
135 === Set up NBD with iothread access ===
137 {"execute":"x-blockdev-set-iothread",
138 "arguments":{"node-name":"n", "iothread":"io0"}}
140 {"execute":"nbd-server-add",
141 "arguments":{"device":"n"}}
142 {"error": {"class": "GenericError", "desc": "NBD server not running"}}
143 {"execute":"nbd-server-start",
144 "arguments":{"addr":{"type":"unix",
145 "data":{"path":"SOCK_DIR/nbd"}}}}
147 {"execute":"nbd-server-start",
148 "arguments":{"addr":{"type":"unix",
149 "data":{"path":"SOCK_DIR/nbd1"}}}}
150 {"error": {"class": "GenericError", "desc": "NBD server already running"}}
152 {"execute":"nbd-server-add",
153 "arguments":{"device":"n", "bitmap":"b"}}
155 {"execute":"nbd-server-add",
156 "arguments":{"device":"nosuch"}}
157 {"error": {"class": "GenericError", "desc": "Cannot find device='nosuch' nor node-name='nosuch'"}}
158 {"execute":"nbd-server-add",
159 "arguments":{"device":"n"}}
160 {"error": {"class": "GenericError", "desc": "Block export id 'n' is already in use"}}
161 {"execute":"nbd-server-add",
162 "arguments":{"device":"n", "name":"n2",
164 {"error": {"class": "GenericError", "desc": "Enabled bitmap 'b2' incompatible with readonly export"}}
165 {"execute":"nbd-server-add",
166 "arguments":{"device":"n", "name":"n2",
168 {"error": {"class": "GenericError", "desc": "Bitmap 'b3' is not found"}}
169 {"execute":"nbd-server-add",
170 "arguments":{"device":"n", "name":"n2", "writable":true,
171 "description":"some text", "bitmap":"b2"}}
176 flags: 0x58f ( readonly flush fua df multi cache )
180 available meta contexts: 2
184 description: some text
186 flags: 0xced ( flush fua trim zeroes df cache fast-zero )
190 available meta contexts: 2
194 === Contrast normal status to large granularity dirty-bitmap ===
196 read 512/512 bytes at offset 512
197 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
198 read 524288/524288 bytes at offset 524288
199 512 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
200 read 1048576/1048576 bytes at offset 1048576
201 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
202 read 2097152/2097152 bytes at offset 2097152
203 2 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
204 [{ "start": 0, "length": 4096, "depth": 0, "present": true, "zero": false, "data": true, "offset": OFFSET},
205 { "start": 4096, "length": 1044480, "depth": 0, "present": true, "zero": true, "data": false, "offset": OFFSET},
206 { "start": 1048576, "length": 3145728, "depth": 0, "present": true, "zero": false, "data": true, "offset": OFFSET}]
207 [{ "start": 0, "length": 65536, "depth": 0, "present": false, "zero": false, "data": false},
208 { "start": 65536, "length": 2031616, "depth": 0, "present": true, "zero": false, "data": true, "offset": OFFSET},
209 { "start": 2097152, "length": 2097152, "depth": 0, "present": false, "zero": false, "data": false}]
211 === Contrast to small granularity dirty-bitmap ===
213 [{ "start": 0, "length": 512, "depth": 0, "present": true, "zero": false, "data": true, "offset": OFFSET},
214 { "start": 512, "length": 512, "depth": 0, "present": false, "zero": false, "data": false},
215 { "start": 1024, "length": 2096128, "depth": 0, "present": true, "zero": false, "data": true, "offset": OFFSET},
216 { "start": 2097152, "length": 2097152, "depth": 0, "present": false, "zero": false, "data": false}]
218 === End qemu NBD server ===
220 {"execute":"nbd-server-remove",
221 "arguments":{"name":"n"}}
223 {"execute":"nbd-server-remove",
224 "arguments":{"name":"n2"}}
225 {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_EXPORT_DELETED", "data": {"id": "n"}}
227 {"execute":"nbd-server-remove",
228 "arguments":{"name":"n2"}}
229 {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "BLOCK_EXPORT_DELETED", "data": {"id": "n2"}}
230 {"error": {"class": "GenericError", "desc": "Export 'n2' is not found"}}
231 {"execute":"nbd-server-stop"}
233 {"execute":"nbd-server-stop"}
234 {"error": {"class": "GenericError", "desc": "NBD server not running"}}
237 {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}}
239 === Use qemu-nbd as server ===
241 [{ "start": 0, "length": 65536, "depth": 0, "present": false, "zero": false, "data": false},
242 { "start": 65536, "length": 2031616, "depth": 0, "present": true, "zero": false, "data": true, "offset": OFFSET},
243 { "start": 2097152, "length": 2097152, "depth": 0, "present": false, "zero": false, "data": false}]
244 [{ "start": 0, "length": 512, "depth": 0, "present": true, "zero": false, "data": true, "offset": OFFSET},
245 { "start": 512, "length": 512, "depth": 0, "present": false, "zero": false, "data": false},
246 { "start": 1024, "length": 11321, "depth": 0, "present": true, "zero": false, "data": true, "offset": OFFSET}]
247 [{ "start": 12345, "length": 2084807, "depth": 0, "present": true, "zero": false, "data": true, "offset": OFFSET},
248 { "start": 2097152, "length": 2097152, "depth": 0, "present": false, "zero": false, "data": false}]