[libvirt] [PATCH] storage: Fix capacity value for LUKS encrypted volumes
Daniel P. Berrange
berrange at redhat.com
Mon Apr 3 10:11:03 UTC 2017
On Fri, Mar 24, 2017 at 10:56:38AM -0400, John Ferlan wrote:
> https://bugzilla.redhat.com/show_bug.cgi?id=1371892
>
> The 'capacity' value (e.g. guest logical size) for a LUKS volume is
> smaller than the 'physical' value of the file in the file system, so
> we need to account for that.
>
> When peeking at the encryption information about the volume add a fetch
> of the payload_offset which is described as the offset to the start of
> the volume data (in 512 byte sectors) in QEMU's QCryptoBlockLUKSHeader.
>
> Then adjust the ->capacity appropriately when we determine that the
> volume target encryption has a payload_offset value.
>
> Signed-off-by: John Ferlan <jferlan at redhat.com>
> ---
> src/storage/storage_util.c | 3 +++
> src/util/virstorageencryption.h | 1 +
> src/util/virstoragefile.c | 39 +++++++++++++++++++++++++++++++++++++++
> 3 files changed, 43 insertions(+)
ACK
Regards,
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://entangle-photo.org -o- http://search.cpan.org/~danberr/ :|
More information about the libvir-list
mailing list