rbd: Support .bdrv_co_create

This adds the .bdrv_co_create driver callback to rbd, 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-01-31 16:27:38 +01:00
parent 4bfb274165
commit 1bebea37b4
2 changed files with 140 additions and 73 deletions

View file

@ -3435,6 +3435,23 @@
'*lazy-refcounts': 'bool',
'*refcount-bits': 'int' } }
##
# @BlockdevCreateOptionsRbd:
#
# Driver specific image creation options for rbd/Ceph.
#
# @location Where to store the new image file. This location cannot
# point to a snapshot.
# @size Size of the virtual disk in bytes
# @cluster-size RBD object size
#
# Since: 2.12
##
{ 'struct': 'BlockdevCreateOptionsRbd',
'data': { 'location': 'BlockdevOptionsRbd',
'size': 'size',
'*cluster-size' : 'size' } }
##
# @BlockdevCreateNotSupported:
#
@ -3484,7 +3501,7 @@
'qed': 'BlockdevCreateNotSupported',
'quorum': 'BlockdevCreateNotSupported',
'raw': 'BlockdevCreateNotSupported',
'rbd': 'BlockdevCreateNotSupported',
'rbd': 'BlockdevCreateOptionsRbd',
'replication': 'BlockdevCreateNotSupported',
'sheepdog': 'BlockdevCreateNotSupported',
'ssh': 'BlockdevCreateNotSupported',