Index: qemu/qapi/block-core.json =================================================================== --- qemu.orig/qapi/block-core.json 2020-11-07 22:57:38.932613674 +0000 +++ qemu.orig/qapi/block-core.json 2020-11-07 22:59:49.890722862 +0000 @@ -2907,7 +2907,7 @@ 'nbd', 'nfs', 'null-aio', 'null-co', 'nvme', 'parallels', 'qcow', 'qcow2', 'qed', 'quorum', 'raw', 'rbd', { 'name': 'replication', 'if': 'defined(CONFIG_REPLICATION)' }, - 'sheepdog', + 'sheepdog', 'vitastor', 'ssh', 'throttle', 'vdi', 'vhdx', 'vmdk', 'vpc', 'vvfat', 'vxhs' ] } ## @@ -3725,6 +3725,28 @@ '*tag': 'str' } } ## +# @BlockdevOptionsVitastor: +# +# Driver specific block device options for vitastor +# +# @image: Image name +# @inode: Inode number +# @pool: Pool ID +# @size: Desired image size in bytes +# @config_path: Path to Vitastor configuration +# @etcd_address: etcd connection address(es) +# @etcd_prefix: etcd key/value prefix +## +{ 'struct': 'BlockdevOptionsVitastor', + 'data': { '*inode': 'uint64', + '*pool': 'uint64', + '*size': 'uint64', + '*image': 'str', + '*config_path': 'str', + '*etcd_address': 'str', + '*etcd_prefix': 'str' } } + +## # @ReplicationMode: # # An enumeration of replication modes. @@ -4084,6 +4102,7 @@ 'replication': { 'type': 'BlockdevOptionsReplication', 'if': 'defined(CONFIG_REPLICATION)' }, 'sheepdog': 'BlockdevOptionsSheepdog', + 'vitastor': 'BlockdevOptionsVitastor', 'ssh': 'BlockdevOptionsSsh', 'throttle': 'BlockdevOptionsThrottle', 'vdi': 'BlockdevOptionsGenericFormat', @@ -4461,6 +4480,17 @@ '*cluster-size' : 'size' } } ## +# @BlockdevCreateOptionsVitastor: +# +# Driver specific image creation options for Vitastor. +# +# @size: Size of the virtual disk in bytes +## +{ 'struct': 'BlockdevCreateOptionsVitastor', + 'data': { 'location': 'BlockdevOptionsVitastor', + 'size': 'size' } } + +## # @BlockdevVmdkSubformat: # # Subformat options for VMDK images @@ -4722,6 +4752,7 @@ 'qed': 'BlockdevCreateOptionsQed', 'rbd': 'BlockdevCreateOptionsRbd', 'sheepdog': 'BlockdevCreateOptionsSheepdog', + 'vitastor': 'BlockdevCreateOptionsVitastor', 'ssh': 'BlockdevCreateOptionsSsh', 'vdi': 'BlockdevCreateOptionsVdi', 'vhdx': 'BlockdevCreateOptionsVhdx', Index: qemu/scripts/modules/module_block.py =================================================================== --- qemu.orig/scripts/modules/module_block.py 2020-11-07 22:57:38.936613739 +0000 +++ qemu/scripts/modules/module_block.py 2020-11-07 22:59:49.890722862 +0000 @@ -86,6 +86,7 @@ def print_bottom(fheader): output_file = sys.argv[1] with open(output_file, 'w') as fheader: print_top(fheader) + add_module(fheader, "vitastor", "vitastor", "vitastor") for filename in sys.argv[2:]: if os.path.isfile(filename):