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": "NBD server already has export named 'n'"}}
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"}}
106 {"execute":"nbd-server-remove", "arguments":{"name":"n2"}}
107 {"error": {"class": "GenericError", "desc": "Export 'n2' is not found"}}
108 {"execute":"nbd-server-stop"}
110 {"execute":"nbd-server-stop"}
111 {"error": {"class": "GenericError", "desc": "NBD server not running"}}
113 === Set up NBD with iothread access ===
115 {"execute":"x-blockdev-set-iothread", "arguments":{"node-name":"n", "iothread":"io0"}}
117 {"execute":"nbd-server-add", "arguments":{"device":"n"}}
118 {"error": {"class": "GenericError", "desc": "NBD server not running"}}
119 {"execute":"nbd-server-start", "arguments":{"addr":{"type":"unix", "data":{"path":"SOCK_DIR/nbd"}}}}
121 {"execute":"nbd-server-start", "arguments":{"addr":{"type":"unix", "data":{"path":"SOCK_DIR/nbd1"}}}}
122 {"error": {"class": "GenericError", "desc": "NBD server already running"}}
124 {"execute":"nbd-server-add", "arguments":{"device":"n", "bitmap":"b"}}
126 {"execute":"nbd-server-add", "arguments":{"device":"nosuch"}}
127 {"error": {"class": "GenericError", "desc": "Cannot find device=nosuch nor node_name=nosuch"}}
128 {"execute":"nbd-server-add", "arguments":{"device":"n"}}
129 {"error": {"class": "GenericError", "desc": "NBD server already has export named 'n'"}}
130 {"execute":"nbd-server-add", "arguments":{"device":"n", "name":"n2", "bitmap":"b2"}}
131 {"error": {"class": "GenericError", "desc": "Enabled bitmap 'b2' incompatible with readonly export"}}
132 {"execute":"nbd-server-add", "arguments":{"device":"n", "name":"n2", "bitmap":"b3"}}
133 {"error": {"class": "GenericError", "desc": "Bitmap 'b3' is not found"}}
134 {"execute":"nbd-server-add", "arguments":{"device":"n", "name":"n2", "writable":true, "description":"some text", "bitmap":"b2"}}
139 flags: 0x58f ( readonly flush fua df multi cache )
143 available meta contexts: 2
147 description: some text
149 flags: 0xced ( flush fua trim zeroes df cache fast-zero )
153 available meta contexts: 2
157 === Contrast normal status to large granularity dirty-bitmap ===
159 read 512/512 bytes at offset 512
160 512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
161 read 524288/524288 bytes at offset 524288
162 512 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
163 read 1048576/1048576 bytes at offset 1048576
164 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
165 read 2097152/2097152 bytes at offset 2097152
166 2 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
167 [{ "start": 0, "length": 4096, "depth": 0, "zero": false, "data": true, "offset": OFFSET},
168 { "start": 4096, "length": 1044480, "depth": 0, "zero": true, "data": false, "offset": OFFSET},
169 { "start": 1048576, "length": 3145728, "depth": 0, "zero": false, "data": true, "offset": OFFSET}]
170 [{ "start": 0, "length": 65536, "depth": 0, "zero": false, "data": false},
171 { "start": 65536, "length": 2031616, "depth": 0, "zero": false, "data": true, "offset": OFFSET},
172 { "start": 2097152, "length": 2097152, "depth": 0, "zero": false, "data": false}]
174 === Contrast to small granularity dirty-bitmap ===
176 [{ "start": 0, "length": 512, "depth": 0, "zero": false, "data": true, "offset": OFFSET},
177 { "start": 512, "length": 512, "depth": 0, "zero": false, "data": false},
178 { "start": 1024, "length": 2096128, "depth": 0, "zero": false, "data": true, "offset": OFFSET},
179 { "start": 2097152, "length": 2097152, "depth": 0, "zero": false, "data": false}]
181 === End qemu NBD server ===
183 {"execute":"nbd-server-remove", "arguments":{"name":"n"}}
185 {"execute":"nbd-server-remove", "arguments":{"name":"n2"}}
187 {"execute":"nbd-server-remove", "arguments":{"name":"n2"}}
188 {"error": {"class": "GenericError", "desc": "Export 'n2' is not found"}}
189 {"execute":"nbd-server-stop"}
191 {"execute":"nbd-server-stop"}
192 {"error": {"class": "GenericError", "desc": "NBD server not running"}}
195 {"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "SHUTDOWN", "data": {"guest": false, "reason": "host-qmp-quit"}}
197 === Use qemu-nbd as server ===
199 [{ "start": 0, "length": 65536, "depth": 0, "zero": false, "data": false},
200 { "start": 65536, "length": 2031616, "depth": 0, "zero": false, "data": true, "offset": OFFSET},
201 { "start": 2097152, "length": 2097152, "depth": 0, "zero": false, "data": false}]
202 [{ "start": 0, "length": 512, "depth": 0, "zero": false, "data": true, "offset": OFFSET},
203 { "start": 512, "length": 512, "depth": 0, "zero": false, "data": false},
204 { "start": 1024, "length": 11321, "depth": 0, "zero": false, "data": true, "offset": OFFSET}]
205 [{ "start": 12345, "length": 2084807, "depth": 0, "zero": false, "data": true, "offset": OFFSET},
206 { "start": 2097152, "length": 2097152, "depth": 0, "zero": false, "data": false}]