176b90e23SKevin WolfQA output created by 244 276b90e23SKevin Wolf 376b90e23SKevin Wolf=== Create and open image with external data file === 476b90e23SKevin Wolf 576b90e23SKevin WolfWith data file name in the image: 676b90e23SKevin WolfFormatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 data_file=TEST_DIR/t.IMGFMT.data 776b90e23SKevin WolfNo errors were found on the image. 876b90e23SKevin Wolfread 65536/65536 bytes at offset 0 976b90e23SKevin Wolf64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 1076b90e23SKevin Wolfread 65536/65536 bytes at offset 0 1176b90e23SKevin Wolf64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 1236b9986bSThomas Huthqemu-io: can't open device TEST_DIR/t.qcow2: Could not open 'inexistent': No such file or directory 1376b90e23SKevin Wolfno file open, try 'help open' 1476b90e23SKevin Wolf 1576b90e23SKevin WolfData file required, but without data file name in the image: 1636b9986bSThomas Huthqemu-io: can't open device TEST_DIR/t.qcow2: 'data-file' is required for this image 1776b90e23SKevin Wolfno file open, try 'help open' 1876b90e23SKevin Wolfread 65536/65536 bytes at offset 0 1976b90e23SKevin Wolf64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 2036b9986bSThomas Huthqemu-io: can't open device TEST_DIR/t.qcow2: Could not open 'inexistent': No such file or directory 2176b90e23SKevin Wolfno file open, try 'help open' 2276b90e23SKevin Wolf 2376b90e23SKevin WolfSetting data-file for an image with internal data: 2476b90e23SKevin WolfFormatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 2536b9986bSThomas Huthqemu-io: can't open device TEST_DIR/t.qcow2: 'data-file' can only be set for images with an external data file 2676b90e23SKevin Wolfno file open, try 'help open' 2736b9986bSThomas Huthqemu-io: can't open device TEST_DIR/t.qcow2: Could not open 'inexistent': No such file or directory 2876b90e23SKevin Wolfno file open, try 'help open' 2976b90e23SKevin Wolf 3076b90e23SKevin Wolf=== Conflicting features === 3176b90e23SKevin Wolf 3276b90e23SKevin WolfConvert to compressed target with data file: 3376b90e23SKevin WolfFormatting 'TEST_DIR/t.IMGFMT.src', fmt=IMGFMT size=67108864 3476b90e23SKevin Wolfwrote 1048576/1048576 bytes at offset 0 3576b90e23SKevin Wolf1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 3639f77cb6SEric Blakeqemu-img: error while writing at byte 0: Operation not supported 3776b90e23SKevin Wolf 3876b90e23SKevin WolfConvert uncompressed, then write compressed data manually: 3976b90e23SKevin WolfImages are identical. 4076b90e23SKevin Wolfwrite failed: Operation not supported 4176b90e23SKevin WolfNo errors were found on the image. 4276b90e23SKevin Wolf 4376b90e23SKevin WolfTake an internal snapshot: 44b0a6620aSMichael Tokarevqemu-img: Could not create snapshot 'test': Operation not supported 4576b90e23SKevin WolfNo errors were found on the image. 4676b90e23SKevin Wolf 4776b90e23SKevin Wolf=== Standalone image with external data file (efficient) === 4876b90e23SKevin Wolf 4976b90e23SKevin WolfFormatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 data_file=TEST_DIR/t.IMGFMT.data 5076b90e23SKevin Wolfqcow2 file size before I/O: 196616 5176b90e23SKevin Wolf 5276b90e23SKevin Wolfwrote 4194304/4194304 bytes at offset 1048576 5376b90e23SKevin Wolf4 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 5476b90e23SKevin Wolfdiscard 2097152/2097152 bytes at offset 2097152 5576b90e23SKevin Wolf2 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 5676b90e23SKevin Wolfwrote 3145728/3145728 bytes at offset 3145728 5776b90e23SKevin Wolf3 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 5876b90e23SKevin WolfNo errors were found on the image. 5976b90e23SKevin Wolf 60*52b10c9cSAndrey Drobyshev via[{ "start": 0, "length": 1048576, "depth": 0, "present": false, "zero": true, "data": false, "compressed": false}, 61*52b10c9cSAndrey Drobyshev via{ "start": 1048576, "length": 1048576, "depth": 0, "present": true, "zero": false, "data": true, "compressed": false, "offset": 1048576}, 62*52b10c9cSAndrey Drobyshev via{ "start": 2097152, "length": 2097152, "depth": 0, "present": true, "zero": true, "data": false, "compressed": false}, 63*52b10c9cSAndrey Drobyshev via{ "start": 4194304, "length": 1048576, "depth": 0, "present": true, "zero": true, "data": false, "compressed": false, "offset": 4194304}, 64*52b10c9cSAndrey Drobyshev via{ "start": 5242880, "length": 1048576, "depth": 0, "present": true, "zero": true, "data": false, "compressed": false}, 65*52b10c9cSAndrey Drobyshev via{ "start": 6291456, "length": 60817408, "depth": 0, "present": false, "zero": true, "data": false, "compressed": false}] 6676b90e23SKevin Wolf 6776b90e23SKevin Wolfread 1048576/1048576 bytes at offset 0 6876b90e23SKevin Wolf1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 6976b90e23SKevin Wolfread 1048576/1048576 bytes at offset 1048576 7076b90e23SKevin Wolf1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 7176b90e23SKevin Wolfread 4194304/4194304 bytes at offset 2097152 7276b90e23SKevin Wolf4 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 7376b90e23SKevin Wolf 7476b90e23SKevin Wolfread 1048576/1048576 bytes at offset 0 7576b90e23SKevin Wolf1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 7676b90e23SKevin Wolfread 1048576/1048576 bytes at offset 1048576 7776b90e23SKevin Wolf1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 7876b90e23SKevin Wolfread 1048576/1048576 bytes at offset 4194304 7976b90e23SKevin Wolf1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 8076b90e23SKevin Wolfread 1048576/1048576 bytes at offset 5242880 8176b90e23SKevin Wolf1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 8276b90e23SKevin Wolfqcow2 file size after I/O: 327680 8376b90e23SKevin Wolf 8476b90e23SKevin Wolf=== Standalone image with external data file (valid raw) === 8576b90e23SKevin Wolf 8676b90e23SKevin WolfFormatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 data_file=TEST_DIR/t.IMGFMT.data data_file_raw=on 8748410829SMax Reitzqcow2 file size before I/O: 327680 8876b90e23SKevin Wolf 8976b90e23SKevin Wolfwrote 4194304/4194304 bytes at offset 1048576 9076b90e23SKevin Wolf4 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 9176b90e23SKevin Wolfdiscard 2097152/2097152 bytes at offset 2097152 9276b90e23SKevin Wolf2 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 9376b90e23SKevin Wolfwrote 3145728/3145728 bytes at offset 3145728 9476b90e23SKevin Wolf3 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 9576b90e23SKevin WolfNo errors were found on the image. 9676b90e23SKevin Wolf 97*52b10c9cSAndrey Drobyshev via[{ "start": 0, "length": 2097152, "depth": 0, "present": true, "zero": false, "data": true, "compressed": false, "offset": 0}, 98*52b10c9cSAndrey Drobyshev via{ "start": 2097152, "length": 2097152, "depth": 0, "present": true, "zero": true, "data": false, "compressed": false}, 99*52b10c9cSAndrey Drobyshev via{ "start": 4194304, "length": 2097152, "depth": 0, "present": true, "zero": true, "data": false, "compressed": false, "offset": 4194304}, 100*52b10c9cSAndrey Drobyshev via{ "start": 6291456, "length": 60817408, "depth": 0, "present": true, "zero": false, "data": true, "compressed": false, "offset": 6291456}] 10176b90e23SKevin Wolf 10276b90e23SKevin Wolfread 1048576/1048576 bytes at offset 0 10376b90e23SKevin Wolf1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 10476b90e23SKevin Wolfread 1048576/1048576 bytes at offset 1048576 10576b90e23SKevin Wolf1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 10676b90e23SKevin Wolfread 4194304/4194304 bytes at offset 2097152 10776b90e23SKevin Wolf4 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 10876b90e23SKevin Wolf 1093fb61087SPaolo Bonziniread 1048576/1048576 bytes at offset 0 1103fb61087SPaolo Bonzini1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 1113fb61087SPaolo Bonziniread 1048576/1048576 bytes at offset 1048576 1123fb61087SPaolo Bonzini1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 1133fb61087SPaolo Bonziniread 3145728/3145728 bytes at offset 3145728 1143fb61087SPaolo Bonzini3 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 11576b90e23SKevin Wolfqcow2 file size after I/O: 327680 11676b90e23SKevin Wolf 11776b90e23SKevin Wolf=== bdrv_co_block_status test for file and offset=0 === 11876b90e23SKevin Wolf 11976b90e23SKevin WolfFormatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 data_file=TEST_DIR/t.IMGFMT.data 12076b90e23SKevin Wolfwrote 1048576/1048576 bytes at offset 0 12176b90e23SKevin Wolf1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 12276b90e23SKevin Wolfread 1048576/1048576 bytes at offset 0 12376b90e23SKevin Wolf1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 12476b90e23SKevin WolfOffset Length Mapped to File 12576b90e23SKevin Wolf0 0x100000 0 TEST_DIR/t.qcow2.data 126*52b10c9cSAndrey Drobyshev via[{ "start": 0, "length": 1048576, "depth": 0, "present": true, "zero": false, "data": true, "compressed": false, "offset": 0}, 127*52b10c9cSAndrey Drobyshev via{ "start": 1048576, "length": 66060288, "depth": 0, "present": false, "zero": true, "data": false, "compressed": false}] 128a0cf8dafSKevin Wolf 129a0cf8dafSKevin Wolf=== Copy offloading === 130a0cf8dafSKevin Wolf 131a0cf8dafSKevin WolfFormatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 data_file=TEST_DIR/t.IMGFMT.data 132a0cf8dafSKevin WolfImages are identical. 133a0cf8dafSKevin WolfImages are identical. 134c365625bSMax Reitz 135c365625bSMax Reitz=== Flushing should flush the data file === 136c365625bSMax Reitz 137c365625bSMax Reitzwrote 512/512 bytes at offset 0 138c365625bSMax Reitz512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 139c365625bSMax Reitz 140c365625bSMax ReitzSuccess: qemu-io failed, so the data file was flushed 1412ec7e8a9SMax Reitz 1422ec7e8a9SMax Reitz=== Preallocation with data-file-raw === 1432ec7e8a9SMax Reitz 1442ec7e8a9SMax Reitz--- Using a non-zeroed data file --- 1452ec7e8a9SMax Reitzwrote 1048576/1048576 bytes at offset 0 1462ec7e8a9SMax Reitz1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 1472ec7e8a9SMax Reitz{ "execute": "qmp_capabilities" } 1482ec7e8a9SMax Reitz{"return": {}} 1492ec7e8a9SMax Reitz{ "execute": "blockdev-create", 1502ec7e8a9SMax Reitz "arguments": { 1512ec7e8a9SMax Reitz "job-id": "create", 1522ec7e8a9SMax Reitz "options": { 1532ec7e8a9SMax Reitz "driver": "IMGFMT", 1542ec7e8a9SMax Reitz "size": 1048576, 1552ec7e8a9SMax Reitz "file": "meta", 1562ec7e8a9SMax Reitz "data-file": "data", 1572ec7e8a9SMax Reitz "data-file-raw": true 1582ec7e8a9SMax Reitz } } } 1592ec7e8a9SMax Reitz{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "created", "id": "create"}} 1602ec7e8a9SMax Reitz{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "running", "id": "create"}} 1612ec7e8a9SMax Reitz{"return": {}} 1622ec7e8a9SMax Reitz{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "waiting", "id": "create"}} 1632ec7e8a9SMax Reitz{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "pending", "id": "create"}} 1642ec7e8a9SMax Reitz{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "concluded", "id": "create"}} 1652ec7e8a9SMax Reitz{ "execute": "job-dismiss", "arguments": { "id": "create" } } 1662ec7e8a9SMax Reitz{"timestamp": {"seconds": TIMESTAMP, "microseconds": TIMESTAMP}, "event": "JOB_STATUS_CHANGE", "data": {"status": "null", "id": "create"}} 1672ec7e8a9SMax Reitz{"return": {}} 1682ec7e8a9SMax Reitz 1692ec7e8a9SMax ReitzComparing pattern: 1702ec7e8a9SMax Reitzread 1048576/1048576 bytes at offset 0 1712ec7e8a9SMax Reitz1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 1722ec7e8a9SMax Reitzread 1048576/1048576 bytes at offset 0 1732ec7e8a9SMax Reitz1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 1742ec7e8a9SMax ReitzImages are identical. 1752ec7e8a9SMax Reitz 1762ec7e8a9SMax Reitz--- Truncation (growing) --- 1772ec7e8a9SMax Reitzwrote 1048576/1048576 bytes at offset 1048576 1782ec7e8a9SMax Reitz1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 1792ec7e8a9SMax ReitzImage resized. 1802ec7e8a9SMax Reitz 1812ec7e8a9SMax ReitzComparing pattern: 1822ec7e8a9SMax Reitzread 1048576/1048576 bytes at offset 0 1832ec7e8a9SMax Reitz1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 1842ec7e8a9SMax Reitzread 1048576/1048576 bytes at offset 1048576 1852ec7e8a9SMax Reitz1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 1862ec7e8a9SMax Reitzread 1048576/1048576 bytes at offset 0 1872ec7e8a9SMax Reitz1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 1882ec7e8a9SMax Reitzread 1048576/1048576 bytes at offset 1048576 1892ec7e8a9SMax Reitz1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 1902ec7e8a9SMax ReitzImages are identical. 1912ec7e8a9SMax Reitz 1922ec7e8a9SMax Reitz--- Giving a backing file at runtime --- 1932ec7e8a9SMax ReitzFormatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1048576 data_file=TEST_DIR/t.IMGFMT.data data_file_raw=on 1942ec7e8a9SMax ReitzFormatting 'TEST_DIR/t.IMGFMT.base', fmt=IMGFMT size=1048576 1952ec7e8a9SMax Reitzwrote 1048576/1048576 bytes at offset 0 1962ec7e8a9SMax Reitz1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) 1972ec7e8a9SMax Reitz 1982ec7e8a9SMax ReitzComparing qcow2 image and raw data file: 1992ec7e8a9SMax ReitzImages are identical. 20076b90e23SKevin Wolf*** done 201