]> xenbits.xensource.com Git - libvirt.git/commit
storage: Properly resize a local volume using LUKS
authorJohn Ferlan <jferlan@redhat.com>
Fri, 6 Oct 2017 16:04:19 +0000 (12:04 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Fri, 27 Oct 2017 09:34:36 +0000 (05:34 -0400)
commitbecb383a63ee3edd40493491a585630f364107c9
tree1c7f66a59b515f41bf47071dd38b2474538cf4a6
parent03984ae543c1f7d16376f7cbf4b7e28b05ac50b7
storage: Properly resize a local volume using LUKS

https://bugzilla.redhat.com/show_bug.cgi?id=1490279

Turns out the virStorageBackendVolResizeLocal did not differentiate
whether the target volume was a LUKS volume or not and just blindly
did the ftruncate() on the target volume.

Follow the volume creation logic (in general) and create a qemu-img
resize command to resize the target volume for LUKS ensuring that
the --object secret is provided as well as the '--image-opts' used
by the qemu-img resize logic to describe the path and secret ensuring
that it's using the luks driver on the volume of course.
src/storage/storage_util.c