luks: Create block_crypto_co_create_generic()
authorKevin Wolf <kwolf@redhat.com>
Fri, 2 Mar 2018 13:16:36 +0000 (14:16 +0100)
committerKevin Wolf <kwolf@redhat.com>
Mon, 19 Mar 2018 11:01:24 +0000 (12:01 +0100)
commit1ec4f4160a1a94cf3d13b43551fff2792bd5056e
treef9eab4638d0202e4ea5834884cf23daeb8f8e667
parent3b5a1f6aa4a2878c47d9e8f9b835682cbab2f581
luks: Create block_crypto_co_create_generic()

Everything that refers to the protocol layer or QemuOpts is moved out of
block_crypto_create_generic(), so that the remaining function is
suitable to be called by a .bdrv_co_create implementation.

LUKS is the only driver that actually implements the old interface, and
we don't intend to use it in any new drivers, so put the moved out code
directly into a LUKS function rather than creating a generic
intermediate one.

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