Primarily using the Luks types again, Gluks adds an extra option called "header", which points to the Luks header node's description.
Signed-off-by: Hyman Huang <yong.hu...@smartx.com> --- qapi/block-core.json | 22 +++++++++++++++++++++- qapi/crypto.json | 10 +++++++--- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index ca390c5700..e2208f6891 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -3185,12 +3185,14 @@ # # @snapshot-access: Since 7.0 # +# @gluks: Since 9.0 +# # Since: 2.9 ## { 'enum': 'BlockdevDriver', 'data': [ 'blkdebug', 'blklogwrites', 'blkreplay', 'blkverify', 'bochs', 'cloop', 'compress', 'copy-before-write', 'copy-on-read', 'dmg', - 'file', 'snapshot-access', 'ftp', 'ftps', 'gluster', + 'file', 'snapshot-access', 'ftp', 'ftps', 'gluks', 'gluster', {'name': 'host_cdrom', 'if': 'HAVE_HOST_BLOCK_DEVICE' }, {'name': 'host_device', 'if': 'HAVE_HOST_BLOCK_DEVICE' }, 'http', 'https', @@ -3957,6 +3959,23 @@ '*debug': 'int', '*logfile': 'str' } } +## +# @BlockdevOptionsGLUKS: +# +# Driver specific block device options for GLUKS. +# +# @header: reference to the definition of the luks header node. +# +# @key-secret: the ID of a QCryptoSecret object providing the +# decryption key. +# +# Since: 9.0 +## +{ 'struct': 'BlockdevOptionsGLUKS', + 'base': 'BlockdevOptionsGenericFormat', + 'data': { 'header': 'BlockdevRef', + 'key-secret': 'str' } } + ## # @BlockdevOptionsIoUring: # @@ -4680,6 +4699,7 @@ 'file': 'BlockdevOptionsFile', 'ftp': 'BlockdevOptionsCurlFtp', 'ftps': 'BlockdevOptionsCurlFtps', + 'gluks': 'BlockdevOptionsGLUKS', 'gluster': 'BlockdevOptionsGluster', 'host_cdrom': { 'type': 'BlockdevOptionsFile', 'if': 'HAVE_HOST_BLOCK_DEVICE' }, diff --git a/qapi/crypto.json b/qapi/crypto.json index fd3d46ebd1..9afb242b5b 100644 --- a/qapi/crypto.json +++ b/qapi/crypto.json @@ -154,11 +154,13 @@ # # @luks: LUKS encryption format. Recommended for new images # +# @gluks: generic LUKS encryption format. (since 9.0) +# # Since: 2.6 ## { 'enum': 'QCryptoBlockFormat', # 'prefix': 'QCRYPTO_BLOCK_FORMAT', - 'data': ['qcow', 'luks']} + 'data': ['qcow', 'luks', 'gluks']} ## # @QCryptoBlockOptionsBase: @@ -246,7 +248,8 @@ 'base': 'QCryptoBlockOptionsBase', 'discriminator': 'format', 'data': { 'qcow': 'QCryptoBlockOptionsQCow', - 'luks': 'QCryptoBlockOptionsLUKS' } } + 'luks': 'QCryptoBlockOptionsLUKS', + 'gluks': 'QCryptoBlockOptionsLUKS' } } ## # @QCryptoBlockCreateOptions: @@ -260,7 +263,8 @@ 'base': 'QCryptoBlockOptionsBase', 'discriminator': 'format', 'data': { 'qcow': 'QCryptoBlockOptionsQCow', - 'luks': 'QCryptoBlockCreateOptionsLUKS' } } + 'luks': 'QCryptoBlockCreateOptionsLUKS', + 'gluks': 'QCryptoBlockCreateOptionsLUKS' } } ## # @QCryptoBlockInfoBase: -- 2.39.1