luks: Separate image file creation from formatting
commit3b5a1f6aa4a2878c47d9e8f9b835682cbab2f581
authorKevin Wolf <kwolf@redhat.com>
Fri, 2 Mar 2018 10:48:45 +0000 (2 11:48 +0100)
committerKevin Wolf <kwolf@redhat.com>
Mon, 19 Mar 2018 11:01:24 +0000 (19 12:01 +0100)
treec2740ca0d4f3197ecc0a4e966c15c898eb2e10b2
parentfb367e039fca2ac95a4e06dce22108f76cd4d232
luks: Separate image file creation from formatting

The crypto driver used to create the image file in a callback from the
crypto subsystem. If we want to implement .bdrv_co_create, this needs to
go away because that callback will get a reference to an already
existing block node.

Move the image file creation to block_crypto_create_generic().

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
block/crypto.c