crypto: Modify the qcrypto_block_create to support creation flags
authorHyman Huang <yong.huang@smartx.com>
Tue, 30 Jan 2024 05:37:21 +0000 (13:37 +0800)
committerDaniel P. Berrangé <berrange@redhat.com>
Fri, 9 Feb 2024 12:50:37 +0000 (12:50 +0000)
commitd74523a3b395dc8470177dcdfa13644b98494334
tree11ed4fb7871308c31292329814d888725d238a36
parent433957bb7f99d7577601949c92f2fffa9457cd7b
crypto: Modify the qcrypto_block_create to support creation flags

Expand the signature of qcrypto_block_create to enable the
formation of LUKS volumes with detachable headers. To accomplish
that, introduce QCryptoBlockCreateFlags to instruct the creation
process to set the payload_offset_sector to 0.

Signed-off-by: Hyman Huang <yong.huang@smartx.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
block/crypto.c
block/qcow.c
block/qcow2.c
crypto/block-luks.c
crypto/block.c
crypto/blockpriv.h
include/crypto/block.h
tests/unit/test-crypto-block.c