1 | The following changes since commit 55b1f14cefcb19ce6d5e28c4c83404230888aa7e: | 1 | The following changes since commit 16aaacb307ed607b9780c12702c44f0fe52edc7e: |
---|---|---|---|
2 | 2 | ||
3 | Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-3.0-pull-request' into staging (2018-07-23 14:03:14 +0100) | 3 | Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20200430' into staging (2020-04-30 14:00:36 +0100) |
4 | 4 | ||
5 | are available in the git repository at: | 5 | are available in the Git repository at: |
6 | 6 | ||
7 | git://repo.or.cz/qemu/kevin.git tags/for-upstream | 7 | git://repo.or.cz/qemu/kevin.git tags/for-upstream |
8 | 8 | ||
9 | for you to fetch changes up to 3e31b4e17064d22e533071aaa57d3f01499ef910: | 9 | for you to fetch changes up to eaae29ef89d498d0eac553c77b554f310a47f809: |
10 | 10 | ||
11 | block/vvfat: Disable debug message by default (2018-07-23 16:50:43 +0200) | 11 | qemu-storage-daemon: Fix non-string --object properties (2020-04-30 17:51:07 +0200) |
12 | 12 | ||
13 | ---------------------------------------------------------------- | 13 | ---------------------------------------------------------------- |
14 | Block layer patches: | 14 | Block layer patches: |
15 | 15 | ||
16 | - vvfat: Disable debug message by default | 16 | - Fix resize (extending) of short overlays |
17 | - qemu-iotests fixes | 17 | - nvme: introduce PMR support from NVMe 1.4 spec |
18 | - Fix typos in comments | 18 | - qemu-storage-daemon: Fix non-string --object properties |
19 | 19 | ||
20 | ---------------------------------------------------------------- | 20 | ---------------------------------------------------------------- |
21 | John Snow (1): | 21 | Alberto Garcia (1): |
22 | iotests: remove LUKS support from test 226 | 22 | qcow2: Add incompatibility note between backing files and raw external data files |
23 | 23 | ||
24 | Kevin Wolf (1): | 24 | Andrzej Jakowski (1): |
25 | qemu-iotests: Use host_device instead of file in 149 | 25 | nvme: introduce PMR support from NVMe 1.4 spec |
26 | 26 | ||
27 | Max Reitz (2): | 27 | Kevin Wolf (12): |
28 | iotest: Fix filtering order in 226 | 28 | block: Add flags to BlockDriver.bdrv_co_truncate() |
29 | iotests: Disallow compat=0.10 in 223 | 29 | block: Add flags to bdrv(_co)_truncate() |
30 | block-backend: Add flags to blk_truncate() | ||
31 | qcow2: Support BDRV_REQ_ZERO_WRITE for truncate | ||
32 | raw-format: Support BDRV_REQ_ZERO_WRITE for truncate | ||
33 | file-posix: Support BDRV_REQ_ZERO_WRITE for truncate | ||
34 | block: truncate: Don't make backing file data visible | ||
35 | iotests: Filter testfiles out in filter_img_info() | ||
36 | iotests: Test committing to short backing file | ||
37 | qcow2: Forward ZERO_WRITE flag for full preallocation | ||
38 | qom: Factor out user_creatable_add_dict() | ||
39 | qemu-storage-daemon: Fix non-string --object properties | ||
30 | 40 | ||
31 | Peter Lieven (1): | 41 | Paolo Bonzini (1): |
32 | qemu-img: avoid overflow of min_sparse parameter | 42 | qemu-iotests: allow qcow2 external discarded clusters to contain stale data |
33 | 43 | ||
34 | Stefan Weil (1): | 44 | docs/interop/qcow2.txt | 3 + |
35 | block: Fix typos in comments (found by codespell) | 45 | hw/block/nvme.h | 2 + |
46 | include/block/block.h | 5 +- | ||
47 | include/block/block_int.h | 10 +- | ||
48 | include/block/nvme.h | 172 ++++++++++++++++++++++++++ | ||
49 | include/qom/object_interfaces.h | 16 +++ | ||
50 | include/sysemu/block-backend.h | 2 +- | ||
51 | block.c | 3 +- | ||
52 | block/block-backend.c | 4 +- | ||
53 | block/commit.c | 4 +- | ||
54 | block/crypto.c | 7 +- | ||
55 | block/file-posix.c | 6 +- | ||
56 | block/file-win32.c | 2 +- | ||
57 | block/gluster.c | 1 + | ||
58 | block/io.c | 43 ++++++- | ||
59 | block/iscsi.c | 2 +- | ||
60 | block/mirror.c | 2 +- | ||
61 | block/nfs.c | 3 +- | ||
62 | block/parallels.c | 6 +- | ||
63 | block/qcow.c | 4 +- | ||
64 | block/qcow2-cluster.c | 2 +- | ||
65 | block/qcow2-refcount.c | 2 +- | ||
66 | block/qcow2.c | 73 +++++++++-- | ||
67 | block/qed.c | 3 +- | ||
68 | block/raw-format.c | 6 +- | ||
69 | block/rbd.c | 1 + | ||
70 | block/sheepdog.c | 4 +- | ||
71 | block/ssh.c | 2 +- | ||
72 | block/vdi.c | 2 +- | ||
73 | block/vhdx-log.c | 2 +- | ||
74 | block/vhdx.c | 6 +- | ||
75 | block/vmdk.c | 8 +- | ||
76 | block/vpc.c | 2 +- | ||
77 | blockdev.c | 2 +- | ||
78 | hw/block/nvme.c | 109 ++++++++++++++++ | ||
79 | qemu-img.c | 2 +- | ||
80 | qemu-io-cmds.c | 2 +- | ||
81 | qemu-storage-daemon.c | 4 +- | ||
82 | qom/object_interfaces.c | 31 +++++ | ||
83 | qom/qom-qmp-cmds.c | 24 +--- | ||
84 | tests/test-block-iothread.c | 9 +- | ||
85 | tests/qemu-iotests/iotests.py | 5 +- | ||
86 | hw/block/Makefile.objs | 2 +- | ||
87 | hw/block/trace-events | 4 + | ||
88 | tests/qemu-iotests/244 | 10 +- | ||
89 | tests/qemu-iotests/244.out | 9 +- | ||
90 | tests/qemu-iotests/274 | 155 +++++++++++++++++++++++ | ||
91 | tests/qemu-iotests/274.out | 268 ++++++++++++++++++++++++++++++++++++++++ | ||
92 | tests/qemu-iotests/group | 1 + | ||
93 | 49 files changed, 951 insertions(+), 96 deletions(-) | ||
94 | create mode 100755 tests/qemu-iotests/274 | ||
95 | create mode 100644 tests/qemu-iotests/274.out | ||
36 | 96 | ||
37 | Thomas Huth (1): | ||
38 | block/vvfat: Disable debug message by default | ||
39 | 97 | ||
40 | block.c | 2 +- | ||
41 | block/backup.c | 4 +- | ||
42 | block/curl.c | 2 +- | ||
43 | block/gluster.c | 2 +- | ||
44 | block/vhdx.c | 2 +- | ||
45 | block/vvfat.c | 4 +- | ||
46 | qemu-img.c | 16 ++- | ||
47 | tests/qemu-iotests/149 | 2 +- | ||
48 | tests/qemu-iotests/149.out | 344 ++++++++++++++++++++++----------------------- | ||
49 | tests/qemu-iotests/223 | 2 + | ||
50 | tests/qemu-iotests/226 | 7 +- | ||
51 | 11 files changed, 199 insertions(+), 188 deletions(-) | ||
52 | diff view generated by jsdifflib |
1 | From: John Snow <jsnow@redhat.com> | 1 | From: Alberto Garcia <berto@igalia.com> |
---|---|---|---|
2 | 2 | ||
3 | This test doesn't actually care about the format anyway, it just | 3 | Backing files and raw external data files are mutually exclusive. |
4 | supports "all formats" as a convenience. LUKS however does not use a | 4 | The documentation of the raw external data bit (in autoclear_features) |
5 | simple image filename which confuses this iotest. | 5 | already indicates that, but we should also mention it on the other |
6 | side. | ||
6 | 7 | ||
7 | We can simply skip the test for formats that use IMGOPTSSYNTAX for | 8 | Suggested-by: Eric Blake <eblake@redhat.com> |
8 | their filenames without missing much coverage. | 9 | Signed-off-by: Alberto Garcia <berto@igalia.com> |
9 | 10 | Message-Id: <20200410121816.8334-1-berto@igalia.com> | |
10 | Signed-off-by: John Snow <jsnow@redhat.com> | 11 | Reviewed-by: Eric Blake <eblake@redhat.com> |
11 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> | 12 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> |
12 | --- | 13 | --- |
13 | tests/qemu-iotests/226 | 3 +++ | 14 | docs/interop/qcow2.txt | 3 +++ |
14 | 1 file changed, 3 insertions(+) | 15 | 1 file changed, 3 insertions(+) |
15 | 16 | ||
16 | diff --git a/tests/qemu-iotests/226 b/tests/qemu-iotests/226 | 17 | diff --git a/docs/interop/qcow2.txt b/docs/interop/qcow2.txt |
17 | index XXXXXXX..XXXXXXX 100755 | 18 | index XXXXXXX..XXXXXXX 100644 |
18 | --- a/tests/qemu-iotests/226 | 19 | --- a/docs/interop/qcow2.txt |
19 | +++ b/tests/qemu-iotests/226 | 20 | +++ b/docs/interop/qcow2.txt |
20 | @@ -XXX,XX +XXX,XX @@ trap "_cleanup; exit \$status" 0 1 2 3 15 | 21 | @@ -XXX,XX +XXX,XX @@ The first cluster of a qcow2 image contains the file header: |
21 | 22 | is stored (NB: The string is not null terminated). 0 if the | |
22 | # Generic format, but tests file-protocol specific error handling | 23 | image doesn't have a backing file. |
23 | _supported_fmt generic | 24 | |
24 | +if [ "$IMGOPTSSYNTAX" = "true" ]; then | 25 | + Note: backing files are incompatible with raw external data |
25 | + _unsupported_fmt $IMGFMT | 26 | + files (auto-clear feature bit 1). |
26 | +fi | 27 | + |
27 | _supported_proto file | 28 | 16 - 19: backing_file_size |
28 | _supported_os Linux | 29 | Length of the backing file name in bytes. Must not be |
29 | 30 | longer than 1023 bytes. Undefined if the image doesn't have | |
30 | -- | 31 | -- |
31 | 2.13.6 | 32 | 2.25.3 |
32 | 33 | ||
33 | 34 | diff view generated by jsdifflib |
New patch | |||
---|---|---|---|
1 | From: Paolo Bonzini <pbonzini@redhat.com> | ||
1 | 2 | ||
3 | Test 244 checks the expected behavior of qcow2 external data files | ||
4 | with respect to zero and discarded clusters. Filesystems however | ||
5 | are free to ignore discard requests, and this seems to be the | ||
6 | case for overlayfs. Relax the tests to skip checks on the | ||
7 | external data file for discarded areas, which implies not using | ||
8 | qemu-img compare in the data_file_raw=on case. | ||
9 | |||
10 | This fixes docker tests on RHEL8. | ||
11 | |||
12 | Cc: Kevin Wolf <kwolf@redhat.com> | ||
13 | Cc: qemu-block@nongnu.org | ||
14 | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> | ||
15 | Message-Id: <20200409191006.24429-1-pbonzini@redhat.com> | ||
16 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> | ||
17 | --- | ||
18 | tests/qemu-iotests/244 | 10 ++++++++-- | ||
19 | tests/qemu-iotests/244.out | 9 ++++++--- | ||
20 | 2 files changed, 14 insertions(+), 5 deletions(-) | ||
21 | |||
22 | diff --git a/tests/qemu-iotests/244 b/tests/qemu-iotests/244 | ||
23 | index XXXXXXX..XXXXXXX 100755 | ||
24 | --- a/tests/qemu-iotests/244 | ||
25 | +++ b/tests/qemu-iotests/244 | ||
26 | @@ -XXX,XX +XXX,XX @@ $QEMU_IO -c 'read -P 0 0 1M' \ | ||
27 | echo | ||
28 | $QEMU_IO -c 'read -P 0 0 1M' \ | ||
29 | -c 'read -P 0x11 1M 1M' \ | ||
30 | - -c 'read -P 0 2M 2M' \ | ||
31 | -c 'read -P 0x11 4M 1M' \ | ||
32 | -c 'read -P 0 5M 1M' \ | ||
33 | -f raw "$TEST_IMG.data" | | ||
34 | @@ -XXX,XX +XXX,XX @@ $QEMU_IO -c 'read -P 0 0 1M' \ | ||
35 | -f $IMGFMT "$TEST_IMG" | | ||
36 | _filter_qemu_io | ||
37 | |||
38 | +# Discarded clusters are only marked as such in the qcow2 metadata, but | ||
39 | +# they can contain stale data in the external data file. Instead, zero | ||
40 | +# clusters must be zeroed in the external data file too. | ||
41 | echo | ||
42 | -$QEMU_IMG compare "$TEST_IMG" "$TEST_IMG.data" | ||
43 | +$QEMU_IO -c 'read -P 0 0 1M' \ | ||
44 | + -c 'read -P 0x11 1M 1M' \ | ||
45 | + -c 'read -P 0 3M 3M' \ | ||
46 | + -f raw "$TEST_IMG".data | | ||
47 | + _filter_qemu_io | ||
48 | |||
49 | echo -n "qcow2 file size after I/O: " | ||
50 | du -b $TEST_IMG | cut -f1 | ||
51 | diff --git a/tests/qemu-iotests/244.out b/tests/qemu-iotests/244.out | ||
52 | index XXXXXXX..XXXXXXX 100644 | ||
53 | --- a/tests/qemu-iotests/244.out | ||
54 | +++ b/tests/qemu-iotests/244.out | ||
55 | @@ -XXX,XX +XXX,XX @@ read 1048576/1048576 bytes at offset 0 | ||
56 | 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
57 | read 1048576/1048576 bytes at offset 1048576 | ||
58 | 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
59 | -read 2097152/2097152 bytes at offset 2097152 | ||
60 | -2 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
61 | read 1048576/1048576 bytes at offset 4194304 | ||
62 | 1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
63 | read 1048576/1048576 bytes at offset 5242880 | ||
64 | @@ -XXX,XX +XXX,XX @@ read 1048576/1048576 bytes at offset 1048576 | ||
65 | read 4194304/4194304 bytes at offset 2097152 | ||
66 | 4 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
67 | |||
68 | -Images are identical. | ||
69 | +read 1048576/1048576 bytes at offset 0 | ||
70 | +1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
71 | +read 1048576/1048576 bytes at offset 1048576 | ||
72 | +1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
73 | +read 3145728/3145728 bytes at offset 3145728 | ||
74 | +3 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
75 | qcow2 file size after I/O: 327680 | ||
76 | |||
77 | === bdrv_co_block_status test for file and offset=0 === | ||
78 | -- | ||
79 | 2.25.3 | ||
80 | |||
81 | diff view generated by jsdifflib |
New patch | |||
---|---|---|---|
1 | 1 | This adds a new BdrvRequestFlags parameter to the .bdrv_co_truncate() | |
2 | driver callbacks, and a supported_truncate_flags field in | ||
3 | BlockDriverState that allows drivers to advertise support for request | ||
4 | flags in the context of truncate. | ||
5 | |||
6 | For now, we always pass 0 and no drivers declare support for any flag. | ||
7 | |||
8 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> | ||
9 | Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | ||
10 | Reviewed-by: Alberto Garcia <berto@igalia.com> | ||
11 | Reviewed-by: Max Reitz <mreitz@redhat.com> | ||
12 | Message-Id: <20200424125448.63318-2-kwolf@redhat.com> | ||
13 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> | ||
14 | --- | ||
15 | include/block/block_int.h | 10 +++++++++- | ||
16 | block/crypto.c | 3 ++- | ||
17 | block/file-posix.c | 2 +- | ||
18 | block/file-win32.c | 2 +- | ||
19 | block/gluster.c | 1 + | ||
20 | block/io.c | 8 +++++++- | ||
21 | block/iscsi.c | 2 +- | ||
22 | block/nfs.c | 3 ++- | ||
23 | block/qcow2.c | 2 +- | ||
24 | block/qed.c | 1 + | ||
25 | block/raw-format.c | 2 +- | ||
26 | block/rbd.c | 1 + | ||
27 | block/sheepdog.c | 4 ++-- | ||
28 | block/ssh.c | 2 +- | ||
29 | tests/test-block-iothread.c | 3 ++- | ||
30 | 15 files changed, 33 insertions(+), 13 deletions(-) | ||
31 | |||
32 | diff --git a/include/block/block_int.h b/include/block/block_int.h | ||
33 | index XXXXXXX..XXXXXXX 100644 | ||
34 | --- a/include/block/block_int.h | ||
35 | +++ b/include/block/block_int.h | ||
36 | @@ -XXX,XX +XXX,XX @@ struct BlockDriver { | ||
37 | */ | ||
38 | int coroutine_fn (*bdrv_co_truncate)(BlockDriverState *bs, int64_t offset, | ||
39 | bool exact, PreallocMode prealloc, | ||
40 | - Error **errp); | ||
41 | + BdrvRequestFlags flags, Error **errp); | ||
42 | |||
43 | int64_t (*bdrv_getlength)(BlockDriverState *bs); | ||
44 | bool has_variable_length; | ||
45 | @@ -XXX,XX +XXX,XX @@ struct BlockDriverState { | ||
46 | /* Flags honored during pwrite_zeroes (so far: BDRV_REQ_FUA, | ||
47 | * BDRV_REQ_MAY_UNMAP, BDRV_REQ_WRITE_UNCHANGED) */ | ||
48 | unsigned int supported_zero_flags; | ||
49 | + /* | ||
50 | + * Flags honoured during truncate (so far: BDRV_REQ_ZERO_WRITE). | ||
51 | + * | ||
52 | + * If BDRV_REQ_ZERO_WRITE is given, the truncate operation must make sure | ||
53 | + * that any added space reads as all zeros. If this can't be guaranteed, | ||
54 | + * the operation must fail. | ||
55 | + */ | ||
56 | + unsigned int supported_truncate_flags; | ||
57 | |||
58 | /* the following member gives a name to every node on the bs graph. */ | ||
59 | char node_name[32]; | ||
60 | diff --git a/block/crypto.c b/block/crypto.c | ||
61 | index XXXXXXX..XXXXXXX 100644 | ||
62 | --- a/block/crypto.c | ||
63 | +++ b/block/crypto.c | ||
64 | @@ -XXX,XX +XXX,XX @@ static int block_crypto_co_create_generic(BlockDriverState *bs, | ||
65 | |||
66 | static int coroutine_fn | ||
67 | block_crypto_co_truncate(BlockDriverState *bs, int64_t offset, bool exact, | ||
68 | - PreallocMode prealloc, Error **errp) | ||
69 | + PreallocMode prealloc, BdrvRequestFlags flags, | ||
70 | + Error **errp) | ||
71 | { | ||
72 | BlockCrypto *crypto = bs->opaque; | ||
73 | uint64_t payload_offset = | ||
74 | diff --git a/block/file-posix.c b/block/file-posix.c | ||
75 | index XXXXXXX..XXXXXXX 100644 | ||
76 | --- a/block/file-posix.c | ||
77 | +++ b/block/file-posix.c | ||
78 | @@ -XXX,XX +XXX,XX @@ raw_regular_truncate(BlockDriverState *bs, int fd, int64_t offset, | ||
79 | |||
80 | static int coroutine_fn raw_co_truncate(BlockDriverState *bs, int64_t offset, | ||
81 | bool exact, PreallocMode prealloc, | ||
82 | - Error **errp) | ||
83 | + BdrvRequestFlags flags, Error **errp) | ||
84 | { | ||
85 | BDRVRawState *s = bs->opaque; | ||
86 | struct stat st; | ||
87 | diff --git a/block/file-win32.c b/block/file-win32.c | ||
88 | index XXXXXXX..XXXXXXX 100644 | ||
89 | --- a/block/file-win32.c | ||
90 | +++ b/block/file-win32.c | ||
91 | @@ -XXX,XX +XXX,XX @@ static void raw_close(BlockDriverState *bs) | ||
92 | |||
93 | static int coroutine_fn raw_co_truncate(BlockDriverState *bs, int64_t offset, | ||
94 | bool exact, PreallocMode prealloc, | ||
95 | - Error **errp) | ||
96 | + BdrvRequestFlags flags, Error **errp) | ||
97 | { | ||
98 | BDRVRawState *s = bs->opaque; | ||
99 | LONG low, high; | ||
100 | diff --git a/block/gluster.c b/block/gluster.c | ||
101 | index XXXXXXX..XXXXXXX 100644 | ||
102 | --- a/block/gluster.c | ||
103 | +++ b/block/gluster.c | ||
104 | @@ -XXX,XX +XXX,XX @@ static coroutine_fn int qemu_gluster_co_truncate(BlockDriverState *bs, | ||
105 | int64_t offset, | ||
106 | bool exact, | ||
107 | PreallocMode prealloc, | ||
108 | + BdrvRequestFlags flags, | ||
109 | Error **errp) | ||
110 | { | ||
111 | BDRVGlusterState *s = bs->opaque; | ||
112 | diff --git a/block/io.c b/block/io.c | ||
113 | index XXXXXXX..XXXXXXX 100644 | ||
114 | --- a/block/io.c | ||
115 | +++ b/block/io.c | ||
116 | @@ -XXX,XX +XXX,XX @@ int coroutine_fn bdrv_co_truncate(BdrvChild *child, int64_t offset, bool exact, | ||
117 | BlockDriverState *bs = child->bs; | ||
118 | BlockDriver *drv = bs->drv; | ||
119 | BdrvTrackedRequest req; | ||
120 | + BdrvRequestFlags flags = 0; | ||
121 | int64_t old_size, new_bytes; | ||
122 | int ret; | ||
123 | |||
124 | @@ -XXX,XX +XXX,XX @@ int coroutine_fn bdrv_co_truncate(BdrvChild *child, int64_t offset, bool exact, | ||
125 | } | ||
126 | |||
127 | if (drv->bdrv_co_truncate) { | ||
128 | - ret = drv->bdrv_co_truncate(bs, offset, exact, prealloc, errp); | ||
129 | + if (flags & ~bs->supported_truncate_flags) { | ||
130 | + error_setg(errp, "Block driver does not support requested flags"); | ||
131 | + ret = -ENOTSUP; | ||
132 | + goto out; | ||
133 | + } | ||
134 | + ret = drv->bdrv_co_truncate(bs, offset, exact, prealloc, flags, errp); | ||
135 | } else if (bs->file && drv->is_filter) { | ||
136 | ret = bdrv_co_truncate(bs->file, offset, exact, prealloc, errp); | ||
137 | } else { | ||
138 | diff --git a/block/iscsi.c b/block/iscsi.c | ||
139 | index XXXXXXX..XXXXXXX 100644 | ||
140 | --- a/block/iscsi.c | ||
141 | +++ b/block/iscsi.c | ||
142 | @@ -XXX,XX +XXX,XX @@ static void iscsi_reopen_commit(BDRVReopenState *reopen_state) | ||
143 | |||
144 | static int coroutine_fn iscsi_co_truncate(BlockDriverState *bs, int64_t offset, | ||
145 | bool exact, PreallocMode prealloc, | ||
146 | - Error **errp) | ||
147 | + BdrvRequestFlags flags, Error **errp) | ||
148 | { | ||
149 | IscsiLun *iscsilun = bs->opaque; | ||
150 | int64_t cur_length; | ||
151 | diff --git a/block/nfs.c b/block/nfs.c | ||
152 | index XXXXXXX..XXXXXXX 100644 | ||
153 | --- a/block/nfs.c | ||
154 | +++ b/block/nfs.c | ||
155 | @@ -XXX,XX +XXX,XX @@ static int64_t nfs_get_allocated_file_size(BlockDriverState *bs) | ||
156 | |||
157 | static int coroutine_fn | ||
158 | nfs_file_co_truncate(BlockDriverState *bs, int64_t offset, bool exact, | ||
159 | - PreallocMode prealloc, Error **errp) | ||
160 | + PreallocMode prealloc, BdrvRequestFlags flags, | ||
161 | + Error **errp) | ||
162 | { | ||
163 | NFSClient *client = bs->opaque; | ||
164 | int ret; | ||
165 | diff --git a/block/qcow2.c b/block/qcow2.c | ||
166 | index XXXXXXX..XXXXXXX 100644 | ||
167 | --- a/block/qcow2.c | ||
168 | +++ b/block/qcow2.c | ||
169 | @@ -XXX,XX +XXX,XX @@ fail: | ||
170 | |||
171 | static int coroutine_fn qcow2_co_truncate(BlockDriverState *bs, int64_t offset, | ||
172 | bool exact, PreallocMode prealloc, | ||
173 | - Error **errp) | ||
174 | + BdrvRequestFlags flags, Error **errp) | ||
175 | { | ||
176 | BDRVQcow2State *s = bs->opaque; | ||
177 | uint64_t old_length; | ||
178 | diff --git a/block/qed.c b/block/qed.c | ||
179 | index XXXXXXX..XXXXXXX 100644 | ||
180 | --- a/block/qed.c | ||
181 | +++ b/block/qed.c | ||
182 | @@ -XXX,XX +XXX,XX @@ static int coroutine_fn bdrv_qed_co_truncate(BlockDriverState *bs, | ||
183 | int64_t offset, | ||
184 | bool exact, | ||
185 | PreallocMode prealloc, | ||
186 | + BdrvRequestFlags flags, | ||
187 | Error **errp) | ||
188 | { | ||
189 | BDRVQEDState *s = bs->opaque; | ||
190 | diff --git a/block/raw-format.c b/block/raw-format.c | ||
191 | index XXXXXXX..XXXXXXX 100644 | ||
192 | --- a/block/raw-format.c | ||
193 | +++ b/block/raw-format.c | ||
194 | @@ -XXX,XX +XXX,XX @@ static void raw_refresh_limits(BlockDriverState *bs, Error **errp) | ||
195 | |||
196 | static int coroutine_fn raw_co_truncate(BlockDriverState *bs, int64_t offset, | ||
197 | bool exact, PreallocMode prealloc, | ||
198 | - Error **errp) | ||
199 | + BdrvRequestFlags flags, Error **errp) | ||
200 | { | ||
201 | BDRVRawState *s = bs->opaque; | ||
202 | |||
203 | diff --git a/block/rbd.c b/block/rbd.c | ||
204 | index XXXXXXX..XXXXXXX 100644 | ||
205 | --- a/block/rbd.c | ||
206 | +++ b/block/rbd.c | ||
207 | @@ -XXX,XX +XXX,XX @@ static int coroutine_fn qemu_rbd_co_truncate(BlockDriverState *bs, | ||
208 | int64_t offset, | ||
209 | bool exact, | ||
210 | PreallocMode prealloc, | ||
211 | + BdrvRequestFlags flags, | ||
212 | Error **errp) | ||
213 | { | ||
214 | int r; | ||
215 | diff --git a/block/sheepdog.c b/block/sheepdog.c | ||
216 | index XXXXXXX..XXXXXXX 100644 | ||
217 | --- a/block/sheepdog.c | ||
218 | +++ b/block/sheepdog.c | ||
219 | @@ -XXX,XX +XXX,XX @@ static int64_t sd_getlength(BlockDriverState *bs) | ||
220 | |||
221 | static int coroutine_fn sd_co_truncate(BlockDriverState *bs, int64_t offset, | ||
222 | bool exact, PreallocMode prealloc, | ||
223 | - Error **errp) | ||
224 | + BdrvRequestFlags flags, Error **errp) | ||
225 | { | ||
226 | BDRVSheepdogState *s = bs->opaque; | ||
227 | int ret, fd; | ||
228 | @@ -XXX,XX +XXX,XX @@ static coroutine_fn int sd_co_writev(BlockDriverState *bs, int64_t sector_num, | ||
229 | |||
230 | assert(!flags); | ||
231 | if (offset > s->inode.vdi_size) { | ||
232 | - ret = sd_co_truncate(bs, offset, false, PREALLOC_MODE_OFF, NULL); | ||
233 | + ret = sd_co_truncate(bs, offset, false, PREALLOC_MODE_OFF, 0, NULL); | ||
234 | if (ret < 0) { | ||
235 | return ret; | ||
236 | } | ||
237 | diff --git a/block/ssh.c b/block/ssh.c | ||
238 | index XXXXXXX..XXXXXXX 100644 | ||
239 | --- a/block/ssh.c | ||
240 | +++ b/block/ssh.c | ||
241 | @@ -XXX,XX +XXX,XX @@ static int64_t ssh_getlength(BlockDriverState *bs) | ||
242 | |||
243 | static int coroutine_fn ssh_co_truncate(BlockDriverState *bs, int64_t offset, | ||
244 | bool exact, PreallocMode prealloc, | ||
245 | - Error **errp) | ||
246 | + BdrvRequestFlags flags, Error **errp) | ||
247 | { | ||
248 | BDRVSSHState *s = bs->opaque; | ||
249 | |||
250 | diff --git a/tests/test-block-iothread.c b/tests/test-block-iothread.c | ||
251 | index XXXXXXX..XXXXXXX 100644 | ||
252 | --- a/tests/test-block-iothread.c | ||
253 | +++ b/tests/test-block-iothread.c | ||
254 | @@ -XXX,XX +XXX,XX @@ static int coroutine_fn bdrv_test_co_pdiscard(BlockDriverState *bs, | ||
255 | |||
256 | static int coroutine_fn | ||
257 | bdrv_test_co_truncate(BlockDriverState *bs, int64_t offset, bool exact, | ||
258 | - PreallocMode prealloc, Error **errp) | ||
259 | + PreallocMode prealloc, BdrvRequestFlags flags, | ||
260 | + Error **errp) | ||
261 | { | ||
262 | return 0; | ||
263 | } | ||
264 | -- | ||
265 | 2.25.3 | ||
266 | |||
267 | diff view generated by jsdifflib |
New patch | |||
---|---|---|---|
1 | Now that block drivers can support flags for .bdrv_co_truncate, expose | ||
2 | the parameter in the node level interfaces bdrv_co_truncate() and | ||
3 | bdrv_truncate(). | ||
1 | 4 | ||
5 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> | ||
6 | Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | ||
7 | Reviewed-by: Alberto Garcia <berto@igalia.com> | ||
8 | Reviewed-by: Max Reitz <mreitz@redhat.com> | ||
9 | Message-Id: <20200424125448.63318-3-kwolf@redhat.com> | ||
10 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> | ||
11 | --- | ||
12 | include/block/block.h | 5 +++-- | ||
13 | block/block-backend.c | 2 +- | ||
14 | block/crypto.c | 2 +- | ||
15 | block/io.c | 12 +++++++----- | ||
16 | block/parallels.c | 6 +++--- | ||
17 | block/qcow.c | 4 ++-- | ||
18 | block/qcow2-refcount.c | 2 +- | ||
19 | block/qcow2.c | 15 +++++++++------ | ||
20 | block/raw-format.c | 2 +- | ||
21 | block/vhdx-log.c | 2 +- | ||
22 | block/vhdx.c | 2 +- | ||
23 | block/vmdk.c | 2 +- | ||
24 | tests/test-block-iothread.c | 6 +++--- | ||
25 | 13 files changed, 34 insertions(+), 28 deletions(-) | ||
26 | |||
27 | diff --git a/include/block/block.h b/include/block/block.h | ||
28 | index XXXXXXX..XXXXXXX 100644 | ||
29 | --- a/include/block/block.h | ||
30 | +++ b/include/block/block.h | ||
31 | @@ -XXX,XX +XXX,XX @@ BlockDriverState *bdrv_find_backing_image(BlockDriverState *bs, | ||
32 | void bdrv_refresh_filename(BlockDriverState *bs); | ||
33 | |||
34 | int coroutine_fn bdrv_co_truncate(BdrvChild *child, int64_t offset, bool exact, | ||
35 | - PreallocMode prealloc, Error **errp); | ||
36 | + PreallocMode prealloc, BdrvRequestFlags flags, | ||
37 | + Error **errp); | ||
38 | int bdrv_truncate(BdrvChild *child, int64_t offset, bool exact, | ||
39 | - PreallocMode prealloc, Error **errp); | ||
40 | + PreallocMode prealloc, BdrvRequestFlags flags, Error **errp); | ||
41 | |||
42 | int64_t bdrv_nb_sectors(BlockDriverState *bs); | ||
43 | int64_t bdrv_getlength(BlockDriverState *bs); | ||
44 | diff --git a/block/block-backend.c b/block/block-backend.c | ||
45 | index XXXXXXX..XXXXXXX 100644 | ||
46 | --- a/block/block-backend.c | ||
47 | +++ b/block/block-backend.c | ||
48 | @@ -XXX,XX +XXX,XX @@ int blk_truncate(BlockBackend *blk, int64_t offset, bool exact, | ||
49 | return -ENOMEDIUM; | ||
50 | } | ||
51 | |||
52 | - return bdrv_truncate(blk->root, offset, exact, prealloc, errp); | ||
53 | + return bdrv_truncate(blk->root, offset, exact, prealloc, 0, errp); | ||
54 | } | ||
55 | |||
56 | int blk_save_vmstate(BlockBackend *blk, const uint8_t *buf, | ||
57 | diff --git a/block/crypto.c b/block/crypto.c | ||
58 | index XXXXXXX..XXXXXXX 100644 | ||
59 | --- a/block/crypto.c | ||
60 | +++ b/block/crypto.c | ||
61 | @@ -XXX,XX +XXX,XX @@ block_crypto_co_truncate(BlockDriverState *bs, int64_t offset, bool exact, | ||
62 | |||
63 | offset += payload_offset; | ||
64 | |||
65 | - return bdrv_co_truncate(bs->file, offset, exact, prealloc, errp); | ||
66 | + return bdrv_co_truncate(bs->file, offset, exact, prealloc, 0, errp); | ||
67 | } | ||
68 | |||
69 | static void block_crypto_close(BlockDriverState *bs) | ||
70 | diff --git a/block/io.c b/block/io.c | ||
71 | index XXXXXXX..XXXXXXX 100644 | ||
72 | --- a/block/io.c | ||
73 | +++ b/block/io.c | ||
74 | @@ -XXX,XX +XXX,XX @@ static void bdrv_parent_cb_resize(BlockDriverState *bs) | ||
75 | * 'offset' bytes in length. | ||
76 | */ | ||
77 | int coroutine_fn bdrv_co_truncate(BdrvChild *child, int64_t offset, bool exact, | ||
78 | - PreallocMode prealloc, Error **errp) | ||
79 | + PreallocMode prealloc, BdrvRequestFlags flags, | ||
80 | + Error **errp) | ||
81 | { | ||
82 | BlockDriverState *bs = child->bs; | ||
83 | BlockDriver *drv = bs->drv; | ||
84 | BdrvTrackedRequest req; | ||
85 | - BdrvRequestFlags flags = 0; | ||
86 | int64_t old_size, new_bytes; | ||
87 | int ret; | ||
88 | |||
89 | @@ -XXX,XX +XXX,XX @@ int coroutine_fn bdrv_co_truncate(BdrvChild *child, int64_t offset, bool exact, | ||
90 | } | ||
91 | ret = drv->bdrv_co_truncate(bs, offset, exact, prealloc, flags, errp); | ||
92 | } else if (bs->file && drv->is_filter) { | ||
93 | - ret = bdrv_co_truncate(bs->file, offset, exact, prealloc, errp); | ||
94 | + ret = bdrv_co_truncate(bs->file, offset, exact, prealloc, flags, errp); | ||
95 | } else { | ||
96 | error_setg(errp, "Image format driver does not support resize"); | ||
97 | ret = -ENOTSUP; | ||
98 | @@ -XXX,XX +XXX,XX @@ typedef struct TruncateCo { | ||
99 | int64_t offset; | ||
100 | bool exact; | ||
101 | PreallocMode prealloc; | ||
102 | + BdrvRequestFlags flags; | ||
103 | Error **errp; | ||
104 | int ret; | ||
105 | } TruncateCo; | ||
106 | @@ -XXX,XX +XXX,XX @@ static void coroutine_fn bdrv_truncate_co_entry(void *opaque) | ||
107 | { | ||
108 | TruncateCo *tco = opaque; | ||
109 | tco->ret = bdrv_co_truncate(tco->child, tco->offset, tco->exact, | ||
110 | - tco->prealloc, tco->errp); | ||
111 | + tco->prealloc, tco->flags, tco->errp); | ||
112 | aio_wait_kick(); | ||
113 | } | ||
114 | |||
115 | int bdrv_truncate(BdrvChild *child, int64_t offset, bool exact, | ||
116 | - PreallocMode prealloc, Error **errp) | ||
117 | + PreallocMode prealloc, BdrvRequestFlags flags, Error **errp) | ||
118 | { | ||
119 | Coroutine *co; | ||
120 | TruncateCo tco = { | ||
121 | @@ -XXX,XX +XXX,XX @@ int bdrv_truncate(BdrvChild *child, int64_t offset, bool exact, | ||
122 | .offset = offset, | ||
123 | .exact = exact, | ||
124 | .prealloc = prealloc, | ||
125 | + .flags = flags, | ||
126 | .errp = errp, | ||
127 | .ret = NOT_DONE, | ||
128 | }; | ||
129 | diff --git a/block/parallels.c b/block/parallels.c | ||
130 | index XXXXXXX..XXXXXXX 100644 | ||
131 | --- a/block/parallels.c | ||
132 | +++ b/block/parallels.c | ||
133 | @@ -XXX,XX +XXX,XX @@ static int64_t allocate_clusters(BlockDriverState *bs, int64_t sector_num, | ||
134 | } else { | ||
135 | ret = bdrv_truncate(bs->file, | ||
136 | (s->data_end + space) << BDRV_SECTOR_BITS, | ||
137 | - false, PREALLOC_MODE_OFF, NULL); | ||
138 | + false, PREALLOC_MODE_OFF, 0, NULL); | ||
139 | } | ||
140 | if (ret < 0) { | ||
141 | return ret; | ||
142 | @@ -XXX,XX +XXX,XX @@ static int coroutine_fn parallels_co_check(BlockDriverState *bs, | ||
143 | * That means we have to pass exact=true. | ||
144 | */ | ||
145 | ret = bdrv_truncate(bs->file, res->image_end_offset, true, | ||
146 | - PREALLOC_MODE_OFF, &local_err); | ||
147 | + PREALLOC_MODE_OFF, 0, &local_err); | ||
148 | if (ret < 0) { | ||
149 | error_report_err(local_err); | ||
150 | res->check_errors++; | ||
151 | @@ -XXX,XX +XXX,XX @@ static void parallels_close(BlockDriverState *bs) | ||
152 | |||
153 | /* errors are ignored, so we might as well pass exact=true */ | ||
154 | bdrv_truncate(bs->file, s->data_end << BDRV_SECTOR_BITS, true, | ||
155 | - PREALLOC_MODE_OFF, NULL); | ||
156 | + PREALLOC_MODE_OFF, 0, NULL); | ||
157 | } | ||
158 | |||
159 | g_free(s->bat_dirty_bmap); | ||
160 | diff --git a/block/qcow.c b/block/qcow.c | ||
161 | index XXXXXXX..XXXXXXX 100644 | ||
162 | --- a/block/qcow.c | ||
163 | +++ b/block/qcow.c | ||
164 | @@ -XXX,XX +XXX,XX @@ static int get_cluster_offset(BlockDriverState *bs, | ||
165 | return -E2BIG; | ||
166 | } | ||
167 | ret = bdrv_truncate(bs->file, cluster_offset + s->cluster_size, | ||
168 | - false, PREALLOC_MODE_OFF, NULL); | ||
169 | + false, PREALLOC_MODE_OFF, 0, NULL); | ||
170 | if (ret < 0) { | ||
171 | return ret; | ||
172 | } | ||
173 | @@ -XXX,XX +XXX,XX @@ static int qcow_make_empty(BlockDriverState *bs) | ||
174 | l1_length) < 0) | ||
175 | return -1; | ||
176 | ret = bdrv_truncate(bs->file, s->l1_table_offset + l1_length, false, | ||
177 | - PREALLOC_MODE_OFF, NULL); | ||
178 | + PREALLOC_MODE_OFF, 0, NULL); | ||
179 | if (ret < 0) | ||
180 | return ret; | ||
181 | |||
182 | diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c | ||
183 | index XXXXXXX..XXXXXXX 100644 | ||
184 | --- a/block/qcow2-refcount.c | ||
185 | +++ b/block/qcow2-refcount.c | ||
186 | @@ -XXX,XX +XXX,XX @@ static int check_refblocks(BlockDriverState *bs, BdrvCheckResult *res, | ||
187 | } | ||
188 | |||
189 | ret = bdrv_truncate(bs->file, offset + s->cluster_size, false, | ||
190 | - PREALLOC_MODE_OFF, &local_err); | ||
191 | + PREALLOC_MODE_OFF, 0, &local_err); | ||
192 | if (ret < 0) { | ||
193 | error_report_err(local_err); | ||
194 | goto resize_fail; | ||
195 | diff --git a/block/qcow2.c b/block/qcow2.c | ||
196 | index XXXXXXX..XXXXXXX 100644 | ||
197 | --- a/block/qcow2.c | ||
198 | +++ b/block/qcow2.c | ||
199 | @@ -XXX,XX +XXX,XX @@ static int coroutine_fn preallocate_co(BlockDriverState *bs, uint64_t offset, | ||
200 | mode = PREALLOC_MODE_OFF; | ||
201 | } | ||
202 | ret = bdrv_co_truncate(s->data_file, host_offset + cur_bytes, false, | ||
203 | - mode, errp); | ||
204 | + mode, 0, errp); | ||
205 | if (ret < 0) { | ||
206 | return ret; | ||
207 | } | ||
208 | @@ -XXX,XX +XXX,XX @@ static int coroutine_fn qcow2_co_truncate(BlockDriverState *bs, int64_t offset, | ||
209 | * always fulfilled, so there is no need to pass it on.) | ||
210 | */ | ||
211 | bdrv_co_truncate(bs->file, (last_cluster + 1) * s->cluster_size, | ||
212 | - false, PREALLOC_MODE_OFF, &local_err); | ||
213 | + false, PREALLOC_MODE_OFF, 0, &local_err); | ||
214 | if (local_err) { | ||
215 | warn_reportf_err(local_err, | ||
216 | "Failed to truncate the tail of the image: "); | ||
217 | @@ -XXX,XX +XXX,XX @@ static int coroutine_fn qcow2_co_truncate(BlockDriverState *bs, int64_t offset, | ||
218 | * file should be resized to the exact target size, too, | ||
219 | * so we pass @exact here. | ||
220 | */ | ||
221 | - ret = bdrv_co_truncate(s->data_file, offset, exact, prealloc, errp); | ||
222 | + ret = bdrv_co_truncate(s->data_file, offset, exact, prealloc, 0, | ||
223 | + errp); | ||
224 | if (ret < 0) { | ||
225 | goto fail; | ||
226 | } | ||
227 | @@ -XXX,XX +XXX,XX @@ static int coroutine_fn qcow2_co_truncate(BlockDriverState *bs, int64_t offset, | ||
228 | new_file_size = allocation_start + | ||
229 | nb_new_data_clusters * s->cluster_size; | ||
230 | /* Image file grows, so @exact does not matter */ | ||
231 | - ret = bdrv_co_truncate(bs->file, new_file_size, false, prealloc, errp); | ||
232 | + ret = bdrv_co_truncate(bs->file, new_file_size, false, prealloc, 0, | ||
233 | + errp); | ||
234 | if (ret < 0) { | ||
235 | error_prepend(errp, "Failed to resize underlying file: "); | ||
236 | qcow2_free_clusters(bs, allocation_start, | ||
237 | @@ -XXX,XX +XXX,XX @@ qcow2_co_pwritev_compressed_part(BlockDriverState *bs, | ||
238 | if (len < 0) { | ||
239 | return len; | ||
240 | } | ||
241 | - return bdrv_co_truncate(bs->file, len, false, PREALLOC_MODE_OFF, NULL); | ||
242 | + return bdrv_co_truncate(bs->file, len, false, PREALLOC_MODE_OFF, 0, | ||
243 | + NULL); | ||
244 | } | ||
245 | |||
246 | if (offset_into_cluster(s, offset)) { | ||
247 | @@ -XXX,XX +XXX,XX @@ static int make_completely_empty(BlockDriverState *bs) | ||
248 | } | ||
249 | |||
250 | ret = bdrv_truncate(bs->file, (3 + l1_clusters) * s->cluster_size, false, | ||
251 | - PREALLOC_MODE_OFF, &local_err); | ||
252 | + PREALLOC_MODE_OFF, 0, &local_err); | ||
253 | if (ret < 0) { | ||
254 | error_report_err(local_err); | ||
255 | goto fail; | ||
256 | diff --git a/block/raw-format.c b/block/raw-format.c | ||
257 | index XXXXXXX..XXXXXXX 100644 | ||
258 | --- a/block/raw-format.c | ||
259 | +++ b/block/raw-format.c | ||
260 | @@ -XXX,XX +XXX,XX @@ static int coroutine_fn raw_co_truncate(BlockDriverState *bs, int64_t offset, | ||
261 | |||
262 | s->size = offset; | ||
263 | offset += s->offset; | ||
264 | - return bdrv_co_truncate(bs->file, offset, exact, prealloc, errp); | ||
265 | + return bdrv_co_truncate(bs->file, offset, exact, prealloc, 0, errp); | ||
266 | } | ||
267 | |||
268 | static void raw_eject(BlockDriverState *bs, bool eject_flag) | ||
269 | diff --git a/block/vhdx-log.c b/block/vhdx-log.c | ||
270 | index XXXXXXX..XXXXXXX 100644 | ||
271 | --- a/block/vhdx-log.c | ||
272 | +++ b/block/vhdx-log.c | ||
273 | @@ -XXX,XX +XXX,XX @@ static int vhdx_log_flush(BlockDriverState *bs, BDRVVHDXState *s, | ||
274 | goto exit; | ||
275 | } | ||
276 | ret = bdrv_truncate(bs->file, new_file_size, false, | ||
277 | - PREALLOC_MODE_OFF, NULL); | ||
278 | + PREALLOC_MODE_OFF, 0, NULL); | ||
279 | if (ret < 0) { | ||
280 | goto exit; | ||
281 | } | ||
282 | diff --git a/block/vhdx.c b/block/vhdx.c | ||
283 | index XXXXXXX..XXXXXXX 100644 | ||
284 | --- a/block/vhdx.c | ||
285 | +++ b/block/vhdx.c | ||
286 | @@ -XXX,XX +XXX,XX @@ static int vhdx_allocate_block(BlockDriverState *bs, BDRVVHDXState *s, | ||
287 | } | ||
288 | |||
289 | return bdrv_truncate(bs->file, *new_offset + s->block_size, false, | ||
290 | - PREALLOC_MODE_OFF, NULL); | ||
291 | + PREALLOC_MODE_OFF, 0, NULL); | ||
292 | } | ||
293 | |||
294 | /* | ||
295 | diff --git a/block/vmdk.c b/block/vmdk.c | ||
296 | index XXXXXXX..XXXXXXX 100644 | ||
297 | --- a/block/vmdk.c | ||
298 | +++ b/block/vmdk.c | ||
299 | @@ -XXX,XX +XXX,XX @@ vmdk_co_pwritev_compressed(BlockDriverState *bs, uint64_t offset, | ||
300 | } | ||
301 | length = QEMU_ALIGN_UP(length, BDRV_SECTOR_SIZE); | ||
302 | ret = bdrv_truncate(s->extents[i].file, length, false, | ||
303 | - PREALLOC_MODE_OFF, NULL); | ||
304 | + PREALLOC_MODE_OFF, 0, NULL); | ||
305 | if (ret < 0) { | ||
306 | return ret; | ||
307 | } | ||
308 | diff --git a/tests/test-block-iothread.c b/tests/test-block-iothread.c | ||
309 | index XXXXXXX..XXXXXXX 100644 | ||
310 | --- a/tests/test-block-iothread.c | ||
311 | +++ b/tests/test-block-iothread.c | ||
312 | @@ -XXX,XX +XXX,XX @@ static void test_sync_op_truncate(BdrvChild *c) | ||
313 | int ret; | ||
314 | |||
315 | /* Normal success path */ | ||
316 | - ret = bdrv_truncate(c, 65536, false, PREALLOC_MODE_OFF, NULL); | ||
317 | + ret = bdrv_truncate(c, 65536, false, PREALLOC_MODE_OFF, 0, NULL); | ||
318 | g_assert_cmpint(ret, ==, 0); | ||
319 | |||
320 | /* Early error: Negative offset */ | ||
321 | - ret = bdrv_truncate(c, -2, false, PREALLOC_MODE_OFF, NULL); | ||
322 | + ret = bdrv_truncate(c, -2, false, PREALLOC_MODE_OFF, 0, NULL); | ||
323 | g_assert_cmpint(ret, ==, -EINVAL); | ||
324 | |||
325 | /* Error: Read-only image */ | ||
326 | c->bs->read_only = true; | ||
327 | c->bs->open_flags &= ~BDRV_O_RDWR; | ||
328 | |||
329 | - ret = bdrv_truncate(c, 65536, false, PREALLOC_MODE_OFF, NULL); | ||
330 | + ret = bdrv_truncate(c, 65536, false, PREALLOC_MODE_OFF, 0, NULL); | ||
331 | g_assert_cmpint(ret, ==, -EACCES); | ||
332 | |||
333 | c->bs->read_only = false; | ||
334 | -- | ||
335 | 2.25.3 | ||
336 | |||
337 | diff view generated by jsdifflib |
1 | From: Stefan Weil <sw@weilnetz.de> | 1 | Now that node level interface bdrv_truncate() supports passing request |
---|---|---|---|
2 | 2 | flags to the block driver, expose this on the BlockBackend level, too. | |
3 | Signed-off-by: Stefan Weil <sw@weilnetz.de> | 3 | |
4 | Reviewed-by: John Snow <jsnow@redhat.com> | 4 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> |
5 | Reviewed-by: Jeff Cody <jcody@redhat.com> | 5 | Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> |
6 | Reviewed-by: Alberto Garcia <berto@igalia.com> | ||
7 | Reviewed-by: Max Reitz <mreitz@redhat.com> | ||
8 | Message-Id: <20200424125448.63318-4-kwolf@redhat.com> | ||
6 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> | 9 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> |
7 | --- | 10 | --- |
8 | block.c | 2 +- | 11 | include/sysemu/block-backend.h | 2 +- |
9 | block/backup.c | 4 ++-- | 12 | block.c | 3 ++- |
10 | block/curl.c | 2 +- | 13 | block/block-backend.c | 4 ++-- |
11 | block/gluster.c | 2 +- | 14 | block/commit.c | 4 ++-- |
12 | block/vhdx.c | 2 +- | 15 | block/crypto.c | 2 +- |
13 | 5 files changed, 6 insertions(+), 6 deletions(-) | 16 | block/mirror.c | 2 +- |
14 | 17 | block/qcow2.c | 4 ++-- | |
18 | block/qed.c | 2 +- | ||
19 | block/vdi.c | 2 +- | ||
20 | block/vhdx.c | 4 ++-- | ||
21 | block/vmdk.c | 6 +++--- | ||
22 | block/vpc.c | 2 +- | ||
23 | blockdev.c | 2 +- | ||
24 | qemu-img.c | 2 +- | ||
25 | qemu-io-cmds.c | 2 +- | ||
26 | 15 files changed, 22 insertions(+), 21 deletions(-) | ||
27 | |||
28 | diff --git a/include/sysemu/block-backend.h b/include/sysemu/block-backend.h | ||
29 | index XXXXXXX..XXXXXXX 100644 | ||
30 | --- a/include/sysemu/block-backend.h | ||
31 | +++ b/include/sysemu/block-backend.h | ||
32 | @@ -XXX,XX +XXX,XX @@ int coroutine_fn blk_co_pwrite_zeroes(BlockBackend *blk, int64_t offset, | ||
33 | int blk_pwrite_compressed(BlockBackend *blk, int64_t offset, const void *buf, | ||
34 | int bytes); | ||
35 | int blk_truncate(BlockBackend *blk, int64_t offset, bool exact, | ||
36 | - PreallocMode prealloc, Error **errp); | ||
37 | + PreallocMode prealloc, BdrvRequestFlags flags, Error **errp); | ||
38 | int blk_pdiscard(BlockBackend *blk, int64_t offset, int bytes); | ||
39 | int blk_save_vmstate(BlockBackend *blk, const uint8_t *buf, | ||
40 | int64_t pos, int size); | ||
15 | diff --git a/block.c b/block.c | 41 | diff --git a/block.c b/block.c |
16 | index XXXXXXX..XXXXXXX 100644 | 42 | index XXXXXXX..XXXXXXX 100644 |
17 | --- a/block.c | 43 | --- a/block.c |
18 | +++ b/block.c | 44 | +++ b/block.c |
19 | @@ -XXX,XX +XXX,XX @@ BlockReopenQueue *bdrv_reopen_queue(BlockReopenQueue *bs_queue, | 45 | @@ -XXX,XX +XXX,XX @@ static int64_t create_file_fallback_truncate(BlockBackend *blk, |
20 | * | 46 | int64_t size; |
21 | * Reopens all BDS specified in the queue, with the appropriate | 47 | int ret; |
22 | * flags. All devices are prepared for reopen, and failure of any | 48 | |
23 | - * device will cause all device changes to be abandonded, and intermediate | 49 | - ret = blk_truncate(blk, minimum_size, false, PREALLOC_MODE_OFF, &local_err); |
24 | + * device will cause all device changes to be abandoned, and intermediate | 50 | + ret = blk_truncate(blk, minimum_size, false, PREALLOC_MODE_OFF, 0, |
25 | * data cleaned up. | 51 | + &local_err); |
26 | * | 52 | if (ret < 0 && ret != -ENOTSUP) { |
27 | * If all devices prepare successfully, then the changes are committed | 53 | error_propagate(errp, local_err); |
28 | diff --git a/block/backup.c b/block/backup.c | 54 | return ret; |
29 | index XXXXXXX..XXXXXXX 100644 | 55 | diff --git a/block/block-backend.c b/block/block-backend.c |
30 | --- a/block/backup.c | 56 | index XXXXXXX..XXXXXXX 100644 |
31 | +++ b/block/backup.c | 57 | --- a/block/block-backend.c |
32 | @@ -XXX,XX +XXX,XX @@ static void cow_request_end(CowRequest *req) | 58 | +++ b/block/block-backend.c |
59 | @@ -XXX,XX +XXX,XX @@ int blk_pwrite_compressed(BlockBackend *blk, int64_t offset, const void *buf, | ||
33 | } | 60 | } |
34 | 61 | ||
35 | /* Copy range to target with a bounce buffer and return the bytes copied. If | 62 | int blk_truncate(BlockBackend *blk, int64_t offset, bool exact, |
36 | - * error occured, return a negative error number */ | 63 | - PreallocMode prealloc, Error **errp) |
37 | + * error occurred, return a negative error number */ | 64 | + PreallocMode prealloc, BdrvRequestFlags flags, Error **errp) |
38 | static int coroutine_fn backup_cow_with_bounce_buffer(BackupBlockJob *job, | 65 | { |
39 | int64_t start, | 66 | if (!blk_is_available(blk)) { |
40 | int64_t end, | 67 | error_setg(errp, "No medium inserted"); |
41 | @@ -XXX,XX +XXX,XX @@ fail: | 68 | return -ENOMEDIUM; |
42 | 69 | } | |
70 | |||
71 | - return bdrv_truncate(blk->root, offset, exact, prealloc, 0, errp); | ||
72 | + return bdrv_truncate(blk->root, offset, exact, prealloc, flags, errp); | ||
43 | } | 73 | } |
44 | 74 | ||
45 | -/* Copy range to target and return the bytes copied. If error occured, return a | 75 | int blk_save_vmstate(BlockBackend *blk, const uint8_t *buf, |
46 | +/* Copy range to target and return the bytes copied. If error occurred, return a | 76 | diff --git a/block/commit.c b/block/commit.c |
47 | * negative error number. */ | 77 | index XXXXXXX..XXXXXXX 100644 |
48 | static int coroutine_fn backup_cow_with_offload(BackupBlockJob *job, | 78 | --- a/block/commit.c |
49 | int64_t start, | 79 | +++ b/block/commit.c |
50 | diff --git a/block/curl.c b/block/curl.c | 80 | @@ -XXX,XX +XXX,XX @@ static int coroutine_fn commit_run(Job *job, Error **errp) |
51 | index XXXXXXX..XXXXXXX 100644 | 81 | } |
52 | --- a/block/curl.c | 82 | |
53 | +++ b/block/curl.c | 83 | if (base_len < len) { |
54 | @@ -XXX,XX +XXX,XX @@ static int curl_open(BlockDriverState *bs, QDict *options, int flags, | 84 | - ret = blk_truncate(s->base, len, false, PREALLOC_MODE_OFF, NULL); |
55 | } | 85 | + ret = blk_truncate(s->base, len, false, PREALLOC_MODE_OFF, 0, NULL); |
56 | /* Prior CURL 7.19.4 return value of 0 could mean that the file size is not | 86 | if (ret) { |
57 | * know or the size is zero. From 7.19.4 CURL returns -1 if size is not | 87 | goto out; |
58 | - * known and zero if it is realy zero-length file. */ | 88 | } |
59 | + * known and zero if it is really zero-length file. */ | 89 | @@ -XXX,XX +XXX,XX @@ int bdrv_commit(BlockDriverState *bs) |
60 | #if LIBCURL_VERSION_NUM >= 0x071304 | 90 | * grow the backing file image if possible. If not possible, |
61 | if (d < 0) { | 91 | * we must return an error */ |
62 | pstrcpy(state->errmsg, CURL_ERROR_SIZE, | 92 | if (length > backing_length) { |
63 | diff --git a/block/gluster.c b/block/gluster.c | 93 | - ret = blk_truncate(backing, length, false, PREALLOC_MODE_OFF, |
64 | index XXXXXXX..XXXXXXX 100644 | 94 | + ret = blk_truncate(backing, length, false, PREALLOC_MODE_OFF, 0, |
65 | --- a/block/gluster.c | 95 | &local_err); |
66 | +++ b/block/gluster.c | 96 | if (ret < 0) { |
67 | @@ -XXX,XX +XXX,XX @@ static int qemu_gluster_has_zero_init(BlockDriverState *bs) | 97 | error_report_err(local_err); |
68 | * If @start is in a trailing hole or beyond EOF, return -ENXIO. | 98 | diff --git a/block/crypto.c b/block/crypto.c |
69 | * If we can't find out, return a negative errno other than -ENXIO. | 99 | index XXXXXXX..XXXXXXX 100644 |
70 | * | 100 | --- a/block/crypto.c |
71 | - * (Shamefully copied from file-posix.c, only miniscule adaptions.) | 101 | +++ b/block/crypto.c |
72 | + * (Shamefully copied from file-posix.c, only minuscule adaptions.) | 102 | @@ -XXX,XX +XXX,XX @@ static ssize_t block_crypto_init_func(QCryptoBlock *block, |
73 | */ | 103 | * which will be used by the crypto header |
74 | static int find_allocation(BlockDriverState *bs, off_t start, | 104 | */ |
75 | off_t *data, off_t *hole) | 105 | return blk_truncate(data->blk, data->size + headerlen, false, |
106 | - data->prealloc, errp); | ||
107 | + data->prealloc, 0, errp); | ||
108 | } | ||
109 | |||
110 | |||
111 | diff --git a/block/mirror.c b/block/mirror.c | ||
112 | index XXXXXXX..XXXXXXX 100644 | ||
113 | --- a/block/mirror.c | ||
114 | +++ b/block/mirror.c | ||
115 | @@ -XXX,XX +XXX,XX @@ static int coroutine_fn mirror_run(Job *job, Error **errp) | ||
116 | |||
117 | if (s->bdev_length > base_length) { | ||
118 | ret = blk_truncate(s->target, s->bdev_length, false, | ||
119 | - PREALLOC_MODE_OFF, NULL); | ||
120 | + PREALLOC_MODE_OFF, 0, NULL); | ||
121 | if (ret < 0) { | ||
122 | goto immediate_exit; | ||
123 | } | ||
124 | diff --git a/block/qcow2.c b/block/qcow2.c | ||
125 | index XXXXXXX..XXXXXXX 100644 | ||
126 | --- a/block/qcow2.c | ||
127 | +++ b/block/qcow2.c | ||
128 | @@ -XXX,XX +XXX,XX @@ qcow2_co_create(BlockdevCreateOptions *create_options, Error **errp) | ||
129 | |||
130 | /* Okay, now that we have a valid image, let's give it the right size */ | ||
131 | ret = blk_truncate(blk, qcow2_opts->size, false, qcow2_opts->preallocation, | ||
132 | - errp); | ||
133 | + 0, errp); | ||
134 | if (ret < 0) { | ||
135 | error_prepend(errp, "Could not resize image: "); | ||
136 | goto out; | ||
137 | @@ -XXX,XX +XXX,XX @@ static int qcow2_amend_options(BlockDriverState *bs, QemuOpts *opts, | ||
138 | * Amending image options should ensure that the image has | ||
139 | * exactly the given new values, so pass exact=true here. | ||
140 | */ | ||
141 | - ret = blk_truncate(blk, new_size, true, PREALLOC_MODE_OFF, errp); | ||
142 | + ret = blk_truncate(blk, new_size, true, PREALLOC_MODE_OFF, 0, errp); | ||
143 | blk_unref(blk); | ||
144 | if (ret < 0) { | ||
145 | return ret; | ||
146 | diff --git a/block/qed.c b/block/qed.c | ||
147 | index XXXXXXX..XXXXXXX 100644 | ||
148 | --- a/block/qed.c | ||
149 | +++ b/block/qed.c | ||
150 | @@ -XXX,XX +XXX,XX @@ static int coroutine_fn bdrv_qed_co_create(BlockdevCreateOptions *opts, | ||
151 | * The QED format associates file length with allocation status, | ||
152 | * so a new file (which is empty) must have a length of 0. | ||
153 | */ | ||
154 | - ret = blk_truncate(blk, 0, true, PREALLOC_MODE_OFF, errp); | ||
155 | + ret = blk_truncate(blk, 0, true, PREALLOC_MODE_OFF, 0, errp); | ||
156 | if (ret < 0) { | ||
157 | goto out; | ||
158 | } | ||
159 | diff --git a/block/vdi.c b/block/vdi.c | ||
160 | index XXXXXXX..XXXXXXX 100644 | ||
161 | --- a/block/vdi.c | ||
162 | +++ b/block/vdi.c | ||
163 | @@ -XXX,XX +XXX,XX @@ static int coroutine_fn vdi_co_do_create(BlockdevCreateOptions *create_options, | ||
164 | |||
165 | if (image_type == VDI_TYPE_STATIC) { | ||
166 | ret = blk_truncate(blk, offset + blocks * block_size, false, | ||
167 | - PREALLOC_MODE_OFF, errp); | ||
168 | + PREALLOC_MODE_OFF, 0, errp); | ||
169 | if (ret < 0) { | ||
170 | error_prepend(errp, "Failed to statically allocate file"); | ||
171 | goto exit; | ||
76 | diff --git a/block/vhdx.c b/block/vhdx.c | 172 | diff --git a/block/vhdx.c b/block/vhdx.c |
77 | index XXXXXXX..XXXXXXX 100644 | 173 | index XXXXXXX..XXXXXXX 100644 |
78 | --- a/block/vhdx.c | 174 | --- a/block/vhdx.c |
79 | +++ b/block/vhdx.c | 175 | +++ b/block/vhdx.c |
80 | @@ -XXX,XX +XXX,XX @@ uint32_t vhdx_checksum_calc(uint32_t crc, uint8_t *buf, size_t size, | 176 | @@ -XXX,XX +XXX,XX @@ static int vhdx_create_bat(BlockBackend *blk, BDRVVHDXState *s, |
81 | /* Validates the checksum of the buffer, with an in-place CRC. | 177 | /* All zeroes, so we can just extend the file - the end of the BAT |
82 | * | 178 | * is the furthest thing we have written yet */ |
83 | * Zero is substituted during crc calculation for the original crc field, | 179 | ret = blk_truncate(blk, data_file_offset, false, PREALLOC_MODE_OFF, |
84 | - * and the crc field is restored afterwards. But the buffer will be modifed | 180 | - errp); |
85 | + * and the crc field is restored afterwards. But the buffer will be modified | 181 | + 0, errp); |
86 | * during the calculation, so this may not be not suitable for multi-threaded | 182 | if (ret < 0) { |
87 | * use. | 183 | goto exit; |
88 | * | 184 | } |
185 | } else if (type == VHDX_TYPE_FIXED) { | ||
186 | ret = blk_truncate(blk, data_file_offset + image_size, false, | ||
187 | - PREALLOC_MODE_OFF, errp); | ||
188 | + PREALLOC_MODE_OFF, 0, errp); | ||
189 | if (ret < 0) { | ||
190 | goto exit; | ||
191 | } | ||
192 | diff --git a/block/vmdk.c b/block/vmdk.c | ||
193 | index XXXXXXX..XXXXXXX 100644 | ||
194 | --- a/block/vmdk.c | ||
195 | +++ b/block/vmdk.c | ||
196 | @@ -XXX,XX +XXX,XX @@ static int vmdk_init_extent(BlockBackend *blk, | ||
197 | int gd_buf_size; | ||
198 | |||
199 | if (flat) { | ||
200 | - ret = blk_truncate(blk, filesize, false, PREALLOC_MODE_OFF, errp); | ||
201 | + ret = blk_truncate(blk, filesize, false, PREALLOC_MODE_OFF, 0, errp); | ||
202 | goto exit; | ||
203 | } | ||
204 | magic = cpu_to_be32(VMDK4_MAGIC); | ||
205 | @@ -XXX,XX +XXX,XX @@ static int vmdk_init_extent(BlockBackend *blk, | ||
206 | } | ||
207 | |||
208 | ret = blk_truncate(blk, le64_to_cpu(header.grain_offset) << 9, false, | ||
209 | - PREALLOC_MODE_OFF, errp); | ||
210 | + PREALLOC_MODE_OFF, 0, errp); | ||
211 | if (ret < 0) { | ||
212 | goto exit; | ||
213 | } | ||
214 | @@ -XXX,XX +XXX,XX @@ static int coroutine_fn vmdk_co_do_create(int64_t size, | ||
215 | /* bdrv_pwrite write padding zeros to align to sector, we don't need that | ||
216 | * for description file */ | ||
217 | if (desc_offset == 0) { | ||
218 | - ret = blk_truncate(blk, desc_len, false, PREALLOC_MODE_OFF, errp); | ||
219 | + ret = blk_truncate(blk, desc_len, false, PREALLOC_MODE_OFF, 0, errp); | ||
220 | if (ret < 0) { | ||
221 | goto exit; | ||
222 | } | ||
223 | diff --git a/block/vpc.c b/block/vpc.c | ||
224 | index XXXXXXX..XXXXXXX 100644 | ||
225 | --- a/block/vpc.c | ||
226 | +++ b/block/vpc.c | ||
227 | @@ -XXX,XX +XXX,XX @@ static int create_fixed_disk(BlockBackend *blk, uint8_t *buf, | ||
228 | /* Add footer to total size */ | ||
229 | total_size += HEADER_SIZE; | ||
230 | |||
231 | - ret = blk_truncate(blk, total_size, false, PREALLOC_MODE_OFF, errp); | ||
232 | + ret = blk_truncate(blk, total_size, false, PREALLOC_MODE_OFF, 0, errp); | ||
233 | if (ret < 0) { | ||
234 | return ret; | ||
235 | } | ||
236 | diff --git a/blockdev.c b/blockdev.c | ||
237 | index XXXXXXX..XXXXXXX 100644 | ||
238 | --- a/blockdev.c | ||
239 | +++ b/blockdev.c | ||
240 | @@ -XXX,XX +XXX,XX @@ void qmp_block_resize(bool has_device, const char *device, | ||
241 | } | ||
242 | |||
243 | bdrv_drained_begin(bs); | ||
244 | - ret = blk_truncate(blk, size, false, PREALLOC_MODE_OFF, errp); | ||
245 | + ret = blk_truncate(blk, size, false, PREALLOC_MODE_OFF, 0, errp); | ||
246 | bdrv_drained_end(bs); | ||
247 | |||
248 | out: | ||
249 | diff --git a/qemu-img.c b/qemu-img.c | ||
250 | index XXXXXXX..XXXXXXX 100644 | ||
251 | --- a/qemu-img.c | ||
252 | +++ b/qemu-img.c | ||
253 | @@ -XXX,XX +XXX,XX @@ static int img_resize(int argc, char **argv) | ||
254 | * resizing, so pass @exact=true. It is of no use to report | ||
255 | * success when the image has not actually been resized. | ||
256 | */ | ||
257 | - ret = blk_truncate(blk, total_size, true, prealloc, &err); | ||
258 | + ret = blk_truncate(blk, total_size, true, prealloc, 0, &err); | ||
259 | if (!ret) { | ||
260 | qprintf(quiet, "Image resized.\n"); | ||
261 | } else { | ||
262 | diff --git a/qemu-io-cmds.c b/qemu-io-cmds.c | ||
263 | index XXXXXXX..XXXXXXX 100644 | ||
264 | --- a/qemu-io-cmds.c | ||
265 | +++ b/qemu-io-cmds.c | ||
266 | @@ -XXX,XX +XXX,XX @@ static int truncate_f(BlockBackend *blk, int argc, char **argv) | ||
267 | * exact=true. It is better to err on the "emit more errors" side | ||
268 | * than to be overly permissive. | ||
269 | */ | ||
270 | - ret = blk_truncate(blk, offset, true, PREALLOC_MODE_OFF, &local_err); | ||
271 | + ret = blk_truncate(blk, offset, true, PREALLOC_MODE_OFF, 0, &local_err); | ||
272 | if (ret < 0) { | ||
273 | error_report_err(local_err); | ||
274 | return ret; | ||
89 | -- | 275 | -- |
90 | 2.13.6 | 276 | 2.25.3 |
91 | 277 | ||
92 | 278 | diff view generated by jsdifflib |
New patch | |||
---|---|---|---|
1 | If BDRV_REQ_ZERO_WRITE is set and we're extending the image, calling | ||
2 | qcow2_cluster_zeroize() with flags=0 does the right thing: It doesn't | ||
3 | undo any previous preallocation, but just adds the zero flag to all | ||
4 | relevant L2 entries. If an external data file is in use, a write_zeroes | ||
5 | request to the data file is made instead. | ||
1 | 6 | ||
7 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> | ||
8 | Message-Id: <20200424125448.63318-5-kwolf@redhat.com> | ||
9 | Reviewed-by: Eric Blake <eblake@redhat.com> | ||
10 | Reviewed-by: Max Reitz <mreitz@redhat.com> | ||
11 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> | ||
12 | --- | ||
13 | block/qcow2-cluster.c | 2 +- | ||
14 | block/qcow2.c | 34 ++++++++++++++++++++++++++++++++++ | ||
15 | 2 files changed, 35 insertions(+), 1 deletion(-) | ||
16 | |||
17 | diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c | ||
18 | index XXXXXXX..XXXXXXX 100644 | ||
19 | --- a/block/qcow2-cluster.c | ||
20 | +++ b/block/qcow2-cluster.c | ||
21 | @@ -XXX,XX +XXX,XX @@ int qcow2_cluster_zeroize(BlockDriverState *bs, uint64_t offset, | ||
22 | /* Caller must pass aligned values, except at image end */ | ||
23 | assert(QEMU_IS_ALIGNED(offset, s->cluster_size)); | ||
24 | assert(QEMU_IS_ALIGNED(end_offset, s->cluster_size) || | ||
25 | - end_offset == bs->total_sectors << BDRV_SECTOR_BITS); | ||
26 | + end_offset >= bs->total_sectors << BDRV_SECTOR_BITS); | ||
27 | |||
28 | /* The zero flag is only supported by version 3 and newer */ | ||
29 | if (s->qcow_version < 3) { | ||
30 | diff --git a/block/qcow2.c b/block/qcow2.c | ||
31 | index XXXXXXX..XXXXXXX 100644 | ||
32 | --- a/block/qcow2.c | ||
33 | +++ b/block/qcow2.c | ||
34 | @@ -XXX,XX +XXX,XX @@ static int coroutine_fn qcow2_do_open(BlockDriverState *bs, QDict *options, | ||
35 | |||
36 | bs->supported_zero_flags = header.version >= 3 ? | ||
37 | BDRV_REQ_MAY_UNMAP | BDRV_REQ_NO_FALLBACK : 0; | ||
38 | + bs->supported_truncate_flags = BDRV_REQ_ZERO_WRITE; | ||
39 | |||
40 | /* Repair image if dirty */ | ||
41 | if (!(flags & (BDRV_O_CHECK | BDRV_O_INACTIVE)) && !bs->read_only && | ||
42 | @@ -XXX,XX +XXX,XX @@ static int coroutine_fn qcow2_co_truncate(BlockDriverState *bs, int64_t offset, | ||
43 | g_assert_not_reached(); | ||
44 | } | ||
45 | |||
46 | + if ((flags & BDRV_REQ_ZERO_WRITE) && offset > old_length) { | ||
47 | + uint64_t zero_start = QEMU_ALIGN_UP(old_length, s->cluster_size); | ||
48 | + | ||
49 | + /* | ||
50 | + * Use zero clusters as much as we can. qcow2_cluster_zeroize() | ||
51 | + * requires a cluster-aligned start. The end may be unaligned if it is | ||
52 | + * at the end of the image (which it is here). | ||
53 | + */ | ||
54 | + ret = qcow2_cluster_zeroize(bs, zero_start, offset - zero_start, 0); | ||
55 | + if (ret < 0) { | ||
56 | + error_setg_errno(errp, -ret, "Failed to zero out new clusters"); | ||
57 | + goto fail; | ||
58 | + } | ||
59 | + | ||
60 | + /* Write explicit zeros for the unaligned head */ | ||
61 | + if (zero_start > old_length) { | ||
62 | + uint64_t len = zero_start - old_length; | ||
63 | + uint8_t *buf = qemu_blockalign0(bs, len); | ||
64 | + QEMUIOVector qiov; | ||
65 | + qemu_iovec_init_buf(&qiov, buf, len); | ||
66 | + | ||
67 | + qemu_co_mutex_unlock(&s->lock); | ||
68 | + ret = qcow2_co_pwritev_part(bs, old_length, len, &qiov, 0, 0); | ||
69 | + qemu_co_mutex_lock(&s->lock); | ||
70 | + | ||
71 | + qemu_vfree(buf); | ||
72 | + if (ret < 0) { | ||
73 | + error_setg_errno(errp, -ret, "Failed to zero out the new area"); | ||
74 | + goto fail; | ||
75 | + } | ||
76 | + } | ||
77 | + } | ||
78 | + | ||
79 | if (prealloc != PREALLOC_MODE_OFF) { | ||
80 | /* Flush metadata before actually changing the image size */ | ||
81 | ret = qcow2_write_caches(bs); | ||
82 | -- | ||
83 | 2.25.3 | ||
84 | |||
85 | diff view generated by jsdifflib |
New patch | |||
---|---|---|---|
1 | The raw format driver can simply forward the flag and let its bs->file | ||
2 | child take care of actually providing the zeros. | ||
1 | 3 | ||
4 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> | ||
5 | Reviewed-by: Max Reitz <mreitz@redhat.com> | ||
6 | Reviewed-by: Eric Blake <eblake@redhat.com> | ||
7 | Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | ||
8 | Message-Id: <20200424125448.63318-6-kwolf@redhat.com> | ||
9 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> | ||
10 | --- | ||
11 | block/raw-format.c | 4 +++- | ||
12 | 1 file changed, 3 insertions(+), 1 deletion(-) | ||
13 | |||
14 | diff --git a/block/raw-format.c b/block/raw-format.c | ||
15 | index XXXXXXX..XXXXXXX 100644 | ||
16 | --- a/block/raw-format.c | ||
17 | +++ b/block/raw-format.c | ||
18 | @@ -XXX,XX +XXX,XX @@ static int coroutine_fn raw_co_truncate(BlockDriverState *bs, int64_t offset, | ||
19 | |||
20 | s->size = offset; | ||
21 | offset += s->offset; | ||
22 | - return bdrv_co_truncate(bs->file, offset, exact, prealloc, 0, errp); | ||
23 | + return bdrv_co_truncate(bs->file, offset, exact, prealloc, flags, errp); | ||
24 | } | ||
25 | |||
26 | static void raw_eject(BlockDriverState *bs, bool eject_flag) | ||
27 | @@ -XXX,XX +XXX,XX @@ static int raw_open(BlockDriverState *bs, QDict *options, int flags, | ||
28 | bs->supported_zero_flags = BDRV_REQ_WRITE_UNCHANGED | | ||
29 | ((BDRV_REQ_FUA | BDRV_REQ_MAY_UNMAP | BDRV_REQ_NO_FALLBACK) & | ||
30 | bs->file->bs->supported_zero_flags); | ||
31 | + bs->supported_truncate_flags = bs->file->bs->supported_truncate_flags & | ||
32 | + BDRV_REQ_ZERO_WRITE; | ||
33 | |||
34 | if (bs->probed && !bdrv_is_read_only(bs)) { | ||
35 | bdrv_refresh_filename(bs->file->bs); | ||
36 | -- | ||
37 | 2.25.3 | ||
38 | |||
39 | diff view generated by jsdifflib |
New patch | |||
---|---|---|---|
1 | For regular files, we always get BDRV_REQ_ZERO_WRITE behaviour from the | ||
2 | OS, so we can advertise the flag and just ignore it. | ||
1 | 3 | ||
4 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> | ||
5 | Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | ||
6 | Reviewed-by: Alberto Garcia <berto@igalia.com> | ||
7 | Reviewed-by: Max Reitz <mreitz@redhat.com> | ||
8 | Message-Id: <20200424125448.63318-7-kwolf@redhat.com> | ||
9 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> | ||
10 | --- | ||
11 | block/file-posix.c | 4 ++++ | ||
12 | 1 file changed, 4 insertions(+) | ||
13 | |||
14 | diff --git a/block/file-posix.c b/block/file-posix.c | ||
15 | index XXXXXXX..XXXXXXX 100644 | ||
16 | --- a/block/file-posix.c | ||
17 | +++ b/block/file-posix.c | ||
18 | @@ -XXX,XX +XXX,XX @@ static int raw_open_common(BlockDriverState *bs, QDict *options, | ||
19 | #endif | ||
20 | |||
21 | bs->supported_zero_flags = BDRV_REQ_MAY_UNMAP | BDRV_REQ_NO_FALLBACK; | ||
22 | + if (S_ISREG(st.st_mode)) { | ||
23 | + /* When extending regular files, we get zeros from the OS */ | ||
24 | + bs->supported_truncate_flags = BDRV_REQ_ZERO_WRITE; | ||
25 | + } | ||
26 | ret = 0; | ||
27 | fail: | ||
28 | if (filename && (bdrv_flags & BDRV_O_TEMPORARY)) { | ||
29 | -- | ||
30 | 2.25.3 | ||
31 | |||
32 | diff view generated by jsdifflib |
New patch | |||
---|---|---|---|
1 | When extending the size of an image that has a backing file larger than | ||
2 | its old size, make sure that the backing file data doesn't become | ||
3 | visible in the guest, but the added area is properly zeroed out. | ||
1 | 4 | ||
5 | Consider the following scenario where the overlay is shorter than its | ||
6 | backing file: | ||
7 | |||
8 | base.qcow2: AAAAAAAA | ||
9 | overlay.qcow2: BBBB | ||
10 | |||
11 | When resizing (extending) overlay.qcow2, the new blocks should not stay | ||
12 | unallocated and make the additional As from base.qcow2 visible like | ||
13 | before this patch, but zeros should be read. | ||
14 | |||
15 | A similar case happens with the various variants of a commit job when an | ||
16 | intermediate file is short (- for unallocated): | ||
17 | |||
18 | base.qcow2: A-A-AAAA | ||
19 | mid.qcow2: BB-B | ||
20 | top.qcow2: C--C--C- | ||
21 | |||
22 | After commit top.qcow2 to mid.qcow2, the following happens: | ||
23 | |||
24 | mid.qcow2: CB-C00C0 (correct result) | ||
25 | mid.qcow2: CB-C--C- (before this fix) | ||
26 | |||
27 | Without the fix, blocks that previously read as zeros on top.qcow2 | ||
28 | suddenly turn into A. | ||
29 | |||
30 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> | ||
31 | Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | ||
32 | Message-Id: <20200424125448.63318-8-kwolf@redhat.com> | ||
33 | Reviewed-by: Max Reitz <mreitz@redhat.com> | ||
34 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> | ||
35 | --- | ||
36 | block/io.c | 25 +++++++++++++++++++++++++ | ||
37 | 1 file changed, 25 insertions(+) | ||
38 | |||
39 | diff --git a/block/io.c b/block/io.c | ||
40 | index XXXXXXX..XXXXXXX 100644 | ||
41 | --- a/block/io.c | ||
42 | +++ b/block/io.c | ||
43 | @@ -XXX,XX +XXX,XX @@ int coroutine_fn bdrv_co_truncate(BdrvChild *child, int64_t offset, bool exact, | ||
44 | goto out; | ||
45 | } | ||
46 | |||
47 | + /* | ||
48 | + * If the image has a backing file that is large enough that it would | ||
49 | + * provide data for the new area, we cannot leave it unallocated because | ||
50 | + * then the backing file content would become visible. Instead, zero-fill | ||
51 | + * the new area. | ||
52 | + * | ||
53 | + * Note that if the image has a backing file, but was opened without the | ||
54 | + * backing file, taking care of keeping things consistent with that backing | ||
55 | + * file is the user's responsibility. | ||
56 | + */ | ||
57 | + if (new_bytes && bs->backing) { | ||
58 | + int64_t backing_len; | ||
59 | + | ||
60 | + backing_len = bdrv_getlength(backing_bs(bs)); | ||
61 | + if (backing_len < 0) { | ||
62 | + ret = backing_len; | ||
63 | + error_setg_errno(errp, -ret, "Could not get backing file size"); | ||
64 | + goto out; | ||
65 | + } | ||
66 | + | ||
67 | + if (backing_len > old_size) { | ||
68 | + flags |= BDRV_REQ_ZERO_WRITE; | ||
69 | + } | ||
70 | + } | ||
71 | + | ||
72 | if (drv->bdrv_co_truncate) { | ||
73 | if (flags & ~bs->supported_truncate_flags) { | ||
74 | error_setg(errp, "Block driver does not support requested flags"); | ||
75 | -- | ||
76 | 2.25.3 | ||
77 | |||
78 | diff view generated by jsdifflib |
New patch | |||
---|---|---|---|
1 | We want to keep TEST_IMG for the full path of the main test image, but | ||
2 | filter_testfiles() must be called for other test images before replacing | ||
3 | other things like the image format because the test directory path could | ||
4 | contain the format as a substring. | ||
1 | 5 | ||
6 | Insert a filter_testfiles() call between both. | ||
7 | |||
8 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> | ||
9 | Reviewed-by: Max Reitz <mreitz@redhat.com> | ||
10 | Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | ||
11 | Message-Id: <20200424125448.63318-9-kwolf@redhat.com> | ||
12 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> | ||
13 | --- | ||
14 | tests/qemu-iotests/iotests.py | 5 +++-- | ||
15 | 1 file changed, 3 insertions(+), 2 deletions(-) | ||
16 | |||
17 | diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py | ||
18 | index XXXXXXX..XXXXXXX 100644 | ||
19 | --- a/tests/qemu-iotests/iotests.py | ||
20 | +++ b/tests/qemu-iotests/iotests.py | ||
21 | @@ -XXX,XX +XXX,XX @@ def filter_img_info(output, filename): | ||
22 | for line in output.split('\n'): | ||
23 | if 'disk size' in line or 'actual-size' in line: | ||
24 | continue | ||
25 | - line = line.replace(filename, 'TEST_IMG') \ | ||
26 | - .replace(imgfmt, 'IMGFMT') | ||
27 | + line = line.replace(filename, 'TEST_IMG') | ||
28 | + line = filter_testfiles(line) | ||
29 | + line = line.replace(imgfmt, 'IMGFMT') | ||
30 | line = re.sub('iters: [0-9]+', 'iters: XXX', line) | ||
31 | line = re.sub('uuid: [-a-f0-9]+', 'uuid: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX', line) | ||
32 | line = re.sub('cid: [0-9]+', 'cid: XXXXXXXXXX', line) | ||
33 | -- | ||
34 | 2.25.3 | ||
35 | |||
36 | diff view generated by jsdifflib |
1 | From: Thomas Huth <thuth@redhat.com> | 1 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> |
---|---|---|---|
2 | 2 | Message-Id: <20200424125448.63318-10-kwolf@redhat.com> | |
3 | It's annoying to see this debug message every time you use vvfat. | 3 | Reviewed-by: Max Reitz <mreitz@redhat.com> |
4 | Disable it with the DLOG() macro by default, as it is done with the | 4 | Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> |
5 | other debug messages in this file. | ||
6 | |||
7 | Signed-off-by: Thomas Huth <thuth@redhat.com> | ||
8 | Reviewed-by: John Snow <jsnow@redhat.com> | ||
9 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> | 5 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> |
10 | --- | 6 | --- |
11 | block/vvfat.c | 4 ++-- | 7 | tests/qemu-iotests/274 | 155 +++++++++++++++++++++ |
12 | 1 file changed, 2 insertions(+), 2 deletions(-) | 8 | tests/qemu-iotests/274.out | 268 +++++++++++++++++++++++++++++++++++++ |
9 | tests/qemu-iotests/group | 1 + | ||
10 | 3 files changed, 424 insertions(+) | ||
11 | create mode 100755 tests/qemu-iotests/274 | ||
12 | create mode 100644 tests/qemu-iotests/274.out | ||
13 | 13 | ||
14 | diff --git a/block/vvfat.c b/block/vvfat.c | 14 | diff --git a/tests/qemu-iotests/274 b/tests/qemu-iotests/274 |
15 | new file mode 100755 | ||
16 | index XXXXXXX..XXXXXXX | ||
17 | --- /dev/null | ||
18 | +++ b/tests/qemu-iotests/274 | ||
19 | @@ -XXX,XX +XXX,XX @@ | ||
20 | +#!/usr/bin/env python3 | ||
21 | +# | ||
22 | +# Copyright (C) 2019 Red Hat, Inc. | ||
23 | +# | ||
24 | +# This program is free software; you can redistribute it and/or modify | ||
25 | +# it under the terms of the GNU General Public License as published by | ||
26 | +# the Free Software Foundation; either version 2 of the License, or | ||
27 | +# (at your option) any later version. | ||
28 | +# | ||
29 | +# This program is distributed in the hope that it will be useful, | ||
30 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
31 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
32 | +# GNU General Public License for more details. | ||
33 | +# | ||
34 | +# You should have received a copy of the GNU General Public License | ||
35 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
36 | +# | ||
37 | +# Creator/Owner: Kevin Wolf <kwolf@redhat.com> | ||
38 | +# | ||
39 | +# Some tests for short backing files and short overlays | ||
40 | + | ||
41 | +import iotests | ||
42 | + | ||
43 | +iotests.verify_image_format(supported_fmts=['qcow2']) | ||
44 | +iotests.verify_platform(['linux']) | ||
45 | + | ||
46 | +size_short = 1 * 1024 * 1024 | ||
47 | +size_long = 2 * 1024 * 1024 | ||
48 | +size_diff = size_long - size_short | ||
49 | + | ||
50 | +def create_chain() -> None: | ||
51 | + iotests.qemu_img_log('create', '-f', iotests.imgfmt, base, | ||
52 | + str(size_long)) | ||
53 | + iotests.qemu_img_log('create', '-f', iotests.imgfmt, '-b', base, mid, | ||
54 | + str(size_short)) | ||
55 | + iotests.qemu_img_log('create', '-f', iotests.imgfmt, '-b', mid, top, | ||
56 | + str(size_long)) | ||
57 | + | ||
58 | + iotests.qemu_io_log('-c', 'write -P 1 0 %d' % size_long, base) | ||
59 | + | ||
60 | +def create_vm() -> iotests.VM: | ||
61 | + vm = iotests.VM() | ||
62 | + vm.add_blockdev('file,filename=%s,node-name=base-file' % base) | ||
63 | + vm.add_blockdev('%s,file=base-file,node-name=base' % iotests.imgfmt) | ||
64 | + vm.add_blockdev('file,filename=%s,node-name=mid-file' % mid) | ||
65 | + vm.add_blockdev('%s,file=mid-file,node-name=mid,backing=base' | ||
66 | + % iotests.imgfmt) | ||
67 | + vm.add_drive(top, 'backing=mid,node-name=top') | ||
68 | + return vm | ||
69 | + | ||
70 | +with iotests.FilePath('base') as base, \ | ||
71 | + iotests.FilePath('mid') as mid, \ | ||
72 | + iotests.FilePath('top') as top: | ||
73 | + | ||
74 | + iotests.log('== Commit tests ==') | ||
75 | + | ||
76 | + create_chain() | ||
77 | + | ||
78 | + iotests.log('=== Check visible data ===') | ||
79 | + | ||
80 | + iotests.qemu_io_log('-c', 'read -P 1 0 %d' % size_short, top) | ||
81 | + iotests.qemu_io_log('-c', 'read -P 0 %d %d' % (size_short, size_diff), top) | ||
82 | + | ||
83 | + iotests.log('=== Checking allocation status ===') | ||
84 | + | ||
85 | + iotests.qemu_io_log('-c', 'alloc 0 %d' % size_short, | ||
86 | + '-c', 'alloc %d %d' % (size_short, size_diff), | ||
87 | + base) | ||
88 | + | ||
89 | + iotests.qemu_io_log('-c', 'alloc 0 %d' % size_short, | ||
90 | + '-c', 'alloc %d %d' % (size_short, size_diff), | ||
91 | + mid) | ||
92 | + | ||
93 | + iotests.qemu_io_log('-c', 'alloc 0 %d' % size_short, | ||
94 | + '-c', 'alloc %d %d' % (size_short, size_diff), | ||
95 | + top) | ||
96 | + | ||
97 | + iotests.log('=== Checking map ===') | ||
98 | + | ||
99 | + iotests.qemu_img_log('map', '--output=json', base) | ||
100 | + iotests.qemu_img_log('map', '--output=human', base) | ||
101 | + iotests.qemu_img_log('map', '--output=json', mid) | ||
102 | + iotests.qemu_img_log('map', '--output=human', mid) | ||
103 | + iotests.qemu_img_log('map', '--output=json', top) | ||
104 | + iotests.qemu_img_log('map', '--output=human', top) | ||
105 | + | ||
106 | + iotests.log('=== Testing qemu-img commit (top -> mid) ===') | ||
107 | + | ||
108 | + iotests.qemu_img_log('commit', top) | ||
109 | + iotests.img_info_log(mid) | ||
110 | + iotests.qemu_io_log('-c', 'read -P 1 0 %d' % size_short, mid) | ||
111 | + iotests.qemu_io_log('-c', 'read -P 0 %d %d' % (size_short, size_diff), mid) | ||
112 | + | ||
113 | + iotests.log('=== Testing HMP commit (top -> mid) ===') | ||
114 | + | ||
115 | + create_chain() | ||
116 | + with create_vm() as vm: | ||
117 | + vm.launch() | ||
118 | + vm.qmp_log('human-monitor-command', command_line='commit drive0') | ||
119 | + | ||
120 | + iotests.img_info_log(mid) | ||
121 | + iotests.qemu_io_log('-c', 'read -P 1 0 %d' % size_short, mid) | ||
122 | + iotests.qemu_io_log('-c', 'read -P 0 %d %d' % (size_short, size_diff), mid) | ||
123 | + | ||
124 | + iotests.log('=== Testing QMP active commit (top -> mid) ===') | ||
125 | + | ||
126 | + create_chain() | ||
127 | + with create_vm() as vm: | ||
128 | + vm.launch() | ||
129 | + vm.qmp_log('block-commit', device='top', base_node='mid', | ||
130 | + job_id='job0', auto_dismiss=False) | ||
131 | + vm.run_job('job0', wait=5) | ||
132 | + | ||
133 | + iotests.img_info_log(mid) | ||
134 | + iotests.qemu_io_log('-c', 'read -P 1 0 %d' % size_short, mid) | ||
135 | + iotests.qemu_io_log('-c', 'read -P 0 %d %d' % (size_short, size_diff), mid) | ||
136 | + | ||
137 | + | ||
138 | + iotests.log('== Resize tests ==') | ||
139 | + | ||
140 | + # Use different sizes for different allocation modes: | ||
141 | + # | ||
142 | + # We want to have at least one test where 32 bit truncation in the size of | ||
143 | + # the overlapping area becomes visible. This is covered by the | ||
144 | + # prealloc='off' case (1G to 6G is an overlap of 5G). | ||
145 | + # | ||
146 | + # However, we can only do this for modes that don't preallocate data | ||
147 | + # because otherwise we might run out of space on the test host. | ||
148 | + # | ||
149 | + # We also want to test some unaligned combinations. | ||
150 | + for (prealloc, base_size, top_size_old, top_size_new, off) in [ | ||
151 | + ('off', '6G', '1G', '8G', '5G'), | ||
152 | + ('metadata', '32G', '30G', '33G', '31G'), | ||
153 | + ('falloc', '10M', '5M', '15M', '9M'), | ||
154 | + ('full', '16M', '8M', '12M', '11M'), | ||
155 | + ('off', '384k', '253k', '512k', '253k'), | ||
156 | + ('off', '400k', '256k', '512k', '336k'), | ||
157 | + ('off', '512k', '256k', '500k', '436k')]: | ||
158 | + | ||
159 | + iotests.log('=== preallocation=%s ===' % prealloc) | ||
160 | + iotests.qemu_img_log('create', '-f', iotests.imgfmt, base, base_size) | ||
161 | + iotests.qemu_img_log('create', '-f', iotests.imgfmt, '-b', base, top, | ||
162 | + top_size_old) | ||
163 | + iotests.qemu_io_log('-c', 'write -P 1 %s 64k' % off, base) | ||
164 | + | ||
165 | + # After this, top_size_old to base_size should be allocated/zeroed. | ||
166 | + # | ||
167 | + # In theory, leaving base_size to top_size_new unallocated would be | ||
168 | + # correct, but in practice, if we zero out anything, we zero out | ||
169 | + # everything up to top_size_new. | ||
170 | + iotests.qemu_img_log('resize', '-f', iotests.imgfmt, | ||
171 | + '--preallocation', prealloc, top, top_size_new) | ||
172 | + iotests.qemu_io_log('-c', 'read -P 0 %s 64k' % off, top) | ||
173 | + iotests.qemu_io_log('-c', 'map', top) | ||
174 | + iotests.qemu_img_log('map', '--output=json', top) | ||
175 | diff --git a/tests/qemu-iotests/274.out b/tests/qemu-iotests/274.out | ||
176 | new file mode 100644 | ||
177 | index XXXXXXX..XXXXXXX | ||
178 | --- /dev/null | ||
179 | +++ b/tests/qemu-iotests/274.out | ||
180 | @@ -XXX,XX +XXX,XX @@ | ||
181 | +== Commit tests == | ||
182 | +Formatting 'TEST_DIR/PID-base', fmt=qcow2 size=2097152 cluster_size=65536 lazy_refcounts=off refcount_bits=16 | ||
183 | + | ||
184 | +Formatting 'TEST_DIR/PID-mid', fmt=qcow2 size=1048576 backing_file=TEST_DIR/PID-base cluster_size=65536 lazy_refcounts=off refcount_bits=16 | ||
185 | + | ||
186 | +Formatting 'TEST_DIR/PID-top', fmt=qcow2 size=2097152 backing_file=TEST_DIR/PID-mid cluster_size=65536 lazy_refcounts=off refcount_bits=16 | ||
187 | + | ||
188 | +wrote 2097152/2097152 bytes at offset 0 | ||
189 | +2 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
190 | + | ||
191 | +=== Check visible data === | ||
192 | +read 1048576/1048576 bytes at offset 0 | ||
193 | +1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
194 | + | ||
195 | +read 1048576/1048576 bytes at offset 1048576 | ||
196 | +1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
197 | + | ||
198 | +=== Checking allocation status === | ||
199 | +1048576/1048576 bytes allocated at offset 0 bytes | ||
200 | +1048576/1048576 bytes allocated at offset 1 MiB | ||
201 | + | ||
202 | +0/1048576 bytes allocated at offset 0 bytes | ||
203 | +0/0 bytes allocated at offset 1 MiB | ||
204 | + | ||
205 | +0/1048576 bytes allocated at offset 0 bytes | ||
206 | +0/1048576 bytes allocated at offset 1 MiB | ||
207 | + | ||
208 | +=== Checking map === | ||
209 | +[{ "start": 0, "length": 2097152, "depth": 0, "zero": false, "data": true, "offset": 327680}] | ||
210 | + | ||
211 | +Offset Length Mapped to File | ||
212 | +0 0x200000 0x50000 TEST_DIR/PID-base | ||
213 | + | ||
214 | +[{ "start": 0, "length": 1048576, "depth": 1, "zero": false, "data": true, "offset": 327680}] | ||
215 | + | ||
216 | +Offset Length Mapped to File | ||
217 | +0 0x100000 0x50000 TEST_DIR/PID-base | ||
218 | + | ||
219 | +[{ "start": 0, "length": 1048576, "depth": 2, "zero": false, "data": true, "offset": 327680}, | ||
220 | +{ "start": 1048576, "length": 1048576, "depth": 0, "zero": true, "data": false}] | ||
221 | + | ||
222 | +Offset Length Mapped to File | ||
223 | +0 0x100000 0x50000 TEST_DIR/PID-base | ||
224 | + | ||
225 | +=== Testing qemu-img commit (top -> mid) === | ||
226 | +Image committed. | ||
227 | + | ||
228 | +image: TEST_IMG | ||
229 | +file format: IMGFMT | ||
230 | +virtual size: 2 MiB (2097152 bytes) | ||
231 | +cluster_size: 65536 | ||
232 | +backing file: TEST_DIR/PID-base | ||
233 | +Format specific information: | ||
234 | + compat: 1.1 | ||
235 | + lazy refcounts: false | ||
236 | + refcount bits: 16 | ||
237 | + corrupt: false | ||
238 | + | ||
239 | +read 1048576/1048576 bytes at offset 0 | ||
240 | +1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
241 | + | ||
242 | +read 1048576/1048576 bytes at offset 1048576 | ||
243 | +1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
244 | + | ||
245 | +=== Testing HMP commit (top -> mid) === | ||
246 | +Formatting 'TEST_DIR/PID-base', fmt=qcow2 size=2097152 cluster_size=65536 lazy_refcounts=off refcount_bits=16 | ||
247 | + | ||
248 | +Formatting 'TEST_DIR/PID-mid', fmt=qcow2 size=1048576 backing_file=TEST_DIR/PID-base cluster_size=65536 lazy_refcounts=off refcount_bits=16 | ||
249 | + | ||
250 | +Formatting 'TEST_DIR/PID-top', fmt=qcow2 size=2097152 backing_file=TEST_DIR/PID-mid cluster_size=65536 lazy_refcounts=off refcount_bits=16 | ||
251 | + | ||
252 | +wrote 2097152/2097152 bytes at offset 0 | ||
253 | +2 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
254 | + | ||
255 | +{"execute": "human-monitor-command", "arguments": {"command-line": "commit drive0"}} | ||
256 | +{"return": ""} | ||
257 | +image: TEST_IMG | ||
258 | +file format: IMGFMT | ||
259 | +virtual size: 2 MiB (2097152 bytes) | ||
260 | +cluster_size: 65536 | ||
261 | +backing file: TEST_DIR/PID-base | ||
262 | +Format specific information: | ||
263 | + compat: 1.1 | ||
264 | + lazy refcounts: false | ||
265 | + refcount bits: 16 | ||
266 | + corrupt: false | ||
267 | + | ||
268 | +read 1048576/1048576 bytes at offset 0 | ||
269 | +1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
270 | + | ||
271 | +read 1048576/1048576 bytes at offset 1048576 | ||
272 | +1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
273 | + | ||
274 | +=== Testing QMP active commit (top -> mid) === | ||
275 | +Formatting 'TEST_DIR/PID-base', fmt=qcow2 size=2097152 cluster_size=65536 lazy_refcounts=off refcount_bits=16 | ||
276 | + | ||
277 | +Formatting 'TEST_DIR/PID-mid', fmt=qcow2 size=1048576 backing_file=TEST_DIR/PID-base cluster_size=65536 lazy_refcounts=off refcount_bits=16 | ||
278 | + | ||
279 | +Formatting 'TEST_DIR/PID-top', fmt=qcow2 size=2097152 backing_file=TEST_DIR/PID-mid cluster_size=65536 lazy_refcounts=off refcount_bits=16 | ||
280 | + | ||
281 | +wrote 2097152/2097152 bytes at offset 0 | ||
282 | +2 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
283 | + | ||
284 | +{"execute": "block-commit", "arguments": {"auto-dismiss": false, "base-node": "mid", "device": "top", "job-id": "job0"}} | ||
285 | +{"return": {}} | ||
286 | +{"execute": "job-complete", "arguments": {"id": "job0"}} | ||
287 | +{"return": {}} | ||
288 | +{"data": {"device": "job0", "len": 0, "offset": 0, "speed": 0, "type": "commit"}, "event": "BLOCK_JOB_READY", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} | ||
289 | +{"data": {"device": "job0", "len": 0, "offset": 0, "speed": 0, "type": "commit"}, "event": "BLOCK_JOB_COMPLETED", "timestamp": {"microseconds": "USECS", "seconds": "SECS"}} | ||
290 | +{"execute": "job-dismiss", "arguments": {"id": "job0"}} | ||
291 | +{"return": {}} | ||
292 | +image: TEST_IMG | ||
293 | +file format: IMGFMT | ||
294 | +virtual size: 2 MiB (2097152 bytes) | ||
295 | +cluster_size: 65536 | ||
296 | +backing file: TEST_DIR/PID-base | ||
297 | +Format specific information: | ||
298 | + compat: 1.1 | ||
299 | + lazy refcounts: false | ||
300 | + refcount bits: 16 | ||
301 | + corrupt: false | ||
302 | + | ||
303 | +read 1048576/1048576 bytes at offset 0 | ||
304 | +1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
305 | + | ||
306 | +read 1048576/1048576 bytes at offset 1048576 | ||
307 | +1 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
308 | + | ||
309 | +== Resize tests == | ||
310 | +=== preallocation=off === | ||
311 | +Formatting 'TEST_DIR/PID-base', fmt=qcow2 size=6442450944 cluster_size=65536 lazy_refcounts=off refcount_bits=16 | ||
312 | + | ||
313 | +Formatting 'TEST_DIR/PID-top', fmt=qcow2 size=1073741824 backing_file=TEST_DIR/PID-base cluster_size=65536 lazy_refcounts=off refcount_bits=16 | ||
314 | + | ||
315 | +wrote 65536/65536 bytes at offset 5368709120 | ||
316 | +64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
317 | + | ||
318 | +Image resized. | ||
319 | + | ||
320 | +read 65536/65536 bytes at offset 5368709120 | ||
321 | +64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
322 | + | ||
323 | +1 GiB (0x40000000) bytes not allocated at offset 0 bytes (0x0) | ||
324 | +7 GiB (0x1c0000000) bytes allocated at offset 1 GiB (0x40000000) | ||
325 | + | ||
326 | +[{ "start": 0, "length": 1073741824, "depth": 1, "zero": true, "data": false}, | ||
327 | +{ "start": 1073741824, "length": 7516192768, "depth": 0, "zero": true, "data": false}] | ||
328 | + | ||
329 | +=== preallocation=metadata === | ||
330 | +Formatting 'TEST_DIR/PID-base', fmt=qcow2 size=34359738368 cluster_size=65536 lazy_refcounts=off refcount_bits=16 | ||
331 | + | ||
332 | +Formatting 'TEST_DIR/PID-top', fmt=qcow2 size=32212254720 backing_file=TEST_DIR/PID-base cluster_size=65536 lazy_refcounts=off refcount_bits=16 | ||
333 | + | ||
334 | +wrote 65536/65536 bytes at offset 33285996544 | ||
335 | +64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
336 | + | ||
337 | +Image resized. | ||
338 | + | ||
339 | +read 65536/65536 bytes at offset 33285996544 | ||
340 | +64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
341 | + | ||
342 | +30 GiB (0x780000000) bytes not allocated at offset 0 bytes (0x0) | ||
343 | +3 GiB (0xc0000000) bytes allocated at offset 30 GiB (0x780000000) | ||
344 | + | ||
345 | +[{ "start": 0, "length": 32212254720, "depth": 1, "zero": true, "data": false}, | ||
346 | +{ "start": 32212254720, "length": 536870912, "depth": 0, "zero": true, "data": false, "offset": 327680}, | ||
347 | +{ "start": 32749125632, "length": 536870912, "depth": 0, "zero": true, "data": false, "offset": 537264128}, | ||
348 | +{ "start": 33285996544, "length": 536870912, "depth": 0, "zero": true, "data": false, "offset": 1074200576}, | ||
349 | +{ "start": 33822867456, "length": 536870912, "depth": 0, "zero": true, "data": false, "offset": 1611137024}, | ||
350 | +{ "start": 34359738368, "length": 536870912, "depth": 0, "zero": true, "data": false, "offset": 2148139008}, | ||
351 | +{ "start": 34896609280, "length": 536870912, "depth": 0, "zero": true, "data": false, "offset": 2685075456}] | ||
352 | + | ||
353 | +=== preallocation=falloc === | ||
354 | +Formatting 'TEST_DIR/PID-base', fmt=qcow2 size=10485760 cluster_size=65536 lazy_refcounts=off refcount_bits=16 | ||
355 | + | ||
356 | +Formatting 'TEST_DIR/PID-top', fmt=qcow2 size=5242880 backing_file=TEST_DIR/PID-base cluster_size=65536 lazy_refcounts=off refcount_bits=16 | ||
357 | + | ||
358 | +wrote 65536/65536 bytes at offset 9437184 | ||
359 | +64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
360 | + | ||
361 | +Image resized. | ||
362 | + | ||
363 | +read 65536/65536 bytes at offset 9437184 | ||
364 | +64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
365 | + | ||
366 | +5 MiB (0x500000) bytes not allocated at offset 0 bytes (0x0) | ||
367 | +10 MiB (0xa00000) bytes allocated at offset 5 MiB (0x500000) | ||
368 | + | ||
369 | +[{ "start": 0, "length": 5242880, "depth": 1, "zero": true, "data": false}, | ||
370 | +{ "start": 5242880, "length": 10485760, "depth": 0, "zero": true, "data": false, "offset": 327680}] | ||
371 | + | ||
372 | +=== preallocation=full === | ||
373 | +Formatting 'TEST_DIR/PID-base', fmt=qcow2 size=16777216 cluster_size=65536 lazy_refcounts=off refcount_bits=16 | ||
374 | + | ||
375 | +Formatting 'TEST_DIR/PID-top', fmt=qcow2 size=8388608 backing_file=TEST_DIR/PID-base cluster_size=65536 lazy_refcounts=off refcount_bits=16 | ||
376 | + | ||
377 | +wrote 65536/65536 bytes at offset 11534336 | ||
378 | +64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
379 | + | ||
380 | +Image resized. | ||
381 | + | ||
382 | +read 65536/65536 bytes at offset 11534336 | ||
383 | +64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
384 | + | ||
385 | +8 MiB (0x800000) bytes not allocated at offset 0 bytes (0x0) | ||
386 | +4 MiB (0x400000) bytes allocated at offset 8 MiB (0x800000) | ||
387 | + | ||
388 | +[{ "start": 0, "length": 8388608, "depth": 1, "zero": true, "data": false}, | ||
389 | +{ "start": 8388608, "length": 4194304, "depth": 0, "zero": true, "data": false, "offset": 327680}] | ||
390 | + | ||
391 | +=== preallocation=off === | ||
392 | +Formatting 'TEST_DIR/PID-base', fmt=qcow2 size=393216 cluster_size=65536 lazy_refcounts=off refcount_bits=16 | ||
393 | + | ||
394 | +Formatting 'TEST_DIR/PID-top', fmt=qcow2 size=259072 backing_file=TEST_DIR/PID-base cluster_size=65536 lazy_refcounts=off refcount_bits=16 | ||
395 | + | ||
396 | +wrote 65536/65536 bytes at offset 259072 | ||
397 | +64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
398 | + | ||
399 | +Image resized. | ||
400 | + | ||
401 | +read 65536/65536 bytes at offset 259072 | ||
402 | +64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
403 | + | ||
404 | +192 KiB (0x30000) bytes not allocated at offset 0 bytes (0x0) | ||
405 | +320 KiB (0x50000) bytes allocated at offset 192 KiB (0x30000) | ||
406 | + | ||
407 | +[{ "start": 0, "length": 196608, "depth": 1, "zero": true, "data": false}, | ||
408 | +{ "start": 196608, "length": 65536, "depth": 0, "zero": false, "data": true, "offset": 327680}, | ||
409 | +{ "start": 262144, "length": 262144, "depth": 0, "zero": true, "data": false}] | ||
410 | + | ||
411 | +=== preallocation=off === | ||
412 | +Formatting 'TEST_DIR/PID-base', fmt=qcow2 size=409600 cluster_size=65536 lazy_refcounts=off refcount_bits=16 | ||
413 | + | ||
414 | +Formatting 'TEST_DIR/PID-top', fmt=qcow2 size=262144 backing_file=TEST_DIR/PID-base cluster_size=65536 lazy_refcounts=off refcount_bits=16 | ||
415 | + | ||
416 | +wrote 65536/65536 bytes at offset 344064 | ||
417 | +64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
418 | + | ||
419 | +Image resized. | ||
420 | + | ||
421 | +read 65536/65536 bytes at offset 344064 | ||
422 | +64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
423 | + | ||
424 | +256 KiB (0x40000) bytes not allocated at offset 0 bytes (0x0) | ||
425 | +256 KiB (0x40000) bytes allocated at offset 256 KiB (0x40000) | ||
426 | + | ||
427 | +[{ "start": 0, "length": 262144, "depth": 1, "zero": true, "data": false}, | ||
428 | +{ "start": 262144, "length": 262144, "depth": 0, "zero": true, "data": false}] | ||
429 | + | ||
430 | +=== preallocation=off === | ||
431 | +Formatting 'TEST_DIR/PID-base', fmt=qcow2 size=524288 cluster_size=65536 lazy_refcounts=off refcount_bits=16 | ||
432 | + | ||
433 | +Formatting 'TEST_DIR/PID-top', fmt=qcow2 size=262144 backing_file=TEST_DIR/PID-base cluster_size=65536 lazy_refcounts=off refcount_bits=16 | ||
434 | + | ||
435 | +wrote 65536/65536 bytes at offset 446464 | ||
436 | +64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
437 | + | ||
438 | +Image resized. | ||
439 | + | ||
440 | +read 65536/65536 bytes at offset 446464 | ||
441 | +64 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
442 | + | ||
443 | +256 KiB (0x40000) bytes not allocated at offset 0 bytes (0x0) | ||
444 | +244 KiB (0x3d000) bytes allocated at offset 256 KiB (0x40000) | ||
445 | + | ||
446 | +[{ "start": 0, "length": 262144, "depth": 1, "zero": true, "data": false}, | ||
447 | +{ "start": 262144, "length": 249856, "depth": 0, "zero": true, "data": false}] | ||
448 | + | ||
449 | diff --git a/tests/qemu-iotests/group b/tests/qemu-iotests/group | ||
15 | index XXXXXXX..XXXXXXX 100644 | 450 | index XXXXXXX..XXXXXXX 100644 |
16 | --- a/block/vvfat.c | 451 | --- a/tests/qemu-iotests/group |
17 | +++ b/block/vvfat.c | 452 | +++ b/tests/qemu-iotests/group |
18 | @@ -XXX,XX +XXX,XX @@ static int vvfat_open(BlockDriverState *bs, QDict *options, int flags, | 453 | @@ -XXX,XX +XXX,XX @@ |
19 | s->fat2 = NULL; | 454 | 270 rw backing quick |
20 | s->downcase_short_names = 1; | 455 | 272 rw |
21 | 456 | 273 backing quick | |
22 | - fprintf(stderr, "vvfat %s chs %d,%d,%d\n", | 457 | +274 rw backing |
23 | - dirname, cyls, heads, secs); | 458 | 277 rw quick |
24 | + DLOG(fprintf(stderr, "vvfat %s chs %d,%d,%d\n", | 459 | 279 rw backing quick |
25 | + dirname, cyls, heads, secs)); | 460 | 280 rw migration quick |
26 | |||
27 | s->sector_count = cyls * heads * secs - s->offset_to_bootsector; | ||
28 | |||
29 | -- | 461 | -- |
30 | 2.13.6 | 462 | 2.25.3 |
31 | 463 | ||
32 | 464 | diff view generated by jsdifflib |
1 | From: Max Reitz <mreitz@redhat.com> | 1 | The BDRV_REQ_ZERO_WRITE is currently implemented in a way that first the |
---|---|---|---|
2 | image is possibly preallocated and then the zero flag is added to all | ||
3 | clusters. This means that a copy-on-write operation may be needed when | ||
4 | writing to these clusters, despite having used preallocation, negating | ||
5 | one of the major benefits of preallocation. | ||
2 | 6 | ||
3 | 223 tests persistent dirty bitmaps which are not supported in | 7 | Instead, try to forward the BDRV_REQ_ZERO_WRITE to the protocol driver, |
4 | compat=0.10, so that option is unsupported for this test. | 8 | and if the protocol driver can ensure that the new area reads as zeros, |
9 | we can skip setting the zero flag in the qcow2 layer. | ||
5 | 10 | ||
6 | Signed-off-by: Max Reitz <mreitz@redhat.com> | 11 | Unfortunately, the same approach doesn't work for metadata |
7 | Tested-by: John Snow <jsnow@redhat.com> | 12 | preallocation, so we'll still set the zero flag there. |
8 | Reviewed-by: John Snow <jsnow@redhat.com> | 13 | |
14 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> | ||
15 | Reviewed-by: Max Reitz <mreitz@redhat.com> | ||
16 | Message-Id: <20200424142701.67053-1-kwolf@redhat.com> | ||
17 | Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | ||
9 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> | 18 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> |
10 | --- | 19 | --- |
11 | tests/qemu-iotests/223 | 2 ++ | 20 | block/qcow2.c | 22 +++++++++++++++++++--- |
12 | 1 file changed, 2 insertions(+) | 21 | tests/qemu-iotests/274.out | 4 ++-- |
22 | 2 files changed, 21 insertions(+), 5 deletions(-) | ||
13 | 23 | ||
14 | diff --git a/tests/qemu-iotests/223 b/tests/qemu-iotests/223 | 24 | diff --git a/block/qcow2.c b/block/qcow2.c |
15 | index XXXXXXX..XXXXXXX 100755 | 25 | index XXXXXXX..XXXXXXX 100644 |
16 | --- a/tests/qemu-iotests/223 | 26 | --- a/block/qcow2.c |
17 | +++ b/tests/qemu-iotests/223 | 27 | +++ b/block/qcow2.c |
18 | @@ -XXX,XX +XXX,XX @@ trap "_cleanup; exit \$status" 0 1 2 3 15 | 28 | @@ -XXX,XX +XXX,XX @@ static int coroutine_fn qcow2_co_truncate(BlockDriverState *bs, int64_t offset, |
19 | _supported_fmt qcow2 | 29 | /* Allocate the data area */ |
20 | _supported_proto file # uses NBD as well | 30 | new_file_size = allocation_start + |
21 | _supported_os Linux | 31 | nb_new_data_clusters * s->cluster_size; |
22 | +# Persistent dirty bitmaps require compat=1.1 | 32 | - /* Image file grows, so @exact does not matter */ |
23 | +_unsupported_imgopts 'compat=0.10' | 33 | - ret = bdrv_co_truncate(bs->file, new_file_size, false, prealloc, 0, |
24 | 34 | - errp); | |
25 | function do_run_qemu() | 35 | + /* |
26 | { | 36 | + * Image file grows, so @exact does not matter. |
37 | + * | ||
38 | + * If we need to zero out the new area, try first whether the protocol | ||
39 | + * driver can already take care of this. | ||
40 | + */ | ||
41 | + if (flags & BDRV_REQ_ZERO_WRITE) { | ||
42 | + ret = bdrv_co_truncate(bs->file, new_file_size, false, prealloc, | ||
43 | + BDRV_REQ_ZERO_WRITE, NULL); | ||
44 | + if (ret >= 0) { | ||
45 | + flags &= ~BDRV_REQ_ZERO_WRITE; | ||
46 | + } | ||
47 | + } else { | ||
48 | + ret = -1; | ||
49 | + } | ||
50 | + if (ret < 0) { | ||
51 | + ret = bdrv_co_truncate(bs->file, new_file_size, false, prealloc, 0, | ||
52 | + errp); | ||
53 | + } | ||
54 | if (ret < 0) { | ||
55 | error_prepend(errp, "Failed to resize underlying file: "); | ||
56 | qcow2_free_clusters(bs, allocation_start, | ||
57 | diff --git a/tests/qemu-iotests/274.out b/tests/qemu-iotests/274.out | ||
58 | index XXXXXXX..XXXXXXX 100644 | ||
59 | --- a/tests/qemu-iotests/274.out | ||
60 | +++ b/tests/qemu-iotests/274.out | ||
61 | @@ -XXX,XX +XXX,XX @@ read 65536/65536 bytes at offset 9437184 | ||
62 | 10 MiB (0xa00000) bytes allocated at offset 5 MiB (0x500000) | ||
63 | |||
64 | [{ "start": 0, "length": 5242880, "depth": 1, "zero": true, "data": false}, | ||
65 | -{ "start": 5242880, "length": 10485760, "depth": 0, "zero": true, "data": false, "offset": 327680}] | ||
66 | +{ "start": 5242880, "length": 10485760, "depth": 0, "zero": false, "data": true, "offset": 327680}] | ||
67 | |||
68 | === preallocation=full === | ||
69 | Formatting 'TEST_DIR/PID-base', fmt=qcow2 size=16777216 cluster_size=65536 lazy_refcounts=off refcount_bits=16 | ||
70 | @@ -XXX,XX +XXX,XX @@ read 65536/65536 bytes at offset 11534336 | ||
71 | 4 MiB (0x400000) bytes allocated at offset 8 MiB (0x800000) | ||
72 | |||
73 | [{ "start": 0, "length": 8388608, "depth": 1, "zero": true, "data": false}, | ||
74 | -{ "start": 8388608, "length": 4194304, "depth": 0, "zero": true, "data": false, "offset": 327680}] | ||
75 | +{ "start": 8388608, "length": 4194304, "depth": 0, "zero": false, "data": true, "offset": 327680}] | ||
76 | |||
77 | === preallocation=off === | ||
78 | Formatting 'TEST_DIR/PID-base', fmt=qcow2 size=393216 cluster_size=65536 lazy_refcounts=off refcount_bits=16 | ||
27 | -- | 79 | -- |
28 | 2.13.6 | 80 | 2.25.3 |
29 | 81 | ||
30 | 82 | diff view generated by jsdifflib |
1 | From: Max Reitz <mreitz@redhat.com> | 1 | From: Andrzej Jakowski <andrzej.jakowski@linux.intel.com> |
---|---|---|---|
2 | 2 | ||
3 | The test directory should be filtered before the image format, otherwise | 3 | This patch introduces support for PMR that has been defined as part of NVMe 1.4 |
4 | the test will fail if the image format is part of the test directory, | 4 | spec. User can now specify a pmrdev option that should point to HostMemoryBackend. |
5 | like so: | 5 | pmrdev memory region will subsequently be exposed as PCI BAR 2 in emulated NVMe |
6 | device. Guest OS can perform mmio read and writes to the PMR region that will stay | ||
7 | persistent across system reboot. | ||
6 | 8 | ||
7 | [...] | 9 | Signed-off-by: Andrzej Jakowski <andrzej.jakowski@linux.intel.com> |
8 | -can't open: Could not open 'TEST_DIR/t.IMGFMT': Is a directory | 10 | Reviewed-by: Klaus Jensen <k.jensen@samsung.com> |
9 | +can't open: Could not open '/tmp/test-IMGFMT/t.IMGFMT': Is a directory | 11 | Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> |
10 | [...] | 12 | Message-Id: <20200330164656.9348-1-andrzej.jakowski@linux.intel.com> |
11 | 13 | Reviewed-by: Keith Busch <kbusch@kernel.org> | |
12 | Signed-off-by: Max Reitz <mreitz@redhat.com> | ||
13 | Reviewed-by: John Snow <jsnow@redhat.com> | ||
14 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> | 14 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> |
15 | --- | 15 | --- |
16 | tests/qemu-iotests/226 | 4 ++-- | 16 | hw/block/nvme.h | 2 + |
17 | 1 file changed, 2 insertions(+), 2 deletions(-) | 17 | include/block/nvme.h | 172 +++++++++++++++++++++++++++++++++++++++++ |
18 | hw/block/nvme.c | 109 ++++++++++++++++++++++++++ | ||
19 | hw/block/Makefile.objs | 2 +- | ||
20 | hw/block/trace-events | 4 + | ||
21 | 5 files changed, 288 insertions(+), 1 deletion(-) | ||
18 | 22 | ||
19 | diff --git a/tests/qemu-iotests/226 b/tests/qemu-iotests/226 | 23 | diff --git a/hw/block/nvme.h b/hw/block/nvme.h |
20 | index XXXXXXX..XXXXXXX 100755 | 24 | index XXXXXXX..XXXXXXX 100644 |
21 | --- a/tests/qemu-iotests/226 | 25 | --- a/hw/block/nvme.h |
22 | +++ b/tests/qemu-iotests/226 | 26 | +++ b/hw/block/nvme.h |
23 | @@ -XXX,XX +XXX,XX @@ for PROTO in "file" "host_device" "host_cdrom"; do | 27 | @@ -XXX,XX +XXX,XX @@ typedef struct NvmeCtrl { |
24 | echo "=== Testing with driver:$PROTO ===" | 28 | uint64_t timestamp_set_qemu_clock_ms; /* QEMU clock time */ |
25 | echo | 29 | |
26 | echo "== Testing RO ==" | 30 | char *serial; |
27 | - $QEMU_IO -c "open -r -o driver=$PROTO,filename=$TEST_IMG" 2>&1 | _filter_imgfmt | _filter_testdir | 31 | + HostMemoryBackend *pmrdev; |
28 | + $QEMU_IO -c "open -r -o driver=$PROTO,filename=$TEST_IMG" 2>&1 | _filter_testdir | _filter_imgfmt | 32 | + |
29 | $QEMU_IO -c "open -r -o driver=$PROTO,filename=/dev/null" 2>&1 | _filter_imgfmt | 33 | NvmeNamespace *namespaces; |
30 | echo "== Testing RW ==" | 34 | NvmeSQueue **sq; |
31 | - $QEMU_IO -c "open -o driver=$PROTO,filename=$TEST_IMG" 2>&1 | _filter_imgfmt | _filter_testdir | 35 | NvmeCQueue **cq; |
32 | + $QEMU_IO -c "open -o driver=$PROTO,filename=$TEST_IMG" 2>&1 | _filter_testdir | _filter_imgfmt | 36 | diff --git a/include/block/nvme.h b/include/block/nvme.h |
33 | $QEMU_IO -c "open -o driver=$PROTO,filename=/dev/null" 2>&1 | _filter_imgfmt | 37 | index XXXXXXX..XXXXXXX 100644 |
34 | done | 38 | --- a/include/block/nvme.h |
35 | 39 | +++ b/include/block/nvme.h | |
40 | @@ -XXX,XX +XXX,XX @@ typedef struct NvmeBar { | ||
41 | uint64_t acq; | ||
42 | uint32_t cmbloc; | ||
43 | uint32_t cmbsz; | ||
44 | + uint8_t padding[3520]; /* not used by QEMU */ | ||
45 | + uint32_t pmrcap; | ||
46 | + uint32_t pmrctl; | ||
47 | + uint32_t pmrsts; | ||
48 | + uint32_t pmrebs; | ||
49 | + uint32_t pmrswtp; | ||
50 | + uint32_t pmrmsc; | ||
51 | } NvmeBar; | ||
52 | |||
53 | enum NvmeCapShift { | ||
54 | @@ -XXX,XX +XXX,XX @@ enum NvmeCapShift { | ||
55 | CAP_CSS_SHIFT = 37, | ||
56 | CAP_MPSMIN_SHIFT = 48, | ||
57 | CAP_MPSMAX_SHIFT = 52, | ||
58 | + CAP_PMR_SHIFT = 56, | ||
59 | }; | ||
60 | |||
61 | enum NvmeCapMask { | ||
62 | @@ -XXX,XX +XXX,XX @@ enum NvmeCapMask { | ||
63 | CAP_CSS_MASK = 0xff, | ||
64 | CAP_MPSMIN_MASK = 0xf, | ||
65 | CAP_MPSMAX_MASK = 0xf, | ||
66 | + CAP_PMR_MASK = 0x1, | ||
67 | }; | ||
68 | |||
69 | #define NVME_CAP_MQES(cap) (((cap) >> CAP_MQES_SHIFT) & CAP_MQES_MASK) | ||
70 | @@ -XXX,XX +XXX,XX @@ enum NvmeCapMask { | ||
71 | << CAP_MPSMIN_SHIFT) | ||
72 | #define NVME_CAP_SET_MPSMAX(cap, val) (cap |= (uint64_t)(val & CAP_MPSMAX_MASK)\ | ||
73 | << CAP_MPSMAX_SHIFT) | ||
74 | +#define NVME_CAP_SET_PMRS(cap, val) (cap |= (uint64_t)(val & CAP_PMR_MASK)\ | ||
75 | + << CAP_PMR_SHIFT) | ||
76 | |||
77 | enum NvmeCcShift { | ||
78 | CC_EN_SHIFT = 0, | ||
79 | @@ -XXX,XX +XXX,XX @@ enum NvmeCmbszMask { | ||
80 | #define NVME_CMBSZ_GETSIZE(cmbsz) \ | ||
81 | (NVME_CMBSZ_SZ(cmbsz) * (1 << (12 + 4 * NVME_CMBSZ_SZU(cmbsz)))) | ||
82 | |||
83 | +enum NvmePmrcapShift { | ||
84 | + PMRCAP_RDS_SHIFT = 3, | ||
85 | + PMRCAP_WDS_SHIFT = 4, | ||
86 | + PMRCAP_BIR_SHIFT = 5, | ||
87 | + PMRCAP_PMRTU_SHIFT = 8, | ||
88 | + PMRCAP_PMRWBM_SHIFT = 10, | ||
89 | + PMRCAP_PMRTO_SHIFT = 16, | ||
90 | + PMRCAP_CMSS_SHIFT = 24, | ||
91 | +}; | ||
92 | + | ||
93 | +enum NvmePmrcapMask { | ||
94 | + PMRCAP_RDS_MASK = 0x1, | ||
95 | + PMRCAP_WDS_MASK = 0x1, | ||
96 | + PMRCAP_BIR_MASK = 0x7, | ||
97 | + PMRCAP_PMRTU_MASK = 0x3, | ||
98 | + PMRCAP_PMRWBM_MASK = 0xf, | ||
99 | + PMRCAP_PMRTO_MASK = 0xff, | ||
100 | + PMRCAP_CMSS_MASK = 0x1, | ||
101 | +}; | ||
102 | + | ||
103 | +#define NVME_PMRCAP_RDS(pmrcap) \ | ||
104 | + ((pmrcap >> PMRCAP_RDS_SHIFT) & PMRCAP_RDS_MASK) | ||
105 | +#define NVME_PMRCAP_WDS(pmrcap) \ | ||
106 | + ((pmrcap >> PMRCAP_WDS_SHIFT) & PMRCAP_WDS_MASK) | ||
107 | +#define NVME_PMRCAP_BIR(pmrcap) \ | ||
108 | + ((pmrcap >> PMRCAP_BIR_SHIFT) & PMRCAP_BIR_MASK) | ||
109 | +#define NVME_PMRCAP_PMRTU(pmrcap) \ | ||
110 | + ((pmrcap >> PMRCAP_PMRTU_SHIFT) & PMRCAP_PMRTU_MASK) | ||
111 | +#define NVME_PMRCAP_PMRWBM(pmrcap) \ | ||
112 | + ((pmrcap >> PMRCAP_PMRWBM_SHIFT) & PMRCAP_PMRWBM_MASK) | ||
113 | +#define NVME_PMRCAP_PMRTO(pmrcap) \ | ||
114 | + ((pmrcap >> PMRCAP_PMRTO_SHIFT) & PMRCAP_PMRTO_MASK) | ||
115 | +#define NVME_PMRCAP_CMSS(pmrcap) \ | ||
116 | + ((pmrcap >> PMRCAP_CMSS_SHIFT) & PMRCAP_CMSS_MASK) | ||
117 | + | ||
118 | +#define NVME_PMRCAP_SET_RDS(pmrcap, val) \ | ||
119 | + (pmrcap |= (uint64_t)(val & PMRCAP_RDS_MASK) << PMRCAP_RDS_SHIFT) | ||
120 | +#define NVME_PMRCAP_SET_WDS(pmrcap, val) \ | ||
121 | + (pmrcap |= (uint64_t)(val & PMRCAP_WDS_MASK) << PMRCAP_WDS_SHIFT) | ||
122 | +#define NVME_PMRCAP_SET_BIR(pmrcap, val) \ | ||
123 | + (pmrcap |= (uint64_t)(val & PMRCAP_BIR_MASK) << PMRCAP_BIR_SHIFT) | ||
124 | +#define NVME_PMRCAP_SET_PMRTU(pmrcap, val) \ | ||
125 | + (pmrcap |= (uint64_t)(val & PMRCAP_PMRTU_MASK) << PMRCAP_PMRTU_SHIFT) | ||
126 | +#define NVME_PMRCAP_SET_PMRWBM(pmrcap, val) \ | ||
127 | + (pmrcap |= (uint64_t)(val & PMRCAP_PMRWBM_MASK) << PMRCAP_PMRWBM_SHIFT) | ||
128 | +#define NVME_PMRCAP_SET_PMRTO(pmrcap, val) \ | ||
129 | + (pmrcap |= (uint64_t)(val & PMRCAP_PMRTO_MASK) << PMRCAP_PMRTO_SHIFT) | ||
130 | +#define NVME_PMRCAP_SET_CMSS(pmrcap, val) \ | ||
131 | + (pmrcap |= (uint64_t)(val & PMRCAP_CMSS_MASK) << PMRCAP_CMSS_SHIFT) | ||
132 | + | ||
133 | +enum NvmePmrctlShift { | ||
134 | + PMRCTL_EN_SHIFT = 0, | ||
135 | +}; | ||
136 | + | ||
137 | +enum NvmePmrctlMask { | ||
138 | + PMRCTL_EN_MASK = 0x1, | ||
139 | +}; | ||
140 | + | ||
141 | +#define NVME_PMRCTL_EN(pmrctl) ((pmrctl >> PMRCTL_EN_SHIFT) & PMRCTL_EN_MASK) | ||
142 | + | ||
143 | +#define NVME_PMRCTL_SET_EN(pmrctl, val) \ | ||
144 | + (pmrctl |= (uint64_t)(val & PMRCTL_EN_MASK) << PMRCTL_EN_SHIFT) | ||
145 | + | ||
146 | +enum NvmePmrstsShift { | ||
147 | + PMRSTS_ERR_SHIFT = 0, | ||
148 | + PMRSTS_NRDY_SHIFT = 8, | ||
149 | + PMRSTS_HSTS_SHIFT = 9, | ||
150 | + PMRSTS_CBAI_SHIFT = 12, | ||
151 | +}; | ||
152 | + | ||
153 | +enum NvmePmrstsMask { | ||
154 | + PMRSTS_ERR_MASK = 0xff, | ||
155 | + PMRSTS_NRDY_MASK = 0x1, | ||
156 | + PMRSTS_HSTS_MASK = 0x7, | ||
157 | + PMRSTS_CBAI_MASK = 0x1, | ||
158 | +}; | ||
159 | + | ||
160 | +#define NVME_PMRSTS_ERR(pmrsts) \ | ||
161 | + ((pmrsts >> PMRSTS_ERR_SHIFT) & PMRSTS_ERR_MASK) | ||
162 | +#define NVME_PMRSTS_NRDY(pmrsts) \ | ||
163 | + ((pmrsts >> PMRSTS_NRDY_SHIFT) & PMRSTS_NRDY_MASK) | ||
164 | +#define NVME_PMRSTS_HSTS(pmrsts) \ | ||
165 | + ((pmrsts >> PMRSTS_HSTS_SHIFT) & PMRSTS_HSTS_MASK) | ||
166 | +#define NVME_PMRSTS_CBAI(pmrsts) \ | ||
167 | + ((pmrsts >> PMRSTS_CBAI_SHIFT) & PMRSTS_CBAI_MASK) | ||
168 | + | ||
169 | +#define NVME_PMRSTS_SET_ERR(pmrsts, val) \ | ||
170 | + (pmrsts |= (uint64_t)(val & PMRSTS_ERR_MASK) << PMRSTS_ERR_SHIFT) | ||
171 | +#define NVME_PMRSTS_SET_NRDY(pmrsts, val) \ | ||
172 | + (pmrsts |= (uint64_t)(val & PMRSTS_NRDY_MASK) << PMRSTS_NRDY_SHIFT) | ||
173 | +#define NVME_PMRSTS_SET_HSTS(pmrsts, val) \ | ||
174 | + (pmrsts |= (uint64_t)(val & PMRSTS_HSTS_MASK) << PMRSTS_HSTS_SHIFT) | ||
175 | +#define NVME_PMRSTS_SET_CBAI(pmrsts, val) \ | ||
176 | + (pmrsts |= (uint64_t)(val & PMRSTS_CBAI_MASK) << PMRSTS_CBAI_SHIFT) | ||
177 | + | ||
178 | +enum NvmePmrebsShift { | ||
179 | + PMREBS_PMRSZU_SHIFT = 0, | ||
180 | + PMREBS_RBB_SHIFT = 4, | ||
181 | + PMREBS_PMRWBZ_SHIFT = 8, | ||
182 | +}; | ||
183 | + | ||
184 | +enum NvmePmrebsMask { | ||
185 | + PMREBS_PMRSZU_MASK = 0xf, | ||
186 | + PMREBS_RBB_MASK = 0x1, | ||
187 | + PMREBS_PMRWBZ_MASK = 0xffffff, | ||
188 | +}; | ||
189 | + | ||
190 | +#define NVME_PMREBS_PMRSZU(pmrebs) \ | ||
191 | + ((pmrebs >> PMREBS_PMRSZU_SHIFT) & PMREBS_PMRSZU_MASK) | ||
192 | +#define NVME_PMREBS_RBB(pmrebs) \ | ||
193 | + ((pmrebs >> PMREBS_RBB_SHIFT) & PMREBS_RBB_MASK) | ||
194 | +#define NVME_PMREBS_PMRWBZ(pmrebs) \ | ||
195 | + ((pmrebs >> PMREBS_PMRWBZ_SHIFT) & PMREBS_PMRWBZ_MASK) | ||
196 | + | ||
197 | +#define NVME_PMREBS_SET_PMRSZU(pmrebs, val) \ | ||
198 | + (pmrebs |= (uint64_t)(val & PMREBS_PMRSZU_MASK) << PMREBS_PMRSZU_SHIFT) | ||
199 | +#define NVME_PMREBS_SET_RBB(pmrebs, val) \ | ||
200 | + (pmrebs |= (uint64_t)(val & PMREBS_RBB_MASK) << PMREBS_RBB_SHIFT) | ||
201 | +#define NVME_PMREBS_SET_PMRWBZ(pmrebs, val) \ | ||
202 | + (pmrebs |= (uint64_t)(val & PMREBS_PMRWBZ_MASK) << PMREBS_PMRWBZ_SHIFT) | ||
203 | + | ||
204 | +enum NvmePmrswtpShift { | ||
205 | + PMRSWTP_PMRSWTU_SHIFT = 0, | ||
206 | + PMRSWTP_PMRSWTV_SHIFT = 8, | ||
207 | +}; | ||
208 | + | ||
209 | +enum NvmePmrswtpMask { | ||
210 | + PMRSWTP_PMRSWTU_MASK = 0xf, | ||
211 | + PMRSWTP_PMRSWTV_MASK = 0xffffff, | ||
212 | +}; | ||
213 | + | ||
214 | +#define NVME_PMRSWTP_PMRSWTU(pmrswtp) \ | ||
215 | + ((pmrswtp >> PMRSWTP_PMRSWTU_SHIFT) & PMRSWTP_PMRSWTU_MASK) | ||
216 | +#define NVME_PMRSWTP_PMRSWTV(pmrswtp) \ | ||
217 | + ((pmrswtp >> PMRSWTP_PMRSWTV_SHIFT) & PMRSWTP_PMRSWTV_MASK) | ||
218 | + | ||
219 | +#define NVME_PMRSWTP_SET_PMRSWTU(pmrswtp, val) \ | ||
220 | + (pmrswtp |= (uint64_t)(val & PMRSWTP_PMRSWTU_MASK) << PMRSWTP_PMRSWTU_SHIFT) | ||
221 | +#define NVME_PMRSWTP_SET_PMRSWTV(pmrswtp, val) \ | ||
222 | + (pmrswtp |= (uint64_t)(val & PMRSWTP_PMRSWTV_MASK) << PMRSWTP_PMRSWTV_SHIFT) | ||
223 | + | ||
224 | +enum NvmePmrmscShift { | ||
225 | + PMRMSC_CMSE_SHIFT = 1, | ||
226 | + PMRMSC_CBA_SHIFT = 12, | ||
227 | +}; | ||
228 | + | ||
229 | +enum NvmePmrmscMask { | ||
230 | + PMRMSC_CMSE_MASK = 0x1, | ||
231 | + PMRMSC_CBA_MASK = 0xfffffffffffff, | ||
232 | +}; | ||
233 | + | ||
234 | +#define NVME_PMRMSC_CMSE(pmrmsc) \ | ||
235 | + ((pmrmsc >> PMRMSC_CMSE_SHIFT) & PMRMSC_CMSE_MASK) | ||
236 | +#define NVME_PMRMSC_CBA(pmrmsc) \ | ||
237 | + ((pmrmsc >> PMRMSC_CBA_SHIFT) & PMRMSC_CBA_MASK) | ||
238 | + | ||
239 | +#define NVME_PMRMSC_SET_CMSE(pmrmsc, val) \ | ||
240 | + (pmrmsc |= (uint64_t)(val & PMRMSC_CMSE_MASK) << PMRMSC_CMSE_SHIFT) | ||
241 | +#define NVME_PMRMSC_SET_CBA(pmrmsc, val) \ | ||
242 | + (pmrmsc |= (uint64_t)(val & PMRMSC_CBA_MASK) << PMRMSC_CBA_SHIFT) | ||
243 | + | ||
244 | typedef struct NvmeCmd { | ||
245 | uint8_t opcode; | ||
246 | uint8_t fuse; | ||
247 | diff --git a/hw/block/nvme.c b/hw/block/nvme.c | ||
248 | index XXXXXXX..XXXXXXX 100644 | ||
249 | --- a/hw/block/nvme.c | ||
250 | +++ b/hw/block/nvme.c | ||
251 | @@ -XXX,XX +XXX,XX @@ | ||
252 | * -drive file=<file>,if=none,id=<drive_id> | ||
253 | * -device nvme,drive=<drive_id>,serial=<serial>,id=<id[optional]>, \ | ||
254 | * cmb_size_mb=<cmb_size_mb[optional]>, \ | ||
255 | + * [pmrdev=<mem_backend_file_id>,] \ | ||
256 | * num_queues=<N[optional]> | ||
257 | * | ||
258 | * Note cmb_size_mb denotes size of CMB in MB. CMB is assumed to be at | ||
259 | * offset 0 in BAR2 and supports only WDS, RDS and SQS for now. | ||
260 | + * | ||
261 | + * cmb_size_mb= and pmrdev= options are mutually exclusive due to limitation | ||
262 | + * in available BAR's. cmb_size_mb= will take precedence over pmrdev= when | ||
263 | + * both provided. | ||
264 | + * Enabling pmr emulation can be achieved by pointing to memory-backend-file. | ||
265 | + * For example: | ||
266 | + * -object memory-backend-file,id=<mem_id>,share=on,mem-path=<file_path>, \ | ||
267 | + * size=<size> .... -device nvme,...,pmrdev=<mem_id> | ||
268 | */ | ||
269 | |||
270 | #include "qemu/osdep.h" | ||
271 | @@ -XXX,XX +XXX,XX @@ | ||
272 | #include "sysemu/sysemu.h" | ||
273 | #include "qapi/error.h" | ||
274 | #include "qapi/visitor.h" | ||
275 | +#include "sysemu/hostmem.h" | ||
276 | #include "sysemu/block-backend.h" | ||
277 | +#include "exec/ram_addr.h" | ||
278 | |||
279 | #include "qemu/log.h" | ||
280 | #include "qemu/module.h" | ||
281 | @@ -XXX,XX +XXX,XX @@ static void nvme_write_bar(NvmeCtrl *n, hwaddr offset, uint64_t data, | ||
282 | NVME_GUEST_ERR(nvme_ub_mmiowr_cmbsz_readonly, | ||
283 | "invalid write to read only CMBSZ, ignored"); | ||
284 | return; | ||
285 | + case 0xE00: /* PMRCAP */ | ||
286 | + NVME_GUEST_ERR(nvme_ub_mmiowr_pmrcap_readonly, | ||
287 | + "invalid write to PMRCAP register, ignored"); | ||
288 | + return; | ||
289 | + case 0xE04: /* TODO PMRCTL */ | ||
290 | + break; | ||
291 | + case 0xE08: /* PMRSTS */ | ||
292 | + NVME_GUEST_ERR(nvme_ub_mmiowr_pmrsts_readonly, | ||
293 | + "invalid write to PMRSTS register, ignored"); | ||
294 | + return; | ||
295 | + case 0xE0C: /* PMREBS */ | ||
296 | + NVME_GUEST_ERR(nvme_ub_mmiowr_pmrebs_readonly, | ||
297 | + "invalid write to PMREBS register, ignored"); | ||
298 | + return; | ||
299 | + case 0xE10: /* PMRSWTP */ | ||
300 | + NVME_GUEST_ERR(nvme_ub_mmiowr_pmrswtp_readonly, | ||
301 | + "invalid write to PMRSWTP register, ignored"); | ||
302 | + return; | ||
303 | + case 0xE14: /* TODO PMRMSC */ | ||
304 | + break; | ||
305 | default: | ||
306 | NVME_GUEST_ERR(nvme_ub_mmiowr_invalid, | ||
307 | "invalid MMIO write," | ||
308 | @@ -XXX,XX +XXX,XX @@ static uint64_t nvme_mmio_read(void *opaque, hwaddr addr, unsigned size) | ||
309 | } | ||
310 | |||
311 | if (addr < sizeof(n->bar)) { | ||
312 | + /* | ||
313 | + * When PMRWBM bit 1 is set then read from | ||
314 | + * from PMRSTS should ensure prior writes | ||
315 | + * made it to persistent media | ||
316 | + */ | ||
317 | + if (addr == 0xE08 && | ||
318 | + (NVME_PMRCAP_PMRWBM(n->bar.pmrcap) & 0x02)) { | ||
319 | + qemu_ram_writeback(n->pmrdev->mr.ram_block, | ||
320 | + 0, n->pmrdev->size); | ||
321 | + } | ||
322 | memcpy(&val, ptr + addr, size); | ||
323 | } else { | ||
324 | NVME_GUEST_ERR(nvme_ub_mmiord_invalid_ofs, | ||
325 | @@ -XXX,XX +XXX,XX @@ static void nvme_realize(PCIDevice *pci_dev, Error **errp) | ||
326 | error_setg(errp, "serial property not set"); | ||
327 | return; | ||
328 | } | ||
329 | + | ||
330 | + if (!n->cmb_size_mb && n->pmrdev) { | ||
331 | + if (host_memory_backend_is_mapped(n->pmrdev)) { | ||
332 | + char *path = object_get_canonical_path_component(OBJECT(n->pmrdev)); | ||
333 | + error_setg(errp, "can't use already busy memdev: %s", path); | ||
334 | + g_free(path); | ||
335 | + return; | ||
336 | + } | ||
337 | + | ||
338 | + if (!is_power_of_2(n->pmrdev->size)) { | ||
339 | + error_setg(errp, "pmr backend size needs to be power of 2 in size"); | ||
340 | + return; | ||
341 | + } | ||
342 | + | ||
343 | + host_memory_backend_set_mapped(n->pmrdev, true); | ||
344 | + } | ||
345 | + | ||
346 | blkconf_blocksizes(&n->conf); | ||
347 | if (!blkconf_apply_backend_options(&n->conf, blk_is_read_only(n->conf.blk), | ||
348 | false, errp)) { | ||
349 | @@ -XXX,XX +XXX,XX @@ static void nvme_realize(PCIDevice *pci_dev, Error **errp) | ||
350 | PCI_BASE_ADDRESS_SPACE_MEMORY | PCI_BASE_ADDRESS_MEM_TYPE_64 | | ||
351 | PCI_BASE_ADDRESS_MEM_PREFETCH, &n->ctrl_mem); | ||
352 | |||
353 | + } else if (n->pmrdev) { | ||
354 | + /* Controller Capabilities register */ | ||
355 | + NVME_CAP_SET_PMRS(n->bar.cap, 1); | ||
356 | + | ||
357 | + /* PMR Capabities register */ | ||
358 | + n->bar.pmrcap = 0; | ||
359 | + NVME_PMRCAP_SET_RDS(n->bar.pmrcap, 0); | ||
360 | + NVME_PMRCAP_SET_WDS(n->bar.pmrcap, 0); | ||
361 | + NVME_PMRCAP_SET_BIR(n->bar.pmrcap, 2); | ||
362 | + NVME_PMRCAP_SET_PMRTU(n->bar.pmrcap, 0); | ||
363 | + /* Turn on bit 1 support */ | ||
364 | + NVME_PMRCAP_SET_PMRWBM(n->bar.pmrcap, 0x02); | ||
365 | + NVME_PMRCAP_SET_PMRTO(n->bar.pmrcap, 0); | ||
366 | + NVME_PMRCAP_SET_CMSS(n->bar.pmrcap, 0); | ||
367 | + | ||
368 | + /* PMR Control register */ | ||
369 | + n->bar.pmrctl = 0; | ||
370 | + NVME_PMRCTL_SET_EN(n->bar.pmrctl, 0); | ||
371 | + | ||
372 | + /* PMR Status register */ | ||
373 | + n->bar.pmrsts = 0; | ||
374 | + NVME_PMRSTS_SET_ERR(n->bar.pmrsts, 0); | ||
375 | + NVME_PMRSTS_SET_NRDY(n->bar.pmrsts, 0); | ||
376 | + NVME_PMRSTS_SET_HSTS(n->bar.pmrsts, 0); | ||
377 | + NVME_PMRSTS_SET_CBAI(n->bar.pmrsts, 0); | ||
378 | + | ||
379 | + /* PMR Elasticity Buffer Size register */ | ||
380 | + n->bar.pmrebs = 0; | ||
381 | + NVME_PMREBS_SET_PMRSZU(n->bar.pmrebs, 0); | ||
382 | + NVME_PMREBS_SET_RBB(n->bar.pmrebs, 0); | ||
383 | + NVME_PMREBS_SET_PMRWBZ(n->bar.pmrebs, 0); | ||
384 | + | ||
385 | + /* PMR Sustained Write Throughput register */ | ||
386 | + n->bar.pmrswtp = 0; | ||
387 | + NVME_PMRSWTP_SET_PMRSWTU(n->bar.pmrswtp, 0); | ||
388 | + NVME_PMRSWTP_SET_PMRSWTV(n->bar.pmrswtp, 0); | ||
389 | + | ||
390 | + /* PMR Memory Space Control register */ | ||
391 | + n->bar.pmrmsc = 0; | ||
392 | + NVME_PMRMSC_SET_CMSE(n->bar.pmrmsc, 0); | ||
393 | + NVME_PMRMSC_SET_CBA(n->bar.pmrmsc, 0); | ||
394 | + | ||
395 | + pci_register_bar(pci_dev, NVME_PMRCAP_BIR(n->bar.pmrcap), | ||
396 | + PCI_BASE_ADDRESS_SPACE_MEMORY | PCI_BASE_ADDRESS_MEM_TYPE_64 | | ||
397 | + PCI_BASE_ADDRESS_MEM_PREFETCH, &n->pmrdev->mr); | ||
398 | } | ||
399 | |||
400 | for (i = 0; i < n->num_namespaces; i++) { | ||
401 | @@ -XXX,XX +XXX,XX @@ static void nvme_exit(PCIDevice *pci_dev) | ||
402 | if (n->cmb_size_mb) { | ||
403 | g_free(n->cmbuf); | ||
404 | } | ||
405 | + | ||
406 | + if (n->pmrdev) { | ||
407 | + host_memory_backend_set_mapped(n->pmrdev, false); | ||
408 | + } | ||
409 | msix_uninit_exclusive_bar(pci_dev); | ||
410 | } | ||
411 | |||
412 | static Property nvme_props[] = { | ||
413 | DEFINE_BLOCK_PROPERTIES(NvmeCtrl, conf), | ||
414 | + DEFINE_PROP_LINK("pmrdev", NvmeCtrl, pmrdev, TYPE_MEMORY_BACKEND, | ||
415 | + HostMemoryBackend *), | ||
416 | DEFINE_PROP_STRING("serial", NvmeCtrl, serial), | ||
417 | DEFINE_PROP_UINT32("cmb_size_mb", NvmeCtrl, cmb_size_mb, 0), | ||
418 | DEFINE_PROP_UINT32("num_queues", NvmeCtrl, num_queues, 64), | ||
419 | diff --git a/hw/block/Makefile.objs b/hw/block/Makefile.objs | ||
420 | index XXXXXXX..XXXXXXX 100644 | ||
421 | --- a/hw/block/Makefile.objs | ||
422 | +++ b/hw/block/Makefile.objs | ||
423 | @@ -XXX,XX +XXX,XX @@ common-obj-$(CONFIG_PFLASH_CFI02) += pflash_cfi02.o | ||
424 | common-obj-$(CONFIG_XEN) += xen-block.o | ||
425 | common-obj-$(CONFIG_ECC) += ecc.o | ||
426 | common-obj-$(CONFIG_ONENAND) += onenand.o | ||
427 | -common-obj-$(CONFIG_NVME_PCI) += nvme.o | ||
428 | common-obj-$(CONFIG_SWIM) += swim.o | ||
429 | |||
430 | common-obj-$(CONFIG_SH4) += tc58128.o | ||
431 | |||
432 | obj-$(CONFIG_VIRTIO_BLK) += virtio-blk.o | ||
433 | obj-$(CONFIG_VHOST_USER_BLK) += vhost-user-blk.o | ||
434 | +obj-$(CONFIG_NVME_PCI) += nvme.o | ||
435 | |||
436 | obj-y += dataplane/ | ||
437 | diff --git a/hw/block/trace-events b/hw/block/trace-events | ||
438 | index XXXXXXX..XXXXXXX 100644 | ||
439 | --- a/hw/block/trace-events | ||
440 | +++ b/hw/block/trace-events | ||
441 | @@ -XXX,XX +XXX,XX @@ nvme_ub_mmiowr_ssreset_w1c_unsupported(void) "attempted to W1C CSTS.NSSRO but CA | ||
442 | nvme_ub_mmiowr_ssreset_unsupported(void) "attempted NVM subsystem reset but CAP.NSSRS is zero (not supported)" | ||
443 | nvme_ub_mmiowr_cmbloc_reserved(void) "invalid write to reserved CMBLOC when CMBSZ is zero, ignored" | ||
444 | nvme_ub_mmiowr_cmbsz_readonly(void) "invalid write to read only CMBSZ, ignored" | ||
445 | +nvme_ub_mmiowr_pmrcap_readonly(void) "invalid write to read only PMRCAP, ignored" | ||
446 | +nvme_ub_mmiowr_pmrsts_readonly(void) "invalid write to read only PMRSTS, ignored" | ||
447 | +nvme_ub_mmiowr_pmrebs_readonly(void) "invalid write to read only PMREBS, ignored" | ||
448 | +nvme_ub_mmiowr_pmrswtp_readonly(void) "invalid write to read only PMRSWTP, ignored" | ||
449 | nvme_ub_mmiowr_invalid(uint64_t offset, uint64_t data) "invalid MMIO write, offset=0x%"PRIx64", data=0x%"PRIx64"" | ||
450 | nvme_ub_mmiord_misaligned32(uint64_t offset) "MMIO read not 32-bit aligned, offset=0x%"PRIx64"" | ||
451 | nvme_ub_mmiord_toosmall(uint64_t offset) "MMIO read smaller than 32-bits, offset=0x%"PRIx64"" | ||
36 | -- | 452 | -- |
37 | 2.13.6 | 453 | 2.25.3 |
38 | 454 | ||
39 | 455 | diff view generated by jsdifflib |
1 | From: Peter Lieven <pl@kamp.de> | 1 | The QMP handler qmp_object_add() and the implementation of --object in |
---|---|---|---|
2 | qemu-storage-daemon can share most of the code. Currently, | ||
3 | qemu-storage-daemon calls qmp_object_add(), but this is not correct | ||
4 | because different visitors need to be used. | ||
2 | 5 | ||
3 | the min_sparse convert parameter can overflow (e.g. -S 1024G) | 6 | As a first step towards a fix, make qmp_object_add() a wrapper around a |
4 | in the conversion from int64_t to int resulting in a negative | 7 | new function user_creatable_add_dict() that can get an additional |
5 | min_sparse parameter. Avoid this by limiting the valid parameters | 8 | parameter. The handling of "props" is only required for compatibility |
6 | to sane values. In fact anything exceeding the convert buffer size | 9 | and not required for the qemu-storage-daemon command line, so it stays |
7 | is also pointless. While at it also forbid values that are non | 10 | in qmp_object_add(). |
8 | multiple of 512 to avoid undesired behaviour. For instance, values | ||
9 | between 1 and 511 were legal, but resulted in full allocation. | ||
10 | 11 | ||
11 | Cc: qemu-stable@nongnu.org | ||
12 | Signed-off-by: Peter Lieven <pl@kamp.de> | ||
13 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> | 12 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> |
14 | --- | 13 | --- |
15 | qemu-img.c | 16 +++++++++++----- | 14 | include/qom/object_interfaces.h | 12 ++++++++++++ |
16 | 1 file changed, 11 insertions(+), 5 deletions(-) | 15 | qom/object_interfaces.c | 27 +++++++++++++++++++++++++++ |
16 | qom/qom-qmp-cmds.c | 24 +----------------------- | ||
17 | 3 files changed, 40 insertions(+), 23 deletions(-) | ||
17 | 18 | ||
18 | diff --git a/qemu-img.c b/qemu-img.c | 19 | diff --git a/include/qom/object_interfaces.h b/include/qom/object_interfaces.h |
19 | index XXXXXXX..XXXXXXX 100644 | 20 | index XXXXXXX..XXXXXXX 100644 |
20 | --- a/qemu-img.c | 21 | --- a/include/qom/object_interfaces.h |
21 | +++ b/qemu-img.c | 22 | +++ b/include/qom/object_interfaces.h |
22 | @@ -XXX,XX +XXX,XX @@ static int convert_do_copy(ImgConvertState *s) | 23 | @@ -XXX,XX +XXX,XX @@ Object *user_creatable_add_type(const char *type, const char *id, |
23 | return s->ret; | 24 | const QDict *qdict, |
25 | Visitor *v, Error **errp); | ||
26 | |||
27 | +/** | ||
28 | + * user_creatable_add_dict: | ||
29 | + * @qdict: the object definition | ||
30 | + * @errp: if an error occurs, a pointer to an area to store the error | ||
31 | + * | ||
32 | + * Create an instance of the user creatable object that is defined by | ||
33 | + * @qdict. The object type is taken from the QDict key 'qom-type', its | ||
34 | + * ID from the key 'id'. The remaining entries in @qdict are used to | ||
35 | + * initialize the object properties. | ||
36 | + */ | ||
37 | +void user_creatable_add_dict(QDict *qdict, Error **errp); | ||
38 | + | ||
39 | /** | ||
40 | * user_creatable_add_opts: | ||
41 | * @opts: the object definition | ||
42 | diff --git a/qom/object_interfaces.c b/qom/object_interfaces.c | ||
43 | index XXXXXXX..XXXXXXX 100644 | ||
44 | --- a/qom/object_interfaces.c | ||
45 | +++ b/qom/object_interfaces.c | ||
46 | @@ -XXX,XX +XXX,XX @@ | ||
47 | #include "qapi/qmp/qerror.h" | ||
48 | #include "qapi/qmp/qjson.h" | ||
49 | #include "qapi/qmp/qstring.h" | ||
50 | +#include "qapi/qobject-input-visitor.h" | ||
51 | #include "qom/object_interfaces.h" | ||
52 | #include "qemu/help_option.h" | ||
53 | #include "qemu/module.h" | ||
54 | @@ -XXX,XX +XXX,XX @@ out: | ||
55 | return obj; | ||
24 | } | 56 | } |
25 | 57 | ||
26 | +#define MAX_BUF_SECTORS 32768 | 58 | +void user_creatable_add_dict(QDict *qdict, Error **errp) |
59 | +{ | ||
60 | + Visitor *v; | ||
61 | + Object *obj; | ||
62 | + g_autofree char *type = NULL; | ||
63 | + g_autofree char *id = NULL; | ||
27 | + | 64 | + |
28 | static int img_convert(int argc, char **argv) | 65 | + type = g_strdup(qdict_get_try_str(qdict, "qom-type")); |
66 | + if (!type) { | ||
67 | + error_setg(errp, QERR_MISSING_PARAMETER, "qom-type"); | ||
68 | + return; | ||
69 | + } | ||
70 | + qdict_del(qdict, "qom-type"); | ||
71 | + | ||
72 | + id = g_strdup(qdict_get_try_str(qdict, "id")); | ||
73 | + if (!id) { | ||
74 | + error_setg(errp, QERR_MISSING_PARAMETER, "id"); | ||
75 | + return; | ||
76 | + } | ||
77 | + qdict_del(qdict, "id"); | ||
78 | + | ||
79 | + v = qobject_input_visitor_new(QOBJECT(qdict)); | ||
80 | + obj = user_creatable_add_type(type, id, qdict, v, errp); | ||
81 | + visit_free(v); | ||
82 | + object_unref(obj); | ||
83 | +} | ||
84 | |||
85 | Object *user_creatable_add_opts(QemuOpts *opts, Error **errp) | ||
29 | { | 86 | { |
30 | int c, bs_i, flags, src_flags = 0; | 87 | diff --git a/qom/qom-qmp-cmds.c b/qom/qom-qmp-cmds.c |
31 | @@ -XXX,XX +XXX,XX @@ static int img_convert(int argc, char **argv) | 88 | index XXXXXXX..XXXXXXX 100644 |
32 | int64_t sval; | 89 | --- a/qom/qom-qmp-cmds.c |
33 | 90 | +++ b/qom/qom-qmp-cmds.c | |
34 | sval = cvtnum(optarg); | 91 | @@ -XXX,XX +XXX,XX @@ |
35 | - if (sval < 0) { | 92 | #include "qapi/qapi-commands-qom.h" |
36 | - error_report("Invalid minimum zero buffer size for sparse output specified"); | 93 | #include "qapi/qmp/qdict.h" |
37 | + if (sval < 0 || sval & (BDRV_SECTOR_SIZE - 1) || | 94 | #include "qapi/qmp/qerror.h" |
38 | + sval / BDRV_SECTOR_SIZE > MAX_BUF_SECTORS) { | 95 | -#include "qapi/qobject-input-visitor.h" |
39 | + error_report("Invalid buffer size for sparse output specified. " | 96 | #include "qemu/cutils.h" |
40 | + "Valid sizes are multiples of %llu up to %llu. Select " | 97 | #include "qom/object_interfaces.h" |
41 | + "0 to disable sparse detection (fully allocates output).", | 98 | #include "qom/qom-qobject.h" |
42 | + BDRV_SECTOR_SIZE, MAX_BUF_SECTORS * BDRV_SECTOR_SIZE); | 99 | @@ -XXX,XX +XXX,XX @@ void qmp_object_add(QDict *qdict, QObject **ret_data, Error **errp) |
43 | goto fail_getopt; | 100 | { |
44 | } | 101 | QObject *props; |
45 | 102 | QDict *pdict; | |
46 | @@ -XXX,XX +XXX,XX @@ static int img_convert(int argc, char **argv) | 103 | - Visitor *v; |
104 | - Object *obj; | ||
105 | - g_autofree char *type = NULL; | ||
106 | - g_autofree char *id = NULL; | ||
107 | - | ||
108 | - type = g_strdup(qdict_get_try_str(qdict, "qom-type")); | ||
109 | - if (!type) { | ||
110 | - error_setg(errp, QERR_MISSING_PARAMETER, "qom-type"); | ||
111 | - return; | ||
112 | - } | ||
113 | - qdict_del(qdict, "qom-type"); | ||
114 | - | ||
115 | - id = g_strdup(qdict_get_try_str(qdict, "id")); | ||
116 | - if (!id) { | ||
117 | - error_setg(errp, QERR_MISSING_PARAMETER, "id"); | ||
118 | - return; | ||
119 | - } | ||
120 | - qdict_del(qdict, "id"); | ||
121 | |||
122 | props = qdict_get(qdict, "props"); | ||
123 | if (props) { | ||
124 | @@ -XXX,XX +XXX,XX @@ void qmp_object_add(QDict *qdict, QObject **ret_data, Error **errp) | ||
125 | qobject_unref(pdict); | ||
47 | } | 126 | } |
48 | 127 | ||
49 | /* increase bufsectors from the default 4096 (2M) if opt_transfer | 128 | - v = qobject_input_visitor_new(QOBJECT(qdict)); |
50 | - * or discard_alignment of the out_bs is greater. Limit to 32768 (16MB) | 129 | - obj = user_creatable_add_type(type, id, qdict, v, errp); |
51 | - * as maximum. */ | 130 | - visit_free(v); |
52 | - s.buf_sectors = MIN(32768, | 131 | - object_unref(obj); |
53 | + * or discard_alignment of the out_bs is greater. Limit to | 132 | + user_creatable_add_dict(qdict, errp); |
54 | + * MAX_BUF_SECTORS as maximum which is currently 32768 (16MB). */ | 133 | } |
55 | + s.buf_sectors = MIN(MAX_BUF_SECTORS, | 134 | |
56 | MAX(s.buf_sectors, | 135 | void qmp_object_del(const char *id, Error **errp) |
57 | MAX(out_bs->bl.opt_transfer >> BDRV_SECTOR_BITS, | ||
58 | out_bs->bl.pdiscard_alignment >> | ||
59 | -- | 136 | -- |
60 | 2.13.6 | 137 | 2.25.3 |
61 | 138 | ||
62 | 139 | diff view generated by jsdifflib |
1 | The test case uses block devices with driver=file, which causes the test | 1 | After processing the option string with the keyval parser, we get a |
---|---|---|---|
2 | to fail after commit 230ff73904 added a deprecation warning for this. | 2 | QDict that contains only strings. This QDict must be fed to a keyval |
3 | Fix the test case to use driver=host_device and update the reference | 3 | visitor which converts the strings into the right data types. |
4 | output accordingly. | ||
5 | 4 | ||
5 | qmp_object_add(), however, uses the normal QObject input visitor, which | ||
6 | expects a QDict where all properties already have the QType that matches | ||
7 | the data type required by the QOM object type. | ||
8 | |||
9 | Change the --object implementation in qemu-storage-daemon so that it | ||
10 | doesn't call qmp_object_add(), but calls user_creatable_add_dict() | ||
11 | directly instead and pass it a new keyval boolean that decides which | ||
12 | visitor must be used. | ||
13 | |||
14 | Reported-by: Coiby Xu <coiby.xu@gmail.com> | ||
6 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> | 15 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> |
7 | --- | 16 | --- |
8 | tests/qemu-iotests/149 | 2 +- | 17 | include/qom/object_interfaces.h | 6 +++++- |
9 | tests/qemu-iotests/149.out | 344 ++++++++++++++++++++++----------------------- | 18 | qemu-storage-daemon.c | 4 +--- |
10 | 2 files changed, 173 insertions(+), 173 deletions(-) | 19 | qom/object_interfaces.c | 8 ++++++-- |
20 | qom/qom-qmp-cmds.c | 2 +- | ||
21 | 4 files changed, 13 insertions(+), 7 deletions(-) | ||
11 | 22 | ||
12 | diff --git a/tests/qemu-iotests/149 b/tests/qemu-iotests/149 | 23 | diff --git a/include/qom/object_interfaces.h b/include/qom/object_interfaces.h |
13 | index XXXXXXX..XXXXXXX 100755 | ||
14 | --- a/tests/qemu-iotests/149 | ||
15 | +++ b/tests/qemu-iotests/149 | ||
16 | @@ -XXX,XX +XXX,XX @@ def qemu_io_image_args(config, dev=False): | ||
17 | if dev: | ||
18 | return [ | ||
19 | "--image-opts", | ||
20 | - "driver=file,filename=%s" % config.device_path()] | ||
21 | + "driver=host_device,filename=%s" % config.device_path()] | ||
22 | else: | ||
23 | return [ | ||
24 | "--object", | ||
25 | diff --git a/tests/qemu-iotests/149.out b/tests/qemu-iotests/149.out | ||
26 | index XXXXXXX..XXXXXXX 100644 | 24 | index XXXXXXX..XXXXXXX 100644 |
27 | --- a/tests/qemu-iotests/149.out | 25 | --- a/include/qom/object_interfaces.h |
28 | +++ b/tests/qemu-iotests/149.out | 26 | +++ b/include/qom/object_interfaces.h |
29 | @@ -XXX,XX +XXX,XX @@ sudo cryptsetup -q -v luksFormat --cipher aes-xts-plain64 --key-size 512 --hash | 27 | @@ -XXX,XX +XXX,XX @@ Object *user_creatable_add_type(const char *type, const char *id, |
30 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-xts-plain64-sha1.img qiotest-145-aes-256-xts-plain64-sha1 | 28 | /** |
31 | # Write test pattern 0xa7 | 29 | * user_creatable_add_dict: |
32 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain64-sha1 | 30 | * @qdict: the object definition |
33 | -qemu-io -c write -P 0xa7 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha1 | 31 | + * @keyval: if true, use a keyval visitor for processing @qdict (i.e. |
34 | +qemu-io -c write -P 0xa7 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha1 | 32 | + * assume that all @qdict values are strings); otherwise, use |
35 | wrote 10485760/10485760 bytes at offset 104857600 | 33 | + * the normal QObject visitor (i.e. assume all @qdict values |
36 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | 34 | + * have the QType expected by the QOM object type) |
37 | 35 | * @errp: if an error occurs, a pointer to an area to store the error | |
38 | # Write test pattern 0x13 | 36 | * |
39 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain64-sha1 | 37 | * Create an instance of the user creatable object that is defined by |
40 | -qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha1 | 38 | @@ -XXX,XX +XXX,XX @@ Object *user_creatable_add_type(const char *type, const char *id, |
41 | +qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha1 | 39 | * ID from the key 'id'. The remaining entries in @qdict are used to |
42 | wrote 10485760/10485760 bytes at offset 3298534883328 | 40 | * initialize the object properties. |
43 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | 41 | */ |
44 | 42 | -void user_creatable_add_dict(QDict *qdict, Error **errp); | |
45 | @@ -XXX,XX +XXX,XX @@ wrote 10485760/10485760 bytes at offset 3298534883328 | 43 | +void user_creatable_add_dict(QDict *qdict, bool keyval, Error **errp); |
46 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-xts-plain64-sha1.img qiotest-145-aes-256-xts-plain64-sha1 | 44 | |
47 | # Read test pattern 0x91 | 45 | /** |
48 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain64-sha1 | 46 | * user_creatable_add_opts: |
49 | -qemu-io -c read -P 0x91 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha1 | 47 | diff --git a/qemu-storage-daemon.c b/qemu-storage-daemon.c |
50 | +qemu-io -c read -P 0x91 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha1 | 48 | index XXXXXXX..XXXXXXX 100644 |
51 | read 10485760/10485760 bytes at offset 104857600 | 49 | --- a/qemu-storage-daemon.c |
52 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | 50 | +++ b/qemu-storage-daemon.c |
53 | 51 | @@ -XXX,XX +XXX,XX @@ static void process_options(int argc, char *argv[]) | |
54 | # Read test pattern 0x5e | 52 | QemuOpts *opts; |
55 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain64-sha1 | 53 | const char *type; |
56 | -qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha1 | 54 | QDict *args; |
57 | +qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha1 | 55 | - QObject *ret_data = NULL; |
58 | read 10485760/10485760 bytes at offset 3298534883328 | 56 | |
59 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | 57 | /* FIXME The keyval parser rejects 'help' arguments, so we must |
60 | 58 | * unconditionall try QemuOpts first. */ | |
61 | @@ -XXX,XX +XXX,XX @@ Formatting 'TEST_DIR/luks-aes-256-xts-plain64-sha1.img', fmt=luks size=439804651 | 59 | @@ -XXX,XX +XXX,XX @@ static void process_options(int argc, char *argv[]) |
62 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-xts-plain64-sha1.img qiotest-145-aes-256-xts-plain64-sha1 | 60 | qemu_opts_del(opts); |
63 | # Write test pattern 0xa7 | 61 | |
64 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain64-sha1 | 62 | args = keyval_parse(optarg, "qom-type", &error_fatal); |
65 | -qemu-io -c write -P 0xa7 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha1 | 63 | - qmp_object_add(args, &ret_data, &error_fatal); |
66 | +qemu-io -c write -P 0xa7 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha1 | 64 | + user_creatable_add_dict(args, true, &error_fatal); |
67 | wrote 10485760/10485760 bytes at offset 104857600 | 65 | qobject_unref(args); |
68 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | 66 | - qobject_unref(ret_data); |
69 | 67 | break; | |
70 | # Write test pattern 0x13 | 68 | } |
71 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain64-sha1 | 69 | default: |
72 | -qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha1 | 70 | diff --git a/qom/object_interfaces.c b/qom/object_interfaces.c |
73 | +qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha1 | 71 | index XXXXXXX..XXXXXXX 100644 |
74 | wrote 10485760/10485760 bytes at offset 3298534883328 | 72 | --- a/qom/object_interfaces.c |
75 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | 73 | +++ b/qom/object_interfaces.c |
76 | 74 | @@ -XXX,XX +XXX,XX @@ out: | |
77 | @@ -XXX,XX +XXX,XX @@ wrote 10485760/10485760 bytes at offset 3298534883328 | 75 | return obj; |
78 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-xts-plain64-sha1.img qiotest-145-aes-256-xts-plain64-sha1 | 76 | } |
79 | # Read test pattern 0x91 | 77 | |
80 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain64-sha1 | 78 | -void user_creatable_add_dict(QDict *qdict, Error **errp) |
81 | -qemu-io -c read -P 0x91 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha1 | 79 | +void user_creatable_add_dict(QDict *qdict, bool keyval, Error **errp) |
82 | +qemu-io -c read -P 0x91 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha1 | 80 | { |
83 | read 10485760/10485760 bytes at offset 104857600 | 81 | Visitor *v; |
84 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | 82 | Object *obj; |
85 | 83 | @@ -XXX,XX +XXX,XX @@ void user_creatable_add_dict(QDict *qdict, Error **errp) | |
86 | # Read test pattern 0x5e | 84 | } |
87 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain64-sha1 | 85 | qdict_del(qdict, "id"); |
88 | -qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha1 | 86 | |
89 | +qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha1 | 87 | - v = qobject_input_visitor_new(QOBJECT(qdict)); |
90 | read 10485760/10485760 bytes at offset 3298534883328 | 88 | + if (keyval) { |
91 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | 89 | + v = qobject_input_visitor_new_keyval(QOBJECT(qdict)); |
92 | 90 | + } else { | |
93 | @@ -XXX,XX +XXX,XX @@ sudo cryptsetup -q -v luksFormat --cipher twofish-xts-plain64 --key-size 512 --h | 91 | + v = qobject_input_visitor_new(QOBJECT(qdict)); |
94 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-twofish-256-xts-plain64-sha1.img qiotest-145-twofish-256-xts-plain64-sha1 | 92 | + } |
95 | # Write test pattern 0xa7 | 93 | obj = user_creatable_add_type(type, id, qdict, v, errp); |
96 | sudo chown UID:GID /dev/mapper/qiotest-145-twofish-256-xts-plain64-sha1 | 94 | visit_free(v); |
97 | -qemu-io -c write -P 0xa7 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-twofish-256-xts-plain64-sha1 | 95 | object_unref(obj); |
98 | +qemu-io -c write -P 0xa7 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-twofish-256-xts-plain64-sha1 | 96 | diff --git a/qom/qom-qmp-cmds.c b/qom/qom-qmp-cmds.c |
99 | wrote 10485760/10485760 bytes at offset 104857600 | 97 | index XXXXXXX..XXXXXXX 100644 |
100 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | 98 | --- a/qom/qom-qmp-cmds.c |
101 | 99 | +++ b/qom/qom-qmp-cmds.c | |
102 | # Write test pattern 0x13 | 100 | @@ -XXX,XX +XXX,XX @@ void qmp_object_add(QDict *qdict, QObject **ret_data, Error **errp) |
103 | sudo chown UID:GID /dev/mapper/qiotest-145-twofish-256-xts-plain64-sha1 | 101 | qobject_unref(pdict); |
104 | -qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-twofish-256-xts-plain64-sha1 | 102 | } |
105 | +qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-twofish-256-xts-plain64-sha1 | 103 | |
106 | wrote 10485760/10485760 bytes at offset 3298534883328 | 104 | - user_creatable_add_dict(qdict, errp); |
107 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | 105 | + user_creatable_add_dict(qdict, false, errp); |
108 | 106 | } | |
109 | @@ -XXX,XX +XXX,XX @@ wrote 10485760/10485760 bytes at offset 3298534883328 | 107 | |
110 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-twofish-256-xts-plain64-sha1.img qiotest-145-twofish-256-xts-plain64-sha1 | 108 | void qmp_object_del(const char *id, Error **errp) |
111 | # Read test pattern 0x91 | ||
112 | sudo chown UID:GID /dev/mapper/qiotest-145-twofish-256-xts-plain64-sha1 | ||
113 | -qemu-io -c read -P 0x91 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-twofish-256-xts-plain64-sha1 | ||
114 | +qemu-io -c read -P 0x91 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-twofish-256-xts-plain64-sha1 | ||
115 | read 10485760/10485760 bytes at offset 104857600 | ||
116 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
117 | |||
118 | # Read test pattern 0x5e | ||
119 | sudo chown UID:GID /dev/mapper/qiotest-145-twofish-256-xts-plain64-sha1 | ||
120 | -qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-twofish-256-xts-plain64-sha1 | ||
121 | +qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-twofish-256-xts-plain64-sha1 | ||
122 | read 10485760/10485760 bytes at offset 3298534883328 | ||
123 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
124 | |||
125 | @@ -XXX,XX +XXX,XX @@ Formatting 'TEST_DIR/luks-twofish-256-xts-plain64-sha1.img', fmt=luks size=43980 | ||
126 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-twofish-256-xts-plain64-sha1.img qiotest-145-twofish-256-xts-plain64-sha1 | ||
127 | # Write test pattern 0xa7 | ||
128 | sudo chown UID:GID /dev/mapper/qiotest-145-twofish-256-xts-plain64-sha1 | ||
129 | -qemu-io -c write -P 0xa7 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-twofish-256-xts-plain64-sha1 | ||
130 | +qemu-io -c write -P 0xa7 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-twofish-256-xts-plain64-sha1 | ||
131 | wrote 10485760/10485760 bytes at offset 104857600 | ||
132 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
133 | |||
134 | # Write test pattern 0x13 | ||
135 | sudo chown UID:GID /dev/mapper/qiotest-145-twofish-256-xts-plain64-sha1 | ||
136 | -qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-twofish-256-xts-plain64-sha1 | ||
137 | +qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-twofish-256-xts-plain64-sha1 | ||
138 | wrote 10485760/10485760 bytes at offset 3298534883328 | ||
139 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
140 | |||
141 | @@ -XXX,XX +XXX,XX @@ wrote 10485760/10485760 bytes at offset 3298534883328 | ||
142 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-twofish-256-xts-plain64-sha1.img qiotest-145-twofish-256-xts-plain64-sha1 | ||
143 | # Read test pattern 0x91 | ||
144 | sudo chown UID:GID /dev/mapper/qiotest-145-twofish-256-xts-plain64-sha1 | ||
145 | -qemu-io -c read -P 0x91 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-twofish-256-xts-plain64-sha1 | ||
146 | +qemu-io -c read -P 0x91 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-twofish-256-xts-plain64-sha1 | ||
147 | read 10485760/10485760 bytes at offset 104857600 | ||
148 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
149 | |||
150 | # Read test pattern 0x5e | ||
151 | sudo chown UID:GID /dev/mapper/qiotest-145-twofish-256-xts-plain64-sha1 | ||
152 | -qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-twofish-256-xts-plain64-sha1 | ||
153 | +qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-twofish-256-xts-plain64-sha1 | ||
154 | read 10485760/10485760 bytes at offset 3298534883328 | ||
155 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
156 | |||
157 | @@ -XXX,XX +XXX,XX @@ sudo cryptsetup -q -v luksFormat --cipher serpent-xts-plain64 --key-size 512 --h | ||
158 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-serpent-256-xts-plain64-sha1.img qiotest-145-serpent-256-xts-plain64-sha1 | ||
159 | # Write test pattern 0xa7 | ||
160 | sudo chown UID:GID /dev/mapper/qiotest-145-serpent-256-xts-plain64-sha1 | ||
161 | -qemu-io -c write -P 0xa7 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-serpent-256-xts-plain64-sha1 | ||
162 | +qemu-io -c write -P 0xa7 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-serpent-256-xts-plain64-sha1 | ||
163 | wrote 10485760/10485760 bytes at offset 104857600 | ||
164 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
165 | |||
166 | # Write test pattern 0x13 | ||
167 | sudo chown UID:GID /dev/mapper/qiotest-145-serpent-256-xts-plain64-sha1 | ||
168 | -qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-serpent-256-xts-plain64-sha1 | ||
169 | +qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-serpent-256-xts-plain64-sha1 | ||
170 | wrote 10485760/10485760 bytes at offset 3298534883328 | ||
171 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
172 | |||
173 | @@ -XXX,XX +XXX,XX @@ wrote 10485760/10485760 bytes at offset 3298534883328 | ||
174 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-serpent-256-xts-plain64-sha1.img qiotest-145-serpent-256-xts-plain64-sha1 | ||
175 | # Read test pattern 0x91 | ||
176 | sudo chown UID:GID /dev/mapper/qiotest-145-serpent-256-xts-plain64-sha1 | ||
177 | -qemu-io -c read -P 0x91 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-serpent-256-xts-plain64-sha1 | ||
178 | +qemu-io -c read -P 0x91 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-serpent-256-xts-plain64-sha1 | ||
179 | read 10485760/10485760 bytes at offset 104857600 | ||
180 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
181 | |||
182 | # Read test pattern 0x5e | ||
183 | sudo chown UID:GID /dev/mapper/qiotest-145-serpent-256-xts-plain64-sha1 | ||
184 | -qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-serpent-256-xts-plain64-sha1 | ||
185 | +qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-serpent-256-xts-plain64-sha1 | ||
186 | read 10485760/10485760 bytes at offset 3298534883328 | ||
187 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
188 | |||
189 | @@ -XXX,XX +XXX,XX @@ Formatting 'TEST_DIR/luks-serpent-256-xts-plain64-sha1.img', fmt=luks size=43980 | ||
190 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-serpent-256-xts-plain64-sha1.img qiotest-145-serpent-256-xts-plain64-sha1 | ||
191 | # Write test pattern 0xa7 | ||
192 | sudo chown UID:GID /dev/mapper/qiotest-145-serpent-256-xts-plain64-sha1 | ||
193 | -qemu-io -c write -P 0xa7 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-serpent-256-xts-plain64-sha1 | ||
194 | +qemu-io -c write -P 0xa7 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-serpent-256-xts-plain64-sha1 | ||
195 | wrote 10485760/10485760 bytes at offset 104857600 | ||
196 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
197 | |||
198 | # Write test pattern 0x13 | ||
199 | sudo chown UID:GID /dev/mapper/qiotest-145-serpent-256-xts-plain64-sha1 | ||
200 | -qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-serpent-256-xts-plain64-sha1 | ||
201 | +qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-serpent-256-xts-plain64-sha1 | ||
202 | wrote 10485760/10485760 bytes at offset 3298534883328 | ||
203 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
204 | |||
205 | @@ -XXX,XX +XXX,XX @@ wrote 10485760/10485760 bytes at offset 3298534883328 | ||
206 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-serpent-256-xts-plain64-sha1.img qiotest-145-serpent-256-xts-plain64-sha1 | ||
207 | # Read test pattern 0x91 | ||
208 | sudo chown UID:GID /dev/mapper/qiotest-145-serpent-256-xts-plain64-sha1 | ||
209 | -qemu-io -c read -P 0x91 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-serpent-256-xts-plain64-sha1 | ||
210 | +qemu-io -c read -P 0x91 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-serpent-256-xts-plain64-sha1 | ||
211 | read 10485760/10485760 bytes at offset 104857600 | ||
212 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
213 | |||
214 | # Read test pattern 0x5e | ||
215 | sudo chown UID:GID /dev/mapper/qiotest-145-serpent-256-xts-plain64-sha1 | ||
216 | -qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-serpent-256-xts-plain64-sha1 | ||
217 | +qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-serpent-256-xts-plain64-sha1 | ||
218 | read 10485760/10485760 bytes at offset 3298534883328 | ||
219 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
220 | |||
221 | @@ -XXX,XX +XXX,XX @@ sudo cryptsetup -q -v luksFormat --cipher cast5-cbc-plain64 --key-size 128 --has | ||
222 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-cast5-128-cbc-plain64-sha1.img qiotest-145-cast5-128-cbc-plain64-sha1 | ||
223 | # Write test pattern 0xa7 | ||
224 | sudo chown UID:GID /dev/mapper/qiotest-145-cast5-128-cbc-plain64-sha1 | ||
225 | -qemu-io -c write -P 0xa7 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-cast5-128-cbc-plain64-sha1 | ||
226 | +qemu-io -c write -P 0xa7 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-cast5-128-cbc-plain64-sha1 | ||
227 | wrote 10485760/10485760 bytes at offset 104857600 | ||
228 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
229 | |||
230 | # Write test pattern 0x13 | ||
231 | sudo chown UID:GID /dev/mapper/qiotest-145-cast5-128-cbc-plain64-sha1 | ||
232 | -qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-cast5-128-cbc-plain64-sha1 | ||
233 | +qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-cast5-128-cbc-plain64-sha1 | ||
234 | wrote 10485760/10485760 bytes at offset 3298534883328 | ||
235 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
236 | |||
237 | @@ -XXX,XX +XXX,XX @@ wrote 10485760/10485760 bytes at offset 3298534883328 | ||
238 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-cast5-128-cbc-plain64-sha1.img qiotest-145-cast5-128-cbc-plain64-sha1 | ||
239 | # Read test pattern 0x91 | ||
240 | sudo chown UID:GID /dev/mapper/qiotest-145-cast5-128-cbc-plain64-sha1 | ||
241 | -qemu-io -c read -P 0x91 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-cast5-128-cbc-plain64-sha1 | ||
242 | +qemu-io -c read -P 0x91 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-cast5-128-cbc-plain64-sha1 | ||
243 | read 10485760/10485760 bytes at offset 104857600 | ||
244 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
245 | |||
246 | # Read test pattern 0x5e | ||
247 | sudo chown UID:GID /dev/mapper/qiotest-145-cast5-128-cbc-plain64-sha1 | ||
248 | -qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-cast5-128-cbc-plain64-sha1 | ||
249 | +qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-cast5-128-cbc-plain64-sha1 | ||
250 | read 10485760/10485760 bytes at offset 3298534883328 | ||
251 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
252 | |||
253 | @@ -XXX,XX +XXX,XX @@ Formatting 'TEST_DIR/luks-cast5-128-cbc-plain64-sha1.img', fmt=luks size=4398046 | ||
254 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-cast5-128-cbc-plain64-sha1.img qiotest-145-cast5-128-cbc-plain64-sha1 | ||
255 | # Write test pattern 0xa7 | ||
256 | sudo chown UID:GID /dev/mapper/qiotest-145-cast5-128-cbc-plain64-sha1 | ||
257 | -qemu-io -c write -P 0xa7 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-cast5-128-cbc-plain64-sha1 | ||
258 | +qemu-io -c write -P 0xa7 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-cast5-128-cbc-plain64-sha1 | ||
259 | wrote 10485760/10485760 bytes at offset 104857600 | ||
260 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
261 | |||
262 | # Write test pattern 0x13 | ||
263 | sudo chown UID:GID /dev/mapper/qiotest-145-cast5-128-cbc-plain64-sha1 | ||
264 | -qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-cast5-128-cbc-plain64-sha1 | ||
265 | +qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-cast5-128-cbc-plain64-sha1 | ||
266 | wrote 10485760/10485760 bytes at offset 3298534883328 | ||
267 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
268 | |||
269 | @@ -XXX,XX +XXX,XX @@ wrote 10485760/10485760 bytes at offset 3298534883328 | ||
270 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-cast5-128-cbc-plain64-sha1.img qiotest-145-cast5-128-cbc-plain64-sha1 | ||
271 | # Read test pattern 0x91 | ||
272 | sudo chown UID:GID /dev/mapper/qiotest-145-cast5-128-cbc-plain64-sha1 | ||
273 | -qemu-io -c read -P 0x91 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-cast5-128-cbc-plain64-sha1 | ||
274 | +qemu-io -c read -P 0x91 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-cast5-128-cbc-plain64-sha1 | ||
275 | read 10485760/10485760 bytes at offset 104857600 | ||
276 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
277 | |||
278 | # Read test pattern 0x5e | ||
279 | sudo chown UID:GID /dev/mapper/qiotest-145-cast5-128-cbc-plain64-sha1 | ||
280 | -qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-cast5-128-cbc-plain64-sha1 | ||
281 | +qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-cast5-128-cbc-plain64-sha1 | ||
282 | read 10485760/10485760 bytes at offset 3298534883328 | ||
283 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
284 | |||
285 | @@ -XXX,XX +XXX,XX @@ sudo cryptsetup -q -v luksFormat --cipher aes-cbc-plain --key-size 256 --hash sh | ||
286 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-cbc-plain-sha1.img qiotest-145-aes-256-cbc-plain-sha1 | ||
287 | # Write test pattern 0xa7 | ||
288 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-cbc-plain-sha1 | ||
289 | -qemu-io -c write -P 0xa7 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-cbc-plain-sha1 | ||
290 | +qemu-io -c write -P 0xa7 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-cbc-plain-sha1 | ||
291 | wrote 10485760/10485760 bytes at offset 104857600 | ||
292 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
293 | |||
294 | # Write test pattern 0x13 | ||
295 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-cbc-plain-sha1 | ||
296 | -qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-cbc-plain-sha1 | ||
297 | +qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-cbc-plain-sha1 | ||
298 | wrote 10485760/10485760 bytes at offset 3298534883328 | ||
299 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
300 | |||
301 | @@ -XXX,XX +XXX,XX @@ wrote 10485760/10485760 bytes at offset 3298534883328 | ||
302 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-cbc-plain-sha1.img qiotest-145-aes-256-cbc-plain-sha1 | ||
303 | # Read test pattern 0x91 | ||
304 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-cbc-plain-sha1 | ||
305 | -qemu-io -c read -P 0x91 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-cbc-plain-sha1 | ||
306 | +qemu-io -c read -P 0x91 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-cbc-plain-sha1 | ||
307 | read 10485760/10485760 bytes at offset 104857600 | ||
308 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
309 | |||
310 | # Read test pattern 0x5e | ||
311 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-cbc-plain-sha1 | ||
312 | -qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-cbc-plain-sha1 | ||
313 | +qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-cbc-plain-sha1 | ||
314 | read 10485760/10485760 bytes at offset 3298534883328 | ||
315 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
316 | |||
317 | @@ -XXX,XX +XXX,XX @@ Formatting 'TEST_DIR/luks-aes-256-cbc-plain-sha1.img', fmt=luks size=43980465111 | ||
318 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-cbc-plain-sha1.img qiotest-145-aes-256-cbc-plain-sha1 | ||
319 | # Write test pattern 0xa7 | ||
320 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-cbc-plain-sha1 | ||
321 | -qemu-io -c write -P 0xa7 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-cbc-plain-sha1 | ||
322 | +qemu-io -c write -P 0xa7 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-cbc-plain-sha1 | ||
323 | wrote 10485760/10485760 bytes at offset 104857600 | ||
324 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
325 | |||
326 | # Write test pattern 0x13 | ||
327 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-cbc-plain-sha1 | ||
328 | -qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-cbc-plain-sha1 | ||
329 | +qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-cbc-plain-sha1 | ||
330 | wrote 10485760/10485760 bytes at offset 3298534883328 | ||
331 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
332 | |||
333 | @@ -XXX,XX +XXX,XX @@ wrote 10485760/10485760 bytes at offset 3298534883328 | ||
334 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-cbc-plain-sha1.img qiotest-145-aes-256-cbc-plain-sha1 | ||
335 | # Read test pattern 0x91 | ||
336 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-cbc-plain-sha1 | ||
337 | -qemu-io -c read -P 0x91 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-cbc-plain-sha1 | ||
338 | +qemu-io -c read -P 0x91 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-cbc-plain-sha1 | ||
339 | read 10485760/10485760 bytes at offset 104857600 | ||
340 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
341 | |||
342 | # Read test pattern 0x5e | ||
343 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-cbc-plain-sha1 | ||
344 | -qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-cbc-plain-sha1 | ||
345 | +qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-cbc-plain-sha1 | ||
346 | read 10485760/10485760 bytes at offset 3298534883328 | ||
347 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
348 | |||
349 | @@ -XXX,XX +XXX,XX @@ sudo cryptsetup -q -v luksFormat --cipher aes-cbc-plain64 --key-size 256 --hash | ||
350 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-cbc-plain64-sha1.img qiotest-145-aes-256-cbc-plain64-sha1 | ||
351 | # Write test pattern 0xa7 | ||
352 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-cbc-plain64-sha1 | ||
353 | -qemu-io -c write -P 0xa7 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-cbc-plain64-sha1 | ||
354 | +qemu-io -c write -P 0xa7 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-cbc-plain64-sha1 | ||
355 | wrote 10485760/10485760 bytes at offset 104857600 | ||
356 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
357 | |||
358 | # Write test pattern 0x13 | ||
359 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-cbc-plain64-sha1 | ||
360 | -qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-cbc-plain64-sha1 | ||
361 | +qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-cbc-plain64-sha1 | ||
362 | wrote 10485760/10485760 bytes at offset 3298534883328 | ||
363 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
364 | |||
365 | @@ -XXX,XX +XXX,XX @@ wrote 10485760/10485760 bytes at offset 3298534883328 | ||
366 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-cbc-plain64-sha1.img qiotest-145-aes-256-cbc-plain64-sha1 | ||
367 | # Read test pattern 0x91 | ||
368 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-cbc-plain64-sha1 | ||
369 | -qemu-io -c read -P 0x91 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-cbc-plain64-sha1 | ||
370 | +qemu-io -c read -P 0x91 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-cbc-plain64-sha1 | ||
371 | read 10485760/10485760 bytes at offset 104857600 | ||
372 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
373 | |||
374 | # Read test pattern 0x5e | ||
375 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-cbc-plain64-sha1 | ||
376 | -qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-cbc-plain64-sha1 | ||
377 | +qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-cbc-plain64-sha1 | ||
378 | read 10485760/10485760 bytes at offset 3298534883328 | ||
379 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
380 | |||
381 | @@ -XXX,XX +XXX,XX @@ Formatting 'TEST_DIR/luks-aes-256-cbc-plain64-sha1.img', fmt=luks size=439804651 | ||
382 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-cbc-plain64-sha1.img qiotest-145-aes-256-cbc-plain64-sha1 | ||
383 | # Write test pattern 0xa7 | ||
384 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-cbc-plain64-sha1 | ||
385 | -qemu-io -c write -P 0xa7 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-cbc-plain64-sha1 | ||
386 | +qemu-io -c write -P 0xa7 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-cbc-plain64-sha1 | ||
387 | wrote 10485760/10485760 bytes at offset 104857600 | ||
388 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
389 | |||
390 | # Write test pattern 0x13 | ||
391 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-cbc-plain64-sha1 | ||
392 | -qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-cbc-plain64-sha1 | ||
393 | +qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-cbc-plain64-sha1 | ||
394 | wrote 10485760/10485760 bytes at offset 3298534883328 | ||
395 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
396 | |||
397 | @@ -XXX,XX +XXX,XX @@ wrote 10485760/10485760 bytes at offset 3298534883328 | ||
398 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-cbc-plain64-sha1.img qiotest-145-aes-256-cbc-plain64-sha1 | ||
399 | # Read test pattern 0x91 | ||
400 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-cbc-plain64-sha1 | ||
401 | -qemu-io -c read -P 0x91 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-cbc-plain64-sha1 | ||
402 | +qemu-io -c read -P 0x91 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-cbc-plain64-sha1 | ||
403 | read 10485760/10485760 bytes at offset 104857600 | ||
404 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
405 | |||
406 | # Read test pattern 0x5e | ||
407 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-cbc-plain64-sha1 | ||
408 | -qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-cbc-plain64-sha1 | ||
409 | +qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-cbc-plain64-sha1 | ||
410 | read 10485760/10485760 bytes at offset 3298534883328 | ||
411 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
412 | |||
413 | @@ -XXX,XX +XXX,XX @@ sudo cryptsetup -q -v luksFormat --cipher aes-cbc-essiv:sha256 --key-size 256 -- | ||
414 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-cbc-essiv-sha256-sha1.img qiotest-145-aes-256-cbc-essiv-sha256-sha1 | ||
415 | # Write test pattern 0xa7 | ||
416 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-cbc-essiv-sha256-sha1 | ||
417 | -qemu-io -c write -P 0xa7 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-cbc-essiv-sha256-sha1 | ||
418 | +qemu-io -c write -P 0xa7 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-cbc-essiv-sha256-sha1 | ||
419 | wrote 10485760/10485760 bytes at offset 104857600 | ||
420 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
421 | |||
422 | # Write test pattern 0x13 | ||
423 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-cbc-essiv-sha256-sha1 | ||
424 | -qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-cbc-essiv-sha256-sha1 | ||
425 | +qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-cbc-essiv-sha256-sha1 | ||
426 | wrote 10485760/10485760 bytes at offset 3298534883328 | ||
427 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
428 | |||
429 | @@ -XXX,XX +XXX,XX @@ wrote 10485760/10485760 bytes at offset 3298534883328 | ||
430 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-cbc-essiv-sha256-sha1.img qiotest-145-aes-256-cbc-essiv-sha256-sha1 | ||
431 | # Read test pattern 0x91 | ||
432 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-cbc-essiv-sha256-sha1 | ||
433 | -qemu-io -c read -P 0x91 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-cbc-essiv-sha256-sha1 | ||
434 | +qemu-io -c read -P 0x91 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-cbc-essiv-sha256-sha1 | ||
435 | read 10485760/10485760 bytes at offset 104857600 | ||
436 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
437 | |||
438 | # Read test pattern 0x5e | ||
439 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-cbc-essiv-sha256-sha1 | ||
440 | -qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-cbc-essiv-sha256-sha1 | ||
441 | +qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-cbc-essiv-sha256-sha1 | ||
442 | read 10485760/10485760 bytes at offset 3298534883328 | ||
443 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
444 | |||
445 | @@ -XXX,XX +XXX,XX @@ Formatting 'TEST_DIR/luks-aes-256-cbc-essiv-sha256-sha1.img', fmt=luks size=4398 | ||
446 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-cbc-essiv-sha256-sha1.img qiotest-145-aes-256-cbc-essiv-sha256-sha1 | ||
447 | # Write test pattern 0xa7 | ||
448 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-cbc-essiv-sha256-sha1 | ||
449 | -qemu-io -c write -P 0xa7 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-cbc-essiv-sha256-sha1 | ||
450 | +qemu-io -c write -P 0xa7 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-cbc-essiv-sha256-sha1 | ||
451 | wrote 10485760/10485760 bytes at offset 104857600 | ||
452 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
453 | |||
454 | # Write test pattern 0x13 | ||
455 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-cbc-essiv-sha256-sha1 | ||
456 | -qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-cbc-essiv-sha256-sha1 | ||
457 | +qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-cbc-essiv-sha256-sha1 | ||
458 | wrote 10485760/10485760 bytes at offset 3298534883328 | ||
459 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
460 | |||
461 | @@ -XXX,XX +XXX,XX @@ wrote 10485760/10485760 bytes at offset 3298534883328 | ||
462 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-cbc-essiv-sha256-sha1.img qiotest-145-aes-256-cbc-essiv-sha256-sha1 | ||
463 | # Read test pattern 0x91 | ||
464 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-cbc-essiv-sha256-sha1 | ||
465 | -qemu-io -c read -P 0x91 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-cbc-essiv-sha256-sha1 | ||
466 | +qemu-io -c read -P 0x91 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-cbc-essiv-sha256-sha1 | ||
467 | read 10485760/10485760 bytes at offset 104857600 | ||
468 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
469 | |||
470 | # Read test pattern 0x5e | ||
471 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-cbc-essiv-sha256-sha1 | ||
472 | -qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-cbc-essiv-sha256-sha1 | ||
473 | +qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-cbc-essiv-sha256-sha1 | ||
474 | read 10485760/10485760 bytes at offset 3298534883328 | ||
475 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
476 | |||
477 | @@ -XXX,XX +XXX,XX @@ sudo cryptsetup -q -v luksFormat --cipher aes-xts-essiv:sha256 --key-size 512 -- | ||
478 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-xts-essiv-sha256-sha1.img qiotest-145-aes-256-xts-essiv-sha256-sha1 | ||
479 | # Write test pattern 0xa7 | ||
480 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-essiv-sha256-sha1 | ||
481 | -qemu-io -c write -P 0xa7 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-essiv-sha256-sha1 | ||
482 | +qemu-io -c write -P 0xa7 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-essiv-sha256-sha1 | ||
483 | wrote 10485760/10485760 bytes at offset 104857600 | ||
484 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
485 | |||
486 | # Write test pattern 0x13 | ||
487 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-essiv-sha256-sha1 | ||
488 | -qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-essiv-sha256-sha1 | ||
489 | +qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-essiv-sha256-sha1 | ||
490 | wrote 10485760/10485760 bytes at offset 3298534883328 | ||
491 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
492 | |||
493 | @@ -XXX,XX +XXX,XX @@ wrote 10485760/10485760 bytes at offset 3298534883328 | ||
494 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-xts-essiv-sha256-sha1.img qiotest-145-aes-256-xts-essiv-sha256-sha1 | ||
495 | # Read test pattern 0x91 | ||
496 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-essiv-sha256-sha1 | ||
497 | -qemu-io -c read -P 0x91 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-essiv-sha256-sha1 | ||
498 | +qemu-io -c read -P 0x91 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-essiv-sha256-sha1 | ||
499 | read 10485760/10485760 bytes at offset 104857600 | ||
500 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
501 | |||
502 | # Read test pattern 0x5e | ||
503 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-essiv-sha256-sha1 | ||
504 | -qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-essiv-sha256-sha1 | ||
505 | +qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-essiv-sha256-sha1 | ||
506 | read 10485760/10485760 bytes at offset 3298534883328 | ||
507 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
508 | |||
509 | @@ -XXX,XX +XXX,XX @@ Formatting 'TEST_DIR/luks-aes-256-xts-essiv-sha256-sha1.img', fmt=luks size=4398 | ||
510 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-xts-essiv-sha256-sha1.img qiotest-145-aes-256-xts-essiv-sha256-sha1 | ||
511 | # Write test pattern 0xa7 | ||
512 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-essiv-sha256-sha1 | ||
513 | -qemu-io -c write -P 0xa7 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-essiv-sha256-sha1 | ||
514 | +qemu-io -c write -P 0xa7 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-essiv-sha256-sha1 | ||
515 | wrote 10485760/10485760 bytes at offset 104857600 | ||
516 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
517 | |||
518 | # Write test pattern 0x13 | ||
519 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-essiv-sha256-sha1 | ||
520 | -qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-essiv-sha256-sha1 | ||
521 | +qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-essiv-sha256-sha1 | ||
522 | wrote 10485760/10485760 bytes at offset 3298534883328 | ||
523 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
524 | |||
525 | @@ -XXX,XX +XXX,XX @@ wrote 10485760/10485760 bytes at offset 3298534883328 | ||
526 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-xts-essiv-sha256-sha1.img qiotest-145-aes-256-xts-essiv-sha256-sha1 | ||
527 | # Read test pattern 0x91 | ||
528 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-essiv-sha256-sha1 | ||
529 | -qemu-io -c read -P 0x91 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-essiv-sha256-sha1 | ||
530 | +qemu-io -c read -P 0x91 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-essiv-sha256-sha1 | ||
531 | read 10485760/10485760 bytes at offset 104857600 | ||
532 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
533 | |||
534 | # Read test pattern 0x5e | ||
535 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-essiv-sha256-sha1 | ||
536 | -qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-essiv-sha256-sha1 | ||
537 | +qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-essiv-sha256-sha1 | ||
538 | read 10485760/10485760 bytes at offset 3298534883328 | ||
539 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
540 | |||
541 | @@ -XXX,XX +XXX,XX @@ sudo cryptsetup -q -v luksFormat --cipher aes-xts-plain64 --key-size 256 --hash | ||
542 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-128-xts-plain64-sha256-sha1.img qiotest-145-aes-128-xts-plain64-sha256-sha1 | ||
543 | # Write test pattern 0xa7 | ||
544 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-128-xts-plain64-sha256-sha1 | ||
545 | -qemu-io -c write -P 0xa7 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-128-xts-plain64-sha256-sha1 | ||
546 | +qemu-io -c write -P 0xa7 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-128-xts-plain64-sha256-sha1 | ||
547 | wrote 10485760/10485760 bytes at offset 104857600 | ||
548 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
549 | |||
550 | # Write test pattern 0x13 | ||
551 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-128-xts-plain64-sha256-sha1 | ||
552 | -qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-128-xts-plain64-sha256-sha1 | ||
553 | +qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-128-xts-plain64-sha256-sha1 | ||
554 | wrote 10485760/10485760 bytes at offset 3298534883328 | ||
555 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
556 | |||
557 | @@ -XXX,XX +XXX,XX @@ wrote 10485760/10485760 bytes at offset 3298534883328 | ||
558 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-128-xts-plain64-sha256-sha1.img qiotest-145-aes-128-xts-plain64-sha256-sha1 | ||
559 | # Read test pattern 0x91 | ||
560 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-128-xts-plain64-sha256-sha1 | ||
561 | -qemu-io -c read -P 0x91 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-128-xts-plain64-sha256-sha1 | ||
562 | +qemu-io -c read -P 0x91 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-128-xts-plain64-sha256-sha1 | ||
563 | read 10485760/10485760 bytes at offset 104857600 | ||
564 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
565 | |||
566 | # Read test pattern 0x5e | ||
567 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-128-xts-plain64-sha256-sha1 | ||
568 | -qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-128-xts-plain64-sha256-sha1 | ||
569 | +qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-128-xts-plain64-sha256-sha1 | ||
570 | read 10485760/10485760 bytes at offset 3298534883328 | ||
571 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
572 | |||
573 | @@ -XXX,XX +XXX,XX @@ Formatting 'TEST_DIR/luks-aes-128-xts-plain64-sha256-sha1.img', fmt=luks size=43 | ||
574 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-128-xts-plain64-sha256-sha1.img qiotest-145-aes-128-xts-plain64-sha256-sha1 | ||
575 | # Write test pattern 0xa7 | ||
576 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-128-xts-plain64-sha256-sha1 | ||
577 | -qemu-io -c write -P 0xa7 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-128-xts-plain64-sha256-sha1 | ||
578 | +qemu-io -c write -P 0xa7 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-128-xts-plain64-sha256-sha1 | ||
579 | wrote 10485760/10485760 bytes at offset 104857600 | ||
580 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
581 | |||
582 | # Write test pattern 0x13 | ||
583 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-128-xts-plain64-sha256-sha1 | ||
584 | -qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-128-xts-plain64-sha256-sha1 | ||
585 | +qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-128-xts-plain64-sha256-sha1 | ||
586 | wrote 10485760/10485760 bytes at offset 3298534883328 | ||
587 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
588 | |||
589 | @@ -XXX,XX +XXX,XX @@ wrote 10485760/10485760 bytes at offset 3298534883328 | ||
590 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-128-xts-plain64-sha256-sha1.img qiotest-145-aes-128-xts-plain64-sha256-sha1 | ||
591 | # Read test pattern 0x91 | ||
592 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-128-xts-plain64-sha256-sha1 | ||
593 | -qemu-io -c read -P 0x91 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-128-xts-plain64-sha256-sha1 | ||
594 | +qemu-io -c read -P 0x91 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-128-xts-plain64-sha256-sha1 | ||
595 | read 10485760/10485760 bytes at offset 104857600 | ||
596 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
597 | |||
598 | # Read test pattern 0x5e | ||
599 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-128-xts-plain64-sha256-sha1 | ||
600 | -qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-128-xts-plain64-sha256-sha1 | ||
601 | +qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-128-xts-plain64-sha256-sha1 | ||
602 | read 10485760/10485760 bytes at offset 3298534883328 | ||
603 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
604 | |||
605 | @@ -XXX,XX +XXX,XX @@ sudo cryptsetup -q -v luksFormat --cipher aes-xts-plain64 --key-size 384 --hash | ||
606 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-192-xts-plain64-sha256-sha1.img qiotest-145-aes-192-xts-plain64-sha256-sha1 | ||
607 | # Write test pattern 0xa7 | ||
608 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-192-xts-plain64-sha256-sha1 | ||
609 | -qemu-io -c write -P 0xa7 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-192-xts-plain64-sha256-sha1 | ||
610 | +qemu-io -c write -P 0xa7 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-192-xts-plain64-sha256-sha1 | ||
611 | wrote 10485760/10485760 bytes at offset 104857600 | ||
612 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
613 | |||
614 | # Write test pattern 0x13 | ||
615 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-192-xts-plain64-sha256-sha1 | ||
616 | -qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-192-xts-plain64-sha256-sha1 | ||
617 | +qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-192-xts-plain64-sha256-sha1 | ||
618 | wrote 10485760/10485760 bytes at offset 3298534883328 | ||
619 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
620 | |||
621 | @@ -XXX,XX +XXX,XX @@ wrote 10485760/10485760 bytes at offset 3298534883328 | ||
622 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-192-xts-plain64-sha256-sha1.img qiotest-145-aes-192-xts-plain64-sha256-sha1 | ||
623 | # Read test pattern 0x91 | ||
624 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-192-xts-plain64-sha256-sha1 | ||
625 | -qemu-io -c read -P 0x91 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-192-xts-plain64-sha256-sha1 | ||
626 | +qemu-io -c read -P 0x91 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-192-xts-plain64-sha256-sha1 | ||
627 | read 10485760/10485760 bytes at offset 104857600 | ||
628 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
629 | |||
630 | # Read test pattern 0x5e | ||
631 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-192-xts-plain64-sha256-sha1 | ||
632 | -qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-192-xts-plain64-sha256-sha1 | ||
633 | +qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-192-xts-plain64-sha256-sha1 | ||
634 | read 10485760/10485760 bytes at offset 3298534883328 | ||
635 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
636 | |||
637 | @@ -XXX,XX +XXX,XX @@ Formatting 'TEST_DIR/luks-aes-192-xts-plain64-sha256-sha1.img', fmt=luks size=43 | ||
638 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-192-xts-plain64-sha256-sha1.img qiotest-145-aes-192-xts-plain64-sha256-sha1 | ||
639 | # Write test pattern 0xa7 | ||
640 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-192-xts-plain64-sha256-sha1 | ||
641 | -qemu-io -c write -P 0xa7 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-192-xts-plain64-sha256-sha1 | ||
642 | +qemu-io -c write -P 0xa7 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-192-xts-plain64-sha256-sha1 | ||
643 | wrote 10485760/10485760 bytes at offset 104857600 | ||
644 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
645 | |||
646 | # Write test pattern 0x13 | ||
647 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-192-xts-plain64-sha256-sha1 | ||
648 | -qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-192-xts-plain64-sha256-sha1 | ||
649 | +qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-192-xts-plain64-sha256-sha1 | ||
650 | wrote 10485760/10485760 bytes at offset 3298534883328 | ||
651 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
652 | |||
653 | @@ -XXX,XX +XXX,XX @@ wrote 10485760/10485760 bytes at offset 3298534883328 | ||
654 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-192-xts-plain64-sha256-sha1.img qiotest-145-aes-192-xts-plain64-sha256-sha1 | ||
655 | # Read test pattern 0x91 | ||
656 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-192-xts-plain64-sha256-sha1 | ||
657 | -qemu-io -c read -P 0x91 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-192-xts-plain64-sha256-sha1 | ||
658 | +qemu-io -c read -P 0x91 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-192-xts-plain64-sha256-sha1 | ||
659 | read 10485760/10485760 bytes at offset 104857600 | ||
660 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
661 | |||
662 | # Read test pattern 0x5e | ||
663 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-192-xts-plain64-sha256-sha1 | ||
664 | -qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-192-xts-plain64-sha256-sha1 | ||
665 | +qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-192-xts-plain64-sha256-sha1 | ||
666 | read 10485760/10485760 bytes at offset 3298534883328 | ||
667 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
668 | |||
669 | @@ -XXX,XX +XXX,XX @@ sudo cryptsetup -q -v luksFormat --cipher twofish-xts-plain64 --key-size 256 --h | ||
670 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-twofish-128-xts-plain64-sha1.img qiotest-145-twofish-128-xts-plain64-sha1 | ||
671 | # Write test pattern 0xa7 | ||
672 | sudo chown UID:GID /dev/mapper/qiotest-145-twofish-128-xts-plain64-sha1 | ||
673 | -qemu-io -c write -P 0xa7 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-twofish-128-xts-plain64-sha1 | ||
674 | +qemu-io -c write -P 0xa7 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-twofish-128-xts-plain64-sha1 | ||
675 | wrote 10485760/10485760 bytes at offset 104857600 | ||
676 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
677 | |||
678 | # Write test pattern 0x13 | ||
679 | sudo chown UID:GID /dev/mapper/qiotest-145-twofish-128-xts-plain64-sha1 | ||
680 | -qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-twofish-128-xts-plain64-sha1 | ||
681 | +qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-twofish-128-xts-plain64-sha1 | ||
682 | wrote 10485760/10485760 bytes at offset 3298534883328 | ||
683 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
684 | |||
685 | @@ -XXX,XX +XXX,XX @@ wrote 10485760/10485760 bytes at offset 3298534883328 | ||
686 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-twofish-128-xts-plain64-sha1.img qiotest-145-twofish-128-xts-plain64-sha1 | ||
687 | # Read test pattern 0x91 | ||
688 | sudo chown UID:GID /dev/mapper/qiotest-145-twofish-128-xts-plain64-sha1 | ||
689 | -qemu-io -c read -P 0x91 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-twofish-128-xts-plain64-sha1 | ||
690 | +qemu-io -c read -P 0x91 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-twofish-128-xts-plain64-sha1 | ||
691 | read 10485760/10485760 bytes at offset 104857600 | ||
692 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
693 | |||
694 | # Read test pattern 0x5e | ||
695 | sudo chown UID:GID /dev/mapper/qiotest-145-twofish-128-xts-plain64-sha1 | ||
696 | -qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-twofish-128-xts-plain64-sha1 | ||
697 | +qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-twofish-128-xts-plain64-sha1 | ||
698 | read 10485760/10485760 bytes at offset 3298534883328 | ||
699 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
700 | |||
701 | @@ -XXX,XX +XXX,XX @@ Formatting 'TEST_DIR/luks-twofish-128-xts-plain64-sha1.img', fmt=luks size=43980 | ||
702 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-twofish-128-xts-plain64-sha1.img qiotest-145-twofish-128-xts-plain64-sha1 | ||
703 | # Write test pattern 0xa7 | ||
704 | sudo chown UID:GID /dev/mapper/qiotest-145-twofish-128-xts-plain64-sha1 | ||
705 | -qemu-io -c write -P 0xa7 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-twofish-128-xts-plain64-sha1 | ||
706 | +qemu-io -c write -P 0xa7 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-twofish-128-xts-plain64-sha1 | ||
707 | wrote 10485760/10485760 bytes at offset 104857600 | ||
708 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
709 | |||
710 | # Write test pattern 0x13 | ||
711 | sudo chown UID:GID /dev/mapper/qiotest-145-twofish-128-xts-plain64-sha1 | ||
712 | -qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-twofish-128-xts-plain64-sha1 | ||
713 | +qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-twofish-128-xts-plain64-sha1 | ||
714 | wrote 10485760/10485760 bytes at offset 3298534883328 | ||
715 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
716 | |||
717 | @@ -XXX,XX +XXX,XX @@ wrote 10485760/10485760 bytes at offset 3298534883328 | ||
718 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-twofish-128-xts-plain64-sha1.img qiotest-145-twofish-128-xts-plain64-sha1 | ||
719 | # Read test pattern 0x91 | ||
720 | sudo chown UID:GID /dev/mapper/qiotest-145-twofish-128-xts-plain64-sha1 | ||
721 | -qemu-io -c read -P 0x91 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-twofish-128-xts-plain64-sha1 | ||
722 | +qemu-io -c read -P 0x91 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-twofish-128-xts-plain64-sha1 | ||
723 | read 10485760/10485760 bytes at offset 104857600 | ||
724 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
725 | |||
726 | # Read test pattern 0x5e | ||
727 | sudo chown UID:GID /dev/mapper/qiotest-145-twofish-128-xts-plain64-sha1 | ||
728 | -qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-twofish-128-xts-plain64-sha1 | ||
729 | +qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-twofish-128-xts-plain64-sha1 | ||
730 | read 10485760/10485760 bytes at offset 3298534883328 | ||
731 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
732 | |||
733 | @@ -XXX,XX +XXX,XX @@ sudo cryptsetup -q -v luksFormat --cipher serpent-xts-plain64 --key-size 256 --h | ||
734 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-serpent-128-xts-plain64-sha1.img qiotest-145-serpent-128-xts-plain64-sha1 | ||
735 | # Write test pattern 0xa7 | ||
736 | sudo chown UID:GID /dev/mapper/qiotest-145-serpent-128-xts-plain64-sha1 | ||
737 | -qemu-io -c write -P 0xa7 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-serpent-128-xts-plain64-sha1 | ||
738 | +qemu-io -c write -P 0xa7 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-serpent-128-xts-plain64-sha1 | ||
739 | wrote 10485760/10485760 bytes at offset 104857600 | ||
740 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
741 | |||
742 | # Write test pattern 0x13 | ||
743 | sudo chown UID:GID /dev/mapper/qiotest-145-serpent-128-xts-plain64-sha1 | ||
744 | -qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-serpent-128-xts-plain64-sha1 | ||
745 | +qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-serpent-128-xts-plain64-sha1 | ||
746 | wrote 10485760/10485760 bytes at offset 3298534883328 | ||
747 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
748 | |||
749 | @@ -XXX,XX +XXX,XX @@ wrote 10485760/10485760 bytes at offset 3298534883328 | ||
750 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-serpent-128-xts-plain64-sha1.img qiotest-145-serpent-128-xts-plain64-sha1 | ||
751 | # Read test pattern 0x91 | ||
752 | sudo chown UID:GID /dev/mapper/qiotest-145-serpent-128-xts-plain64-sha1 | ||
753 | -qemu-io -c read -P 0x91 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-serpent-128-xts-plain64-sha1 | ||
754 | +qemu-io -c read -P 0x91 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-serpent-128-xts-plain64-sha1 | ||
755 | read 10485760/10485760 bytes at offset 104857600 | ||
756 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
757 | |||
758 | # Read test pattern 0x5e | ||
759 | sudo chown UID:GID /dev/mapper/qiotest-145-serpent-128-xts-plain64-sha1 | ||
760 | -qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-serpent-128-xts-plain64-sha1 | ||
761 | +qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-serpent-128-xts-plain64-sha1 | ||
762 | read 10485760/10485760 bytes at offset 3298534883328 | ||
763 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
764 | |||
765 | @@ -XXX,XX +XXX,XX @@ Formatting 'TEST_DIR/luks-serpent-128-xts-plain64-sha1.img', fmt=luks size=43980 | ||
766 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-serpent-128-xts-plain64-sha1.img qiotest-145-serpent-128-xts-plain64-sha1 | ||
767 | # Write test pattern 0xa7 | ||
768 | sudo chown UID:GID /dev/mapper/qiotest-145-serpent-128-xts-plain64-sha1 | ||
769 | -qemu-io -c write -P 0xa7 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-serpent-128-xts-plain64-sha1 | ||
770 | +qemu-io -c write -P 0xa7 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-serpent-128-xts-plain64-sha1 | ||
771 | wrote 10485760/10485760 bytes at offset 104857600 | ||
772 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
773 | |||
774 | # Write test pattern 0x13 | ||
775 | sudo chown UID:GID /dev/mapper/qiotest-145-serpent-128-xts-plain64-sha1 | ||
776 | -qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-serpent-128-xts-plain64-sha1 | ||
777 | +qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-serpent-128-xts-plain64-sha1 | ||
778 | wrote 10485760/10485760 bytes at offset 3298534883328 | ||
779 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
780 | |||
781 | @@ -XXX,XX +XXX,XX @@ wrote 10485760/10485760 bytes at offset 3298534883328 | ||
782 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-serpent-128-xts-plain64-sha1.img qiotest-145-serpent-128-xts-plain64-sha1 | ||
783 | # Read test pattern 0x91 | ||
784 | sudo chown UID:GID /dev/mapper/qiotest-145-serpent-128-xts-plain64-sha1 | ||
785 | -qemu-io -c read -P 0x91 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-serpent-128-xts-plain64-sha1 | ||
786 | +qemu-io -c read -P 0x91 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-serpent-128-xts-plain64-sha1 | ||
787 | read 10485760/10485760 bytes at offset 104857600 | ||
788 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
789 | |||
790 | # Read test pattern 0x5e | ||
791 | sudo chown UID:GID /dev/mapper/qiotest-145-serpent-128-xts-plain64-sha1 | ||
792 | -qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-serpent-128-xts-plain64-sha1 | ||
793 | +qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-serpent-128-xts-plain64-sha1 | ||
794 | read 10485760/10485760 bytes at offset 3298534883328 | ||
795 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
796 | |||
797 | @@ -XXX,XX +XXX,XX @@ sudo cryptsetup -q -v luksFormat --cipher serpent-xts-plain64 --key-size 384 --h | ||
798 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-serpent-192-xts-plain64-sha1.img qiotest-145-serpent-192-xts-plain64-sha1 | ||
799 | # Write test pattern 0xa7 | ||
800 | sudo chown UID:GID /dev/mapper/qiotest-145-serpent-192-xts-plain64-sha1 | ||
801 | -qemu-io -c write -P 0xa7 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-serpent-192-xts-plain64-sha1 | ||
802 | +qemu-io -c write -P 0xa7 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-serpent-192-xts-plain64-sha1 | ||
803 | wrote 10485760/10485760 bytes at offset 104857600 | ||
804 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
805 | |||
806 | # Write test pattern 0x13 | ||
807 | sudo chown UID:GID /dev/mapper/qiotest-145-serpent-192-xts-plain64-sha1 | ||
808 | -qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-serpent-192-xts-plain64-sha1 | ||
809 | +qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-serpent-192-xts-plain64-sha1 | ||
810 | wrote 10485760/10485760 bytes at offset 3298534883328 | ||
811 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
812 | |||
813 | @@ -XXX,XX +XXX,XX @@ wrote 10485760/10485760 bytes at offset 3298534883328 | ||
814 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-serpent-192-xts-plain64-sha1.img qiotest-145-serpent-192-xts-plain64-sha1 | ||
815 | # Read test pattern 0x91 | ||
816 | sudo chown UID:GID /dev/mapper/qiotest-145-serpent-192-xts-plain64-sha1 | ||
817 | -qemu-io -c read -P 0x91 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-serpent-192-xts-plain64-sha1 | ||
818 | +qemu-io -c read -P 0x91 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-serpent-192-xts-plain64-sha1 | ||
819 | read 10485760/10485760 bytes at offset 104857600 | ||
820 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
821 | |||
822 | # Read test pattern 0x5e | ||
823 | sudo chown UID:GID /dev/mapper/qiotest-145-serpent-192-xts-plain64-sha1 | ||
824 | -qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-serpent-192-xts-plain64-sha1 | ||
825 | +qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-serpent-192-xts-plain64-sha1 | ||
826 | read 10485760/10485760 bytes at offset 3298534883328 | ||
827 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
828 | |||
829 | @@ -XXX,XX +XXX,XX @@ Formatting 'TEST_DIR/luks-serpent-192-xts-plain64-sha1.img', fmt=luks size=43980 | ||
830 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-serpent-192-xts-plain64-sha1.img qiotest-145-serpent-192-xts-plain64-sha1 | ||
831 | # Write test pattern 0xa7 | ||
832 | sudo chown UID:GID /dev/mapper/qiotest-145-serpent-192-xts-plain64-sha1 | ||
833 | -qemu-io -c write -P 0xa7 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-serpent-192-xts-plain64-sha1 | ||
834 | +qemu-io -c write -P 0xa7 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-serpent-192-xts-plain64-sha1 | ||
835 | wrote 10485760/10485760 bytes at offset 104857600 | ||
836 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
837 | |||
838 | # Write test pattern 0x13 | ||
839 | sudo chown UID:GID /dev/mapper/qiotest-145-serpent-192-xts-plain64-sha1 | ||
840 | -qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-serpent-192-xts-plain64-sha1 | ||
841 | +qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-serpent-192-xts-plain64-sha1 | ||
842 | wrote 10485760/10485760 bytes at offset 3298534883328 | ||
843 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
844 | |||
845 | @@ -XXX,XX +XXX,XX @@ wrote 10485760/10485760 bytes at offset 3298534883328 | ||
846 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-serpent-192-xts-plain64-sha1.img qiotest-145-serpent-192-xts-plain64-sha1 | ||
847 | # Read test pattern 0x91 | ||
848 | sudo chown UID:GID /dev/mapper/qiotest-145-serpent-192-xts-plain64-sha1 | ||
849 | -qemu-io -c read -P 0x91 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-serpent-192-xts-plain64-sha1 | ||
850 | +qemu-io -c read -P 0x91 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-serpent-192-xts-plain64-sha1 | ||
851 | read 10485760/10485760 bytes at offset 104857600 | ||
852 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
853 | |||
854 | # Read test pattern 0x5e | ||
855 | sudo chown UID:GID /dev/mapper/qiotest-145-serpent-192-xts-plain64-sha1 | ||
856 | -qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-serpent-192-xts-plain64-sha1 | ||
857 | +qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-serpent-192-xts-plain64-sha1 | ||
858 | read 10485760/10485760 bytes at offset 3298534883328 | ||
859 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
860 | |||
861 | @@ -XXX,XX +XXX,XX @@ sudo cryptsetup -q -v luksFormat --cipher aes-xts-plain64 --key-size 512 --hash | ||
862 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-xts-plain64-sha224.img qiotest-145-aes-256-xts-plain64-sha224 | ||
863 | # Write test pattern 0xa7 | ||
864 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain64-sha224 | ||
865 | -qemu-io -c write -P 0xa7 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha224 | ||
866 | +qemu-io -c write -P 0xa7 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha224 | ||
867 | wrote 10485760/10485760 bytes at offset 104857600 | ||
868 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
869 | |||
870 | # Write test pattern 0x13 | ||
871 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain64-sha224 | ||
872 | -qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha224 | ||
873 | +qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha224 | ||
874 | wrote 10485760/10485760 bytes at offset 3298534883328 | ||
875 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
876 | |||
877 | @@ -XXX,XX +XXX,XX @@ wrote 10485760/10485760 bytes at offset 3298534883328 | ||
878 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-xts-plain64-sha224.img qiotest-145-aes-256-xts-plain64-sha224 | ||
879 | # Read test pattern 0x91 | ||
880 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain64-sha224 | ||
881 | -qemu-io -c read -P 0x91 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha224 | ||
882 | +qemu-io -c read -P 0x91 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha224 | ||
883 | read 10485760/10485760 bytes at offset 104857600 | ||
884 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
885 | |||
886 | # Read test pattern 0x5e | ||
887 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain64-sha224 | ||
888 | -qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha224 | ||
889 | +qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha224 | ||
890 | read 10485760/10485760 bytes at offset 3298534883328 | ||
891 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
892 | |||
893 | @@ -XXX,XX +XXX,XX @@ Formatting 'TEST_DIR/luks-aes-256-xts-plain64-sha224.img', fmt=luks size=4398046 | ||
894 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-xts-plain64-sha224.img qiotest-145-aes-256-xts-plain64-sha224 | ||
895 | # Write test pattern 0xa7 | ||
896 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain64-sha224 | ||
897 | -qemu-io -c write -P 0xa7 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha224 | ||
898 | +qemu-io -c write -P 0xa7 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha224 | ||
899 | wrote 10485760/10485760 bytes at offset 104857600 | ||
900 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
901 | |||
902 | # Write test pattern 0x13 | ||
903 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain64-sha224 | ||
904 | -qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha224 | ||
905 | +qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha224 | ||
906 | wrote 10485760/10485760 bytes at offset 3298534883328 | ||
907 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
908 | |||
909 | @@ -XXX,XX +XXX,XX @@ wrote 10485760/10485760 bytes at offset 3298534883328 | ||
910 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-xts-plain64-sha224.img qiotest-145-aes-256-xts-plain64-sha224 | ||
911 | # Read test pattern 0x91 | ||
912 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain64-sha224 | ||
913 | -qemu-io -c read -P 0x91 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha224 | ||
914 | +qemu-io -c read -P 0x91 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha224 | ||
915 | read 10485760/10485760 bytes at offset 104857600 | ||
916 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
917 | |||
918 | # Read test pattern 0x5e | ||
919 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain64-sha224 | ||
920 | -qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha224 | ||
921 | +qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha224 | ||
922 | read 10485760/10485760 bytes at offset 3298534883328 | ||
923 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
924 | |||
925 | @@ -XXX,XX +XXX,XX @@ sudo cryptsetup -q -v luksFormat --cipher aes-xts-plain64 --key-size 512 --hash | ||
926 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-xts-plain64-sha256.img qiotest-145-aes-256-xts-plain64-sha256 | ||
927 | # Write test pattern 0xa7 | ||
928 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain64-sha256 | ||
929 | -qemu-io -c write -P 0xa7 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha256 | ||
930 | +qemu-io -c write -P 0xa7 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha256 | ||
931 | wrote 10485760/10485760 bytes at offset 104857600 | ||
932 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
933 | |||
934 | # Write test pattern 0x13 | ||
935 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain64-sha256 | ||
936 | -qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha256 | ||
937 | +qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha256 | ||
938 | wrote 10485760/10485760 bytes at offset 3298534883328 | ||
939 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
940 | |||
941 | @@ -XXX,XX +XXX,XX @@ wrote 10485760/10485760 bytes at offset 3298534883328 | ||
942 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-xts-plain64-sha256.img qiotest-145-aes-256-xts-plain64-sha256 | ||
943 | # Read test pattern 0x91 | ||
944 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain64-sha256 | ||
945 | -qemu-io -c read -P 0x91 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha256 | ||
946 | +qemu-io -c read -P 0x91 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha256 | ||
947 | read 10485760/10485760 bytes at offset 104857600 | ||
948 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
949 | |||
950 | # Read test pattern 0x5e | ||
951 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain64-sha256 | ||
952 | -qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha256 | ||
953 | +qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha256 | ||
954 | read 10485760/10485760 bytes at offset 3298534883328 | ||
955 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
956 | |||
957 | @@ -XXX,XX +XXX,XX @@ Formatting 'TEST_DIR/luks-aes-256-xts-plain64-sha256.img', fmt=luks size=4398046 | ||
958 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-xts-plain64-sha256.img qiotest-145-aes-256-xts-plain64-sha256 | ||
959 | # Write test pattern 0xa7 | ||
960 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain64-sha256 | ||
961 | -qemu-io -c write -P 0xa7 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha256 | ||
962 | +qemu-io -c write -P 0xa7 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha256 | ||
963 | wrote 10485760/10485760 bytes at offset 104857600 | ||
964 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
965 | |||
966 | # Write test pattern 0x13 | ||
967 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain64-sha256 | ||
968 | -qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha256 | ||
969 | +qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha256 | ||
970 | wrote 10485760/10485760 bytes at offset 3298534883328 | ||
971 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
972 | |||
973 | @@ -XXX,XX +XXX,XX @@ wrote 10485760/10485760 bytes at offset 3298534883328 | ||
974 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-xts-plain64-sha256.img qiotest-145-aes-256-xts-plain64-sha256 | ||
975 | # Read test pattern 0x91 | ||
976 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain64-sha256 | ||
977 | -qemu-io -c read -P 0x91 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha256 | ||
978 | +qemu-io -c read -P 0x91 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha256 | ||
979 | read 10485760/10485760 bytes at offset 104857600 | ||
980 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
981 | |||
982 | # Read test pattern 0x5e | ||
983 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain64-sha256 | ||
984 | -qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha256 | ||
985 | +qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha256 | ||
986 | read 10485760/10485760 bytes at offset 3298534883328 | ||
987 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
988 | |||
989 | @@ -XXX,XX +XXX,XX @@ sudo cryptsetup -q -v luksFormat --cipher aes-xts-plain64 --key-size 512 --hash | ||
990 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-xts-plain64-sha384.img qiotest-145-aes-256-xts-plain64-sha384 | ||
991 | # Write test pattern 0xa7 | ||
992 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain64-sha384 | ||
993 | -qemu-io -c write -P 0xa7 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha384 | ||
994 | +qemu-io -c write -P 0xa7 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha384 | ||
995 | wrote 10485760/10485760 bytes at offset 104857600 | ||
996 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
997 | |||
998 | # Write test pattern 0x13 | ||
999 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain64-sha384 | ||
1000 | -qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha384 | ||
1001 | +qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha384 | ||
1002 | wrote 10485760/10485760 bytes at offset 3298534883328 | ||
1003 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
1004 | |||
1005 | @@ -XXX,XX +XXX,XX @@ wrote 10485760/10485760 bytes at offset 3298534883328 | ||
1006 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-xts-plain64-sha384.img qiotest-145-aes-256-xts-plain64-sha384 | ||
1007 | # Read test pattern 0x91 | ||
1008 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain64-sha384 | ||
1009 | -qemu-io -c read -P 0x91 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha384 | ||
1010 | +qemu-io -c read -P 0x91 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha384 | ||
1011 | read 10485760/10485760 bytes at offset 104857600 | ||
1012 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
1013 | |||
1014 | # Read test pattern 0x5e | ||
1015 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain64-sha384 | ||
1016 | -qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha384 | ||
1017 | +qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha384 | ||
1018 | read 10485760/10485760 bytes at offset 3298534883328 | ||
1019 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
1020 | |||
1021 | @@ -XXX,XX +XXX,XX @@ Formatting 'TEST_DIR/luks-aes-256-xts-plain64-sha384.img', fmt=luks size=4398046 | ||
1022 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-xts-plain64-sha384.img qiotest-145-aes-256-xts-plain64-sha384 | ||
1023 | # Write test pattern 0xa7 | ||
1024 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain64-sha384 | ||
1025 | -qemu-io -c write -P 0xa7 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha384 | ||
1026 | +qemu-io -c write -P 0xa7 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha384 | ||
1027 | wrote 10485760/10485760 bytes at offset 104857600 | ||
1028 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
1029 | |||
1030 | # Write test pattern 0x13 | ||
1031 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain64-sha384 | ||
1032 | -qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha384 | ||
1033 | +qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha384 | ||
1034 | wrote 10485760/10485760 bytes at offset 3298534883328 | ||
1035 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
1036 | |||
1037 | @@ -XXX,XX +XXX,XX @@ wrote 10485760/10485760 bytes at offset 3298534883328 | ||
1038 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-xts-plain64-sha384.img qiotest-145-aes-256-xts-plain64-sha384 | ||
1039 | # Read test pattern 0x91 | ||
1040 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain64-sha384 | ||
1041 | -qemu-io -c read -P 0x91 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha384 | ||
1042 | +qemu-io -c read -P 0x91 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha384 | ||
1043 | read 10485760/10485760 bytes at offset 104857600 | ||
1044 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
1045 | |||
1046 | # Read test pattern 0x5e | ||
1047 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain64-sha384 | ||
1048 | -qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha384 | ||
1049 | +qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha384 | ||
1050 | read 10485760/10485760 bytes at offset 3298534883328 | ||
1051 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
1052 | |||
1053 | @@ -XXX,XX +XXX,XX @@ sudo cryptsetup -q -v luksFormat --cipher aes-xts-plain64 --key-size 512 --hash | ||
1054 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-xts-plain64-sha512.img qiotest-145-aes-256-xts-plain64-sha512 | ||
1055 | # Write test pattern 0xa7 | ||
1056 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain64-sha512 | ||
1057 | -qemu-io -c write -P 0xa7 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha512 | ||
1058 | +qemu-io -c write -P 0xa7 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha512 | ||
1059 | wrote 10485760/10485760 bytes at offset 104857600 | ||
1060 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
1061 | |||
1062 | # Write test pattern 0x13 | ||
1063 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain64-sha512 | ||
1064 | -qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha512 | ||
1065 | +qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha512 | ||
1066 | wrote 10485760/10485760 bytes at offset 3298534883328 | ||
1067 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
1068 | |||
1069 | @@ -XXX,XX +XXX,XX @@ wrote 10485760/10485760 bytes at offset 3298534883328 | ||
1070 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-xts-plain64-sha512.img qiotest-145-aes-256-xts-plain64-sha512 | ||
1071 | # Read test pattern 0x91 | ||
1072 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain64-sha512 | ||
1073 | -qemu-io -c read -P 0x91 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha512 | ||
1074 | +qemu-io -c read -P 0x91 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha512 | ||
1075 | read 10485760/10485760 bytes at offset 104857600 | ||
1076 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
1077 | |||
1078 | # Read test pattern 0x5e | ||
1079 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain64-sha512 | ||
1080 | -qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha512 | ||
1081 | +qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha512 | ||
1082 | read 10485760/10485760 bytes at offset 3298534883328 | ||
1083 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
1084 | |||
1085 | @@ -XXX,XX +XXX,XX @@ Formatting 'TEST_DIR/luks-aes-256-xts-plain64-sha512.img', fmt=luks size=4398046 | ||
1086 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-xts-plain64-sha512.img qiotest-145-aes-256-xts-plain64-sha512 | ||
1087 | # Write test pattern 0xa7 | ||
1088 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain64-sha512 | ||
1089 | -qemu-io -c write -P 0xa7 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha512 | ||
1090 | +qemu-io -c write -P 0xa7 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha512 | ||
1091 | wrote 10485760/10485760 bytes at offset 104857600 | ||
1092 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
1093 | |||
1094 | # Write test pattern 0x13 | ||
1095 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain64-sha512 | ||
1096 | -qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha512 | ||
1097 | +qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha512 | ||
1098 | wrote 10485760/10485760 bytes at offset 3298534883328 | ||
1099 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
1100 | |||
1101 | @@ -XXX,XX +XXX,XX @@ wrote 10485760/10485760 bytes at offset 3298534883328 | ||
1102 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-xts-plain64-sha512.img qiotest-145-aes-256-xts-plain64-sha512 | ||
1103 | # Read test pattern 0x91 | ||
1104 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain64-sha512 | ||
1105 | -qemu-io -c read -P 0x91 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha512 | ||
1106 | +qemu-io -c read -P 0x91 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha512 | ||
1107 | read 10485760/10485760 bytes at offset 104857600 | ||
1108 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
1109 | |||
1110 | # Read test pattern 0x5e | ||
1111 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain64-sha512 | ||
1112 | -qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha512 | ||
1113 | +qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-sha512 | ||
1114 | read 10485760/10485760 bytes at offset 3298534883328 | ||
1115 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
1116 | |||
1117 | @@ -XXX,XX +XXX,XX @@ sudo cryptsetup -q -v luksFormat --cipher aes-xts-plain64 --key-size 512 --hash | ||
1118 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-xts-plain64-ripemd160.img qiotest-145-aes-256-xts-plain64-ripemd160 | ||
1119 | # Write test pattern 0xa7 | ||
1120 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain64-ripemd160 | ||
1121 | -qemu-io -c write -P 0xa7 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-ripemd160 | ||
1122 | +qemu-io -c write -P 0xa7 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-ripemd160 | ||
1123 | wrote 10485760/10485760 bytes at offset 104857600 | ||
1124 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
1125 | |||
1126 | # Write test pattern 0x13 | ||
1127 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain64-ripemd160 | ||
1128 | -qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-ripemd160 | ||
1129 | +qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-ripemd160 | ||
1130 | wrote 10485760/10485760 bytes at offset 3298534883328 | ||
1131 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
1132 | |||
1133 | @@ -XXX,XX +XXX,XX @@ wrote 10485760/10485760 bytes at offset 3298534883328 | ||
1134 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-xts-plain64-ripemd160.img qiotest-145-aes-256-xts-plain64-ripemd160 | ||
1135 | # Read test pattern 0x91 | ||
1136 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain64-ripemd160 | ||
1137 | -qemu-io -c read -P 0x91 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-ripemd160 | ||
1138 | +qemu-io -c read -P 0x91 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-ripemd160 | ||
1139 | read 10485760/10485760 bytes at offset 104857600 | ||
1140 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
1141 | |||
1142 | # Read test pattern 0x5e | ||
1143 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain64-ripemd160 | ||
1144 | -qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-ripemd160 | ||
1145 | +qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-ripemd160 | ||
1146 | read 10485760/10485760 bytes at offset 3298534883328 | ||
1147 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
1148 | |||
1149 | @@ -XXX,XX +XXX,XX @@ Formatting 'TEST_DIR/luks-aes-256-xts-plain64-ripemd160.img', fmt=luks size=4398 | ||
1150 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-xts-plain64-ripemd160.img qiotest-145-aes-256-xts-plain64-ripemd160 | ||
1151 | # Write test pattern 0xa7 | ||
1152 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain64-ripemd160 | ||
1153 | -qemu-io -c write -P 0xa7 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-ripemd160 | ||
1154 | +qemu-io -c write -P 0xa7 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-ripemd160 | ||
1155 | wrote 10485760/10485760 bytes at offset 104857600 | ||
1156 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
1157 | |||
1158 | # Write test pattern 0x13 | ||
1159 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain64-ripemd160 | ||
1160 | -qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-ripemd160 | ||
1161 | +qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-ripemd160 | ||
1162 | wrote 10485760/10485760 bytes at offset 3298534883328 | ||
1163 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
1164 | |||
1165 | @@ -XXX,XX +XXX,XX @@ wrote 10485760/10485760 bytes at offset 3298534883328 | ||
1166 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-xts-plain64-ripemd160.img qiotest-145-aes-256-xts-plain64-ripemd160 | ||
1167 | # Read test pattern 0x91 | ||
1168 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain64-ripemd160 | ||
1169 | -qemu-io -c read -P 0x91 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-ripemd160 | ||
1170 | +qemu-io -c read -P 0x91 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-ripemd160 | ||
1171 | read 10485760/10485760 bytes at offset 104857600 | ||
1172 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
1173 | |||
1174 | # Read test pattern 0x5e | ||
1175 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain64-ripemd160 | ||
1176 | -qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-ripemd160 | ||
1177 | +qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain64-ripemd160 | ||
1178 | read 10485760/10485760 bytes at offset 3298534883328 | ||
1179 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
1180 | |||
1181 | @@ -XXX,XX +XXX,XX @@ sudo cryptsetup -q -v luksFormat --cipher aes-xts-plain --key-size 512 --hash sh | ||
1182 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-xts-plain-sha1-pwslot3.img qiotest-145-aes-256-xts-plain-sha1-pwslot3 | ||
1183 | # Write test pattern 0xa7 | ||
1184 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain-sha1-pwslot3 | ||
1185 | -qemu-io -c write -P 0xa7 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain-sha1-pwslot3 | ||
1186 | +qemu-io -c write -P 0xa7 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain-sha1-pwslot3 | ||
1187 | wrote 10485760/10485760 bytes at offset 104857600 | ||
1188 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
1189 | |||
1190 | # Write test pattern 0x13 | ||
1191 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain-sha1-pwslot3 | ||
1192 | -qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain-sha1-pwslot3 | ||
1193 | +qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain-sha1-pwslot3 | ||
1194 | wrote 10485760/10485760 bytes at offset 3298534883328 | ||
1195 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
1196 | |||
1197 | @@ -XXX,XX +XXX,XX @@ wrote 10485760/10485760 bytes at offset 3298534883328 | ||
1198 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-xts-plain-sha1-pwslot3.img qiotest-145-aes-256-xts-plain-sha1-pwslot3 | ||
1199 | # Read test pattern 0x91 | ||
1200 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain-sha1-pwslot3 | ||
1201 | -qemu-io -c read -P 0x91 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain-sha1-pwslot3 | ||
1202 | +qemu-io -c read -P 0x91 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain-sha1-pwslot3 | ||
1203 | read 10485760/10485760 bytes at offset 104857600 | ||
1204 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
1205 | |||
1206 | # Read test pattern 0x5e | ||
1207 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain-sha1-pwslot3 | ||
1208 | -qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain-sha1-pwslot3 | ||
1209 | +qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain-sha1-pwslot3 | ||
1210 | read 10485760/10485760 bytes at offset 3298534883328 | ||
1211 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
1212 | |||
1213 | @@ -XXX,XX +XXX,XX @@ sudo cryptsetup -q -v luksAddKey TEST_DIR/luks-aes-256-xts-plain-sha1-pwallslots | ||
1214 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-xts-plain-sha1-pwallslots.img qiotest-145-aes-256-xts-plain-sha1-pwallslots | ||
1215 | # Write test pattern 0xa7 | ||
1216 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain-sha1-pwallslots | ||
1217 | -qemu-io -c write -P 0xa7 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain-sha1-pwallslots | ||
1218 | +qemu-io -c write -P 0xa7 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain-sha1-pwallslots | ||
1219 | wrote 10485760/10485760 bytes at offset 104857600 | ||
1220 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
1221 | |||
1222 | # Write test pattern 0x13 | ||
1223 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain-sha1-pwallslots | ||
1224 | -qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain-sha1-pwallslots | ||
1225 | +qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain-sha1-pwallslots | ||
1226 | wrote 10485760/10485760 bytes at offset 3298534883328 | ||
1227 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
1228 | |||
1229 | @@ -XXX,XX +XXX,XX @@ wrote 10485760/10485760 bytes at offset 3298534883328 | ||
1230 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-xts-plain-sha1-pwallslots.img qiotest-145-aes-256-xts-plain-sha1-pwallslots | ||
1231 | # Read test pattern 0x91 | ||
1232 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain-sha1-pwallslots | ||
1233 | -qemu-io -c read -P 0x91 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain-sha1-pwallslots | ||
1234 | +qemu-io -c read -P 0x91 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain-sha1-pwallslots | ||
1235 | read 10485760/10485760 bytes at offset 104857600 | ||
1236 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
1237 | |||
1238 | # Read test pattern 0x5e | ||
1239 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain-sha1-pwallslots | ||
1240 | -qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain-sha1-pwallslots | ||
1241 | +qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain-sha1-pwallslots | ||
1242 | read 10485760/10485760 bytes at offset 3298534883328 | ||
1243 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
1244 | |||
1245 | @@ -XXX,XX +XXX,XX @@ Formatting 'TEST_DIR/luks-aes-256-xts-plain-sha1-pwallslots.img', fmt=luks size= | ||
1246 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-xts-plain-sha1-pwallslots.img qiotest-145-aes-256-xts-plain-sha1-pwallslots | ||
1247 | # Write test pattern 0xa7 | ||
1248 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain-sha1-pwallslots | ||
1249 | -qemu-io -c write -P 0xa7 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain-sha1-pwallslots | ||
1250 | +qemu-io -c write -P 0xa7 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain-sha1-pwallslots | ||
1251 | wrote 10485760/10485760 bytes at offset 104857600 | ||
1252 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
1253 | |||
1254 | # Write test pattern 0x13 | ||
1255 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain-sha1-pwallslots | ||
1256 | -qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain-sha1-pwallslots | ||
1257 | +qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain-sha1-pwallslots | ||
1258 | wrote 10485760/10485760 bytes at offset 3298534883328 | ||
1259 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
1260 | |||
1261 | @@ -XXX,XX +XXX,XX @@ wrote 10485760/10485760 bytes at offset 3298534883328 | ||
1262 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-xts-plain-sha1-pwallslots.img qiotest-145-aes-256-xts-plain-sha1-pwallslots | ||
1263 | # Read test pattern 0x91 | ||
1264 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain-sha1-pwallslots | ||
1265 | -qemu-io -c read -P 0x91 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain-sha1-pwallslots | ||
1266 | +qemu-io -c read -P 0x91 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain-sha1-pwallslots | ||
1267 | read 10485760/10485760 bytes at offset 104857600 | ||
1268 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
1269 | |||
1270 | # Read test pattern 0x5e | ||
1271 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-xts-plain-sha1-pwallslots | ||
1272 | -qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-xts-plain-sha1-pwallslots | ||
1273 | +qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-xts-plain-sha1-pwallslots | ||
1274 | read 10485760/10485760 bytes at offset 3298534883328 | ||
1275 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
1276 | |||
1277 | @@ -XXX,XX +XXX,XX @@ sudo cryptsetup -q -v luksFormat --cipher aes-cbc-essiv:sha256 --key-size 256 -- | ||
1278 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-cbc-essiv-auto-sha1.img qiotest-145-aes-256-cbc-essiv-auto-sha1 | ||
1279 | # Write test pattern 0xa7 | ||
1280 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-cbc-essiv-auto-sha1 | ||
1281 | -qemu-io -c write -P 0xa7 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-cbc-essiv-auto-sha1 | ||
1282 | +qemu-io -c write -P 0xa7 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-cbc-essiv-auto-sha1 | ||
1283 | wrote 10485760/10485760 bytes at offset 104857600 | ||
1284 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
1285 | |||
1286 | # Write test pattern 0x13 | ||
1287 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-cbc-essiv-auto-sha1 | ||
1288 | -qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-cbc-essiv-auto-sha1 | ||
1289 | +qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-cbc-essiv-auto-sha1 | ||
1290 | wrote 10485760/10485760 bytes at offset 3298534883328 | ||
1291 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
1292 | |||
1293 | @@ -XXX,XX +XXX,XX @@ wrote 10485760/10485760 bytes at offset 3298534883328 | ||
1294 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-cbc-essiv-auto-sha1.img qiotest-145-aes-256-cbc-essiv-auto-sha1 | ||
1295 | # Read test pattern 0x91 | ||
1296 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-cbc-essiv-auto-sha1 | ||
1297 | -qemu-io -c read -P 0x91 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-cbc-essiv-auto-sha1 | ||
1298 | +qemu-io -c read -P 0x91 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-cbc-essiv-auto-sha1 | ||
1299 | read 10485760/10485760 bytes at offset 104857600 | ||
1300 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
1301 | |||
1302 | # Read test pattern 0x5e | ||
1303 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-cbc-essiv-auto-sha1 | ||
1304 | -qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-cbc-essiv-auto-sha1 | ||
1305 | +qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-cbc-essiv-auto-sha1 | ||
1306 | read 10485760/10485760 bytes at offset 3298534883328 | ||
1307 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
1308 | |||
1309 | @@ -XXX,XX +XXX,XX @@ Formatting 'TEST_DIR/luks-aes-256-cbc-essiv-auto-sha1.img', fmt=luks size=439804 | ||
1310 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-cbc-essiv-auto-sha1.img qiotest-145-aes-256-cbc-essiv-auto-sha1 | ||
1311 | # Write test pattern 0xa7 | ||
1312 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-cbc-essiv-auto-sha1 | ||
1313 | -qemu-io -c write -P 0xa7 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-cbc-essiv-auto-sha1 | ||
1314 | +qemu-io -c write -P 0xa7 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-cbc-essiv-auto-sha1 | ||
1315 | wrote 10485760/10485760 bytes at offset 104857600 | ||
1316 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
1317 | |||
1318 | # Write test pattern 0x13 | ||
1319 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-cbc-essiv-auto-sha1 | ||
1320 | -qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-cbc-essiv-auto-sha1 | ||
1321 | +qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-cbc-essiv-auto-sha1 | ||
1322 | wrote 10485760/10485760 bytes at offset 3298534883328 | ||
1323 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
1324 | |||
1325 | @@ -XXX,XX +XXX,XX @@ wrote 10485760/10485760 bytes at offset 3298534883328 | ||
1326 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-cbc-essiv-auto-sha1.img qiotest-145-aes-256-cbc-essiv-auto-sha1 | ||
1327 | # Read test pattern 0x91 | ||
1328 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-cbc-essiv-auto-sha1 | ||
1329 | -qemu-io -c read -P 0x91 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-cbc-essiv-auto-sha1 | ||
1330 | +qemu-io -c read -P 0x91 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-cbc-essiv-auto-sha1 | ||
1331 | read 10485760/10485760 bytes at offset 104857600 | ||
1332 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
1333 | |||
1334 | # Read test pattern 0x5e | ||
1335 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-cbc-essiv-auto-sha1 | ||
1336 | -qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-cbc-essiv-auto-sha1 | ||
1337 | +qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-cbc-essiv-auto-sha1 | ||
1338 | read 10485760/10485760 bytes at offset 3298534883328 | ||
1339 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
1340 | |||
1341 | @@ -XXX,XX +XXX,XX @@ sudo cryptsetup -q -v luksFormat --cipher aes-cbc-plain64:sha256 --key-size 256 | ||
1342 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-cbc-plain64-sha256-sha1.img qiotest-145-aes-256-cbc-plain64-sha256-sha1 | ||
1343 | # Write test pattern 0xa7 | ||
1344 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-cbc-plain64-sha256-sha1 | ||
1345 | -qemu-io -c write -P 0xa7 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-cbc-plain64-sha256-sha1 | ||
1346 | +qemu-io -c write -P 0xa7 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-cbc-plain64-sha256-sha1 | ||
1347 | wrote 10485760/10485760 bytes at offset 104857600 | ||
1348 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
1349 | |||
1350 | # Write test pattern 0x13 | ||
1351 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-cbc-plain64-sha256-sha1 | ||
1352 | -qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-cbc-plain64-sha256-sha1 | ||
1353 | +qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-cbc-plain64-sha256-sha1 | ||
1354 | wrote 10485760/10485760 bytes at offset 3298534883328 | ||
1355 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
1356 | |||
1357 | @@ -XXX,XX +XXX,XX @@ wrote 10485760/10485760 bytes at offset 3298534883328 | ||
1358 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-cbc-plain64-sha256-sha1.img qiotest-145-aes-256-cbc-plain64-sha256-sha1 | ||
1359 | # Read test pattern 0x91 | ||
1360 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-cbc-plain64-sha256-sha1 | ||
1361 | -qemu-io -c read -P 0x91 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-cbc-plain64-sha256-sha1 | ||
1362 | +qemu-io -c read -P 0x91 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-cbc-plain64-sha256-sha1 | ||
1363 | read 10485760/10485760 bytes at offset 104857600 | ||
1364 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
1365 | |||
1366 | # Read test pattern 0x5e | ||
1367 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-cbc-plain64-sha256-sha1 | ||
1368 | -qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-cbc-plain64-sha256-sha1 | ||
1369 | +qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-cbc-plain64-sha256-sha1 | ||
1370 | read 10485760/10485760 bytes at offset 3298534883328 | ||
1371 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
1372 | |||
1373 | @@ -XXX,XX +XXX,XX @@ Formatting 'TEST_DIR/luks-aes-256-cbc-plain64-sha256-sha1.img', fmt=luks size=43 | ||
1374 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-cbc-plain64-sha256-sha1.img qiotest-145-aes-256-cbc-plain64-sha256-sha1 | ||
1375 | # Write test pattern 0xa7 | ||
1376 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-cbc-plain64-sha256-sha1 | ||
1377 | -qemu-io -c write -P 0xa7 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-cbc-plain64-sha256-sha1 | ||
1378 | +qemu-io -c write -P 0xa7 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-cbc-plain64-sha256-sha1 | ||
1379 | wrote 10485760/10485760 bytes at offset 104857600 | ||
1380 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
1381 | |||
1382 | # Write test pattern 0x13 | ||
1383 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-cbc-plain64-sha256-sha1 | ||
1384 | -qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-cbc-plain64-sha256-sha1 | ||
1385 | +qemu-io -c write -P 0x13 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-cbc-plain64-sha256-sha1 | ||
1386 | wrote 10485760/10485760 bytes at offset 3298534883328 | ||
1387 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
1388 | |||
1389 | @@ -XXX,XX +XXX,XX @@ wrote 10485760/10485760 bytes at offset 3298534883328 | ||
1390 | sudo cryptsetup -q -v luksOpen TEST_DIR/luks-aes-256-cbc-plain64-sha256-sha1.img qiotest-145-aes-256-cbc-plain64-sha256-sha1 | ||
1391 | # Read test pattern 0x91 | ||
1392 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-cbc-plain64-sha256-sha1 | ||
1393 | -qemu-io -c read -P 0x91 100M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-cbc-plain64-sha256-sha1 | ||
1394 | +qemu-io -c read -P 0x91 100M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-cbc-plain64-sha256-sha1 | ||
1395 | read 10485760/10485760 bytes at offset 104857600 | ||
1396 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
1397 | |||
1398 | # Read test pattern 0x5e | ||
1399 | sudo chown UID:GID /dev/mapper/qiotest-145-aes-256-cbc-plain64-sha256-sha1 | ||
1400 | -qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=file,filename=/dev/mapper/qiotest-145-aes-256-cbc-plain64-sha256-sha1 | ||
1401 | +qemu-io -c read -P 0x5e 3145728M 10M --image-opts driver=host_device,filename=/dev/mapper/qiotest-145-aes-256-cbc-plain64-sha256-sha1 | ||
1402 | read 10485760/10485760 bytes at offset 3298534883328 | ||
1403 | 10 MiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | ||
1404 | |||
1405 | -- | 109 | -- |
1406 | 2.13.6 | 110 | 2.25.3 |
1407 | 111 | ||
1408 | 112 | diff view generated by jsdifflib |