Skip to content

luks: add qemu-img measure support

Stefan Hajnoczi qemu-devel 4 versions – Applied

Status from this message: Thanks, applied to my block branch:

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest4 patches 1 replyApplied
  2. v34 patches 6 repliesSuperseded
  3. v24 patches 7 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v14 patches1 replySuperseded

Changes in v4 from the cover letter

* This revision is what German speakers call "das Tüpfelchen auf dem I". "The icing on the cake" is the English equivalent. Since I like cake and don't want it to be half-baked, and because I like my metaphors shaken, not stirred, I went ahead with the extra revision so I could write this message.
* Use g_autoptr(QCryptoBlock) to make the code more concise [Max]
* Use local_err consistently [Max]
* Folded in Max's Reviewed-by tags

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/4luks: extract qcrypto_block_calculate_payload_offset()block/qcow2.c crypto/block.c include/crypto/block.h+77 -550 replies
2/4luks: implement .bdrv_measure()block/crypto.c+62 -00 replies
3/4qemu-img: allow qemu-img measure --object without a filenameqemu-img.c tests/qemu-iotests/178 tests/qemu-iotests/178.out.qcow2 +1 more+11 -130 replies
4/4iotests: add 282 luks qemu-img measure testtests/qemu-iotests/282 tests/qemu-iotests/282.out tests/qemu-iotests/group+124 -00 replies

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchMax Reitz
1/4R-b
2/4R-b
3/4R-b
4/4R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/4] luks: add qemu-img measure support

v4:
* This revision is what German speakers call "das Tüpfelchen auf dem I". "The icing on the cake" is the English equivalent. Since I like cake and don't want it to be half-baked, and because I like my metaphors shaken, not stirred, I went ahead with the extra revision so I could write this message.
* Use g_autoptr(QCryptoBlock) to make the code more concise [Max]
* Use local_err consistently [Max]
* Folded in Max's Reviewed-by tags
v3:
* Move payload offset calculation function to crypto/block.c [Max]
* Zero/unallocated blocks always require disk space on encrypted files [Max]
* Update qemu-iotests 178 output when changing qemu-img measure command-line options

v2:
* Fix uint64_t <-> size_t type mismatch in block_crypto_measure() so that 32-bit builds pass

This patch series adds qemu-img measure support to the "luks" block driver. We just need to take into account the LUKS header when sizing the image.

Stefan Hajnoczi (4):
luks: extract qcrypto_block_calculate_payload_offset()
luks: implement .bdrv_measure()
qemu-img: allow qemu-img measure --object without a filename
iotests: add 282 luks qemu-img measure test

 block/crypto.c                   | 62 +++++++++++++++++++++
 block/qcow2.c                    | 74 +++++++------------------
 crypto/block.c                   | 36 +++++++++++++
 include/crypto/block.h           | 22 ++++++++
 qemu-img.c                       |  6 +--
 tests/qemu-iotests/178           |  2 +-
 tests/qemu-iotests/178.out.qcow2 |  8 +--
 tests/qemu-iotests/178.out.raw   |  8 +--
 tests/qemu-iotests/282           | 93 ++++++++++++++++++++++++++++++++
 tests/qemu-iotests/282.out       | 30 +++++++++++
 tests/qemu-iotests/group         |  1 +
 11 files changed, 274 insertions(+), 68 deletions(-)
 create mode 100755 tests/qemu-iotests/282
 create mode 100644 tests/qemu-iotests/282.out
Signature · 1 line
2.24.1