]>
Commit | Line | Data |
---|---|---|
bf03dede | 1 | == Commit tests == |
0b6786a9 | 2 | Formatting 'TEST_DIR/PID-base', fmt=qcow2 cluster_size=65536 compression_type=zlib size=2097152 lazy_refcounts=off refcount_bits=16 |
bf03dede | 3 | |
b66ff2c2 | 4 | Formatting 'TEST_DIR/PID-mid', fmt=qcow2 cluster_size=65536 compression_type=zlib size=1048576 backing_file=TEST_DIR/PID-base backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 |
bf03dede | 5 | |
b66ff2c2 | 6 | Formatting 'TEST_DIR/PID-top', fmt=qcow2 cluster_size=65536 compression_type=zlib size=2097152 backing_file=TEST_DIR/PID-mid backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 |
bf03dede KW |
7 | |
8 | wrote 2097152/2097152 bytes at offset 0 | |
9 | 2 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | |
10 | ||
11 | === Check visible data === | |
12 | read 1048576/1048576 bytes at offset 0 | |
13 | 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | |
14 | ||
15 | read 1048576/1048576 bytes at offset 1048576 | |
16 | 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | |
17 | ||
18 | === Checking allocation status === | |
19 | 1048576/1048576 bytes allocated at offset 0 bytes | |
20 | 1048576/1048576 bytes allocated at offset 1 MiB | |
21 | ||
22 | 0/1048576 bytes allocated at offset 0 bytes | |
23 | 0/0 bytes allocated at offset 1 MiB | |
24 | ||
25 | 0/1048576 bytes allocated at offset 0 bytes | |
26 | 0/1048576 bytes allocated at offset 1 MiB | |
27 | ||
28 | === Checking map === | |
29 | [{ "start": 0, "length": 2097152, "depth": 0, "zero": false, "data": true, "offset": 327680}] | |
30 | ||
31 | Offset Length Mapped to File | |
32 | 0 0x200000 0x50000 TEST_DIR/PID-base | |
33 | ||
34 | [{ "start": 0, "length": 1048576, "depth": 1, "zero": false, "data": true, "offset": 327680}] | |
35 | ||
36 | Offset Length Mapped to File | |
37 | 0 0x100000 0x50000 TEST_DIR/PID-base | |
38 | ||
39 | [{ "start": 0, "length": 1048576, "depth": 2, "zero": false, "data": true, "offset": 327680}, | |
40 | { "start": 1048576, "length": 1048576, "depth": 0, "zero": true, "data": false}] | |
41 | ||
42 | Offset Length Mapped to File | |
43 | 0 0x100000 0x50000 TEST_DIR/PID-base | |
44 | ||
45 | === Testing qemu-img commit (top -> mid) === | |
46 | Image committed. | |
47 | ||
48 | image: TEST_IMG | |
49 | file format: IMGFMT | |
50 | virtual size: 2 MiB (2097152 bytes) | |
51 | cluster_size: 65536 | |
52 | backing file: TEST_DIR/PID-base | |
b66ff2c2 | 53 | backing file format: IMGFMT |
bf03dede KW |
54 | Format specific information: |
55 | compat: 1.1 | |
572ad978 | 56 | compression type: zlib |
bf03dede KW |
57 | lazy refcounts: false |
58 | refcount bits: 16 | |
59 | corrupt: false | |
60 | ||
61 | read 1048576/1048576 bytes at offset 0 | |
62 | 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | |
63 | ||
64 | read 1048576/1048576 bytes at offset 1048576 | |
65 | 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | |
66 | ||
67 | === Testing HMP commit (top -> mid) === | |
0b6786a9 | 68 | Formatting 'TEST_DIR/PID-base', fmt=qcow2 cluster_size=65536 compression_type=zlib size=2097152 lazy_refcounts=off refcount_bits=16 |
bf03dede | 69 | |
b66ff2c2 | 70 | Formatting 'TEST_DIR/PID-mid', fmt=qcow2 cluster_size=65536 compression_type=zlib size=1048576 backing_file=TEST_DIR/PID-base backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 |
bf03dede | 71 | |
b66ff2c2 | 72 | Formatting 'TEST_DIR/PID-top', fmt=qcow2 cluster_size=65536 compression_type=zlib size=2097152 backing_file=TEST_DIR/PID-mid backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 |
bf03dede KW |
73 | |
74 | wrote 2097152/2097152 bytes at offset 0 | |
75 | 2 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | |
76 | ||
77 | {"execute": "human-monitor-command", "arguments": {"command-line": "commit drive0"}} | |
78 | {"return": ""} | |
79 | image: TEST_IMG | |
80 | file format: IMGFMT | |
81 | virtual size: 2 MiB (2097152 bytes) | |
82 | cluster_size: 65536 | |
83 | backing file: TEST_DIR/PID-base | |
b66ff2c2 | 84 | backing file format: IMGFMT |
bf03dede KW |
85 | Format specific information: |
86 | compat: 1.1 | |
572ad978 | 87 | compression type: zlib |
bf03dede KW |
88 | lazy refcounts: false |
89 | refcount bits: 16 | |
90 | corrupt: false | |
91 | ||
92 | read 1048576/1048576 bytes at offset 0 | |
93 | 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | |
94 | ||
95 | read 1048576/1048576 bytes at offset 1048576 | |
96 | 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | |
97 | ||
98 | === Testing QMP active commit (top -> mid) === | |
0b6786a9 | 99 | Formatting 'TEST_DIR/PID-base', fmt=qcow2 cluster_size=65536 compression_type=zlib size=2097152 lazy_refcounts=off refcount_bits=16 |
bf03dede | 100 | |
b66ff2c2 | 101 | Formatting 'TEST_DIR/PID-mid', fmt=qcow2 cluster_size=65536 compression_type=zlib size=1048576 backing_file=TEST_DIR/PID-base backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 |
bf03dede | 102 | |
b66ff2c2 | 103 | Formatting 'TEST_DIR/PID-top', fmt=qcow2 cluster_size=65536 compression_type=zlib size=2097152 backing_file=TEST_DIR/PID-mid backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 |
bf03dede KW |
104 | |
105 | wrote 2097152/2097152 bytes at offset 0 | |
106 | 2 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | |
107 | ||
108 | {"execute": "block-commit", "arguments": {"auto-dismiss": false, "base-node": "mid", "device": "top", "job-id": "job0"}} | |
109 | {"return": {}} | |
110 | {"execute": "job-complete", "arguments": {"id": "job0"}} | |
111 | {"return": {}} | |
112 | {"data": {"device": "job0", "len": 0, "offset": 0, "speed": 0, "type": "commit"}, "event": "BLOCK_JOB_READY", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} | |
113 | {"data": {"device": "job0", "len": 0, "offset": 0, "speed": 0, "type": "commit"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} | |
114 | {"execute": "job-dismiss", "arguments": {"id": "job0"}} | |
115 | {"return": {}} | |
116 | image: TEST_IMG | |
117 | file format: IMGFMT | |
118 | virtual size: 2 MiB (2097152 bytes) | |
119 | cluster_size: 65536 | |
120 | backing file: TEST_DIR/PID-base | |
b66ff2c2 | 121 | backing file format: IMGFMT |
bf03dede KW |
122 | Format specific information: |
123 | compat: 1.1 | |
572ad978 | 124 | compression type: zlib |
bf03dede KW |
125 | lazy refcounts: false |
126 | refcount bits: 16 | |
127 | corrupt: false | |
128 | ||
129 | read 1048576/1048576 bytes at offset 0 | |
130 | 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | |
131 | ||
132 | read 1048576/1048576 bytes at offset 1048576 | |
133 | 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | |
134 | ||
135 | == Resize tests == | |
136 | === preallocation=off === | |
0b6786a9 | 137 | Formatting 'TEST_DIR/PID-base', fmt=qcow2 cluster_size=65536 compression_type=zlib size=6442450944 lazy_refcounts=off refcount_bits=16 |
bf03dede | 138 | |
b66ff2c2 | 139 | Formatting 'TEST_DIR/PID-top', fmt=qcow2 cluster_size=65536 compression_type=zlib size=1073741824 backing_file=TEST_DIR/PID-base backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 |
bf03dede KW |
140 | |
141 | wrote 65536/65536 bytes at offset 5368709120 | |
142 | 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | |
143 | ||
144 | Image resized. | |
145 | ||
146 | read 65536/65536 bytes at offset 5368709120 | |
147 | 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | |
148 | ||
149 | 1 GiB (0x40000000) bytes not allocated at offset 0 bytes (0x0) | |
150 | 7 GiB (0x1c0000000) bytes allocated at offset 1 GiB (0x40000000) | |
151 | ||
152 | [{ "start": 0, "length": 1073741824, "depth": 1, "zero": true, "data": false}, | |
153 | { "start": 1073741824, "length": 7516192768, "depth": 0, "zero": true, "data": false}] | |
154 | ||
155 | === preallocation=metadata === | |
0b6786a9 | 156 | Formatting 'TEST_DIR/PID-base', fmt=qcow2 cluster_size=65536 compression_type=zlib size=34359738368 lazy_refcounts=off refcount_bits=16 |
bf03dede | 157 | |
b66ff2c2 | 158 | Formatting 'TEST_DIR/PID-top', fmt=qcow2 cluster_size=65536 compression_type=zlib size=32212254720 backing_file=TEST_DIR/PID-base backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 |
bf03dede KW |
159 | |
160 | wrote 65536/65536 bytes at offset 33285996544 | |
161 | 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | |
162 | ||
163 | Image resized. | |
164 | ||
165 | read 65536/65536 bytes at offset 33285996544 | |
166 | 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | |
167 | ||
168 | 30 GiB (0x780000000) bytes not allocated at offset 0 bytes (0x0) | |
169 | 3 GiB (0xc0000000) bytes allocated at offset 30 GiB (0x780000000) | |
170 | ||
171 | [{ "start": 0, "length": 32212254720, "depth": 1, "zero": true, "data": false}, | |
172 | { "start": 32212254720, "length": 536870912, "depth": 0, "zero": true, "data": false, "offset": 327680}, | |
173 | { "start": 32749125632, "length": 536870912, "depth": 0, "zero": true, "data": false, "offset": 537264128}, | |
174 | { "start": 33285996544, "length": 536870912, "depth": 0, "zero": true, "data": false, "offset": 1074200576}, | |
175 | { "start": 33822867456, "length": 536870912, "depth": 0, "zero": true, "data": false, "offset": 1611137024}, | |
176 | { "start": 34359738368, "length": 536870912, "depth": 0, "zero": true, "data": false, "offset": 2148139008}, | |
177 | { "start": 34896609280, "length": 536870912, "depth": 0, "zero": true, "data": false, "offset": 2685075456}] | |
178 | ||
179 | === preallocation=falloc === | |
0b6786a9 | 180 | Formatting 'TEST_DIR/PID-base', fmt=qcow2 cluster_size=65536 compression_type=zlib size=10485760 lazy_refcounts=off refcount_bits=16 |
bf03dede | 181 | |
b66ff2c2 | 182 | Formatting 'TEST_DIR/PID-top', fmt=qcow2 cluster_size=65536 compression_type=zlib size=5242880 backing_file=TEST_DIR/PID-base backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 |
bf03dede KW |
183 | |
184 | wrote 65536/65536 bytes at offset 9437184 | |
185 | 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | |
186 | ||
187 | Image resized. | |
188 | ||
189 | read 65536/65536 bytes at offset 9437184 | |
190 | 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | |
191 | ||
192 | 5 MiB (0x500000) bytes not allocated at offset 0 bytes (0x0) | |
193 | 10 MiB (0xa00000) bytes allocated at offset 5 MiB (0x500000) | |
194 | ||
195 | [{ "start": 0, "length": 5242880, "depth": 1, "zero": true, "data": false}, | |
eb8a0cf3 | 196 | { "start": 5242880, "length": 10485760, "depth": 0, "zero": false, "data": true, "offset": 327680}] |
bf03dede KW |
197 | |
198 | === preallocation=full === | |
0b6786a9 | 199 | Formatting 'TEST_DIR/PID-base', fmt=qcow2 cluster_size=65536 compression_type=zlib size=16777216 lazy_refcounts=off refcount_bits=16 |
bf03dede | 200 | |
b66ff2c2 | 201 | Formatting 'TEST_DIR/PID-top', fmt=qcow2 cluster_size=65536 compression_type=zlib size=8388608 backing_file=TEST_DIR/PID-base backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 |
bf03dede KW |
202 | |
203 | wrote 65536/65536 bytes at offset 11534336 | |
204 | 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | |
205 | ||
206 | Image resized. | |
207 | ||
208 | read 65536/65536 bytes at offset 11534336 | |
209 | 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | |
210 | ||
211 | 8 MiB (0x800000) bytes not allocated at offset 0 bytes (0x0) | |
212 | 4 MiB (0x400000) bytes allocated at offset 8 MiB (0x800000) | |
213 | ||
214 | [{ "start": 0, "length": 8388608, "depth": 1, "zero": true, "data": false}, | |
eb8a0cf3 | 215 | { "start": 8388608, "length": 4194304, "depth": 0, "zero": false, "data": true, "offset": 327680}] |
bf03dede KW |
216 | |
217 | === preallocation=off === | |
0b6786a9 | 218 | Formatting 'TEST_DIR/PID-base', fmt=qcow2 cluster_size=65536 compression_type=zlib size=393216 lazy_refcounts=off refcount_bits=16 |
bf03dede | 219 | |
b66ff2c2 | 220 | Formatting 'TEST_DIR/PID-top', fmt=qcow2 cluster_size=65536 compression_type=zlib size=259072 backing_file=TEST_DIR/PID-base backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 |
bf03dede KW |
221 | |
222 | wrote 65536/65536 bytes at offset 259072 | |
223 | 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | |
224 | ||
225 | Image resized. | |
226 | ||
227 | read 65536/65536 bytes at offset 259072 | |
228 | 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | |
229 | ||
230 | 192 KiB (0x30000) bytes not allocated at offset 0 bytes (0x0) | |
231 | 320 KiB (0x50000) bytes allocated at offset 192 KiB (0x30000) | |
232 | ||
233 | [{ "start": 0, "length": 196608, "depth": 1, "zero": true, "data": false}, | |
234 | { "start": 196608, "length": 65536, "depth": 0, "zero": false, "data": true, "offset": 327680}, | |
235 | { "start": 262144, "length": 262144, "depth": 0, "zero": true, "data": false}] | |
236 | ||
237 | === preallocation=off === | |
0b6786a9 | 238 | Formatting 'TEST_DIR/PID-base', fmt=qcow2 cluster_size=65536 compression_type=zlib size=409600 lazy_refcounts=off refcount_bits=16 |
bf03dede | 239 | |
b66ff2c2 | 240 | Formatting 'TEST_DIR/PID-top', fmt=qcow2 cluster_size=65536 compression_type=zlib size=262144 backing_file=TEST_DIR/PID-base backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 |
bf03dede KW |
241 | |
242 | wrote 65536/65536 bytes at offset 344064 | |
243 | 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | |
244 | ||
245 | Image resized. | |
246 | ||
247 | read 65536/65536 bytes at offset 344064 | |
248 | 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | |
249 | ||
250 | 256 KiB (0x40000) bytes not allocated at offset 0 bytes (0x0) | |
251 | 256 KiB (0x40000) bytes allocated at offset 256 KiB (0x40000) | |
252 | ||
253 | [{ "start": 0, "length": 262144, "depth": 1, "zero": true, "data": false}, | |
254 | { "start": 262144, "length": 262144, "depth": 0, "zero": true, "data": false}] | |
255 | ||
256 | === preallocation=off === | |
0b6786a9 | 257 | Formatting 'TEST_DIR/PID-base', fmt=qcow2 cluster_size=65536 compression_type=zlib size=524288 lazy_refcounts=off refcount_bits=16 |
bf03dede | 258 | |
b66ff2c2 | 259 | Formatting 'TEST_DIR/PID-top', fmt=qcow2 cluster_size=65536 compression_type=zlib size=262144 backing_file=TEST_DIR/PID-base backing_fmt=qcow2 lazy_refcounts=off refcount_bits=16 |
bf03dede KW |
260 | |
261 | wrote 65536/65536 bytes at offset 446464 | |
262 | 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | |
263 | ||
264 | Image resized. | |
265 | ||
266 | read 65536/65536 bytes at offset 446464 | |
267 | 64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | |
268 | ||
269 | 256 KiB (0x40000) bytes not allocated at offset 0 bytes (0x0) | |
270 | 244 KiB (0x3d000) bytes allocated at offset 256 KiB (0x40000) | |
271 | ||
272 | [{ "start": 0, "length": 262144, "depth": 1, "zero": true, "data": false}, | |
273 | { "start": 262144, "length": 249856, "depth": 0, "zero": true, "data": false}] | |
274 |