mbox series

[v3,0/4] luks: add qemu-img measure support

Message ID 20200211160318.453650-1-stefanha@redhat.com
Headers show
Series luks: add qemu-img measure support | expand

Message

Stefan Hajnoczi Feb. 11, 2020, 4:03 p.m. UTC
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                   | 40 ++++++++++++++
 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, 278 insertions(+), 68 deletions(-)
 create mode 100755 tests/qemu-iotests/282
 create mode 100644 tests/qemu-iotests/282.out