sheepdog: Support .bdrv_co_create

This adds the .bdrv_co_create driver callback to sheepdog, which enables
image creation over QMP.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
This commit is contained in:
Kevin Wolf 2018-02-01 13:20:44 +01:00
parent a595e4bcca
commit 63fd65a0a5
2 changed files with 192 additions and 75 deletions

View file

@ -3511,6 +3511,28 @@
'data': { 'full': 'SheepdogRedundancyFull',
'erasure-coded': 'SheepdogRedundancyErasureCoded' } }
##
# @BlockdevCreateOptionsSheepdog:
#
# Driver specific image creation options for Sheepdog.
#
# @location Where to store the new image file
# @size Size of the virtual disk in bytes
# @backing-file File name of a base image
# @preallocation Preallocation mode (allowed values: off, full)
# @redundancy Redundancy of the image
# @object-size Object size of the image
#
# Since: 2.12
##
{ 'struct': 'BlockdevCreateOptionsSheepdog',
'data': { 'location': 'BlockdevOptionsSheepdog',
'size': 'size',
'*backing-file': 'str',
'*preallocation': 'PreallocMode',
'*redundancy': 'SheepdogRedundancy',
'*object-size': 'size' } }
##
# @BlockdevCreateNotSupported:
#
@ -3562,7 +3584,7 @@
'raw': 'BlockdevCreateNotSupported',
'rbd': 'BlockdevCreateOptionsRbd',
'replication': 'BlockdevCreateNotSupported',
'sheepdog': 'BlockdevCreateNotSupported',
'sheepdog': 'BlockdevCreateOptionsSheepdog',
'ssh': 'BlockdevCreateNotSupported',
'throttle': 'BlockdevCreateNotSupported',
'vdi': 'BlockdevCreateNotSupported',