[sheepdog] [PATCH 2/2] block: trickle down the fallback image creation function use to the block drivers
Eric Blake
eblake at redhat.com
Thu Mar 26 14:20:40 CET 2020
On 3/25/20 8:12 PM, Maxim Levitsky wrote:
> Instead of checking the .bdrv_co_create_opts to see if we need the failback,
fallback
> just implement the .bdrv_co_create_opts in the drivers that need it.
>
> This way we don't break various places that need to know if the underlying
> protocol/format really supports image creation, and this way we still
> allow some drivers to not support image creation.
>
> Fixes: fd17146cd93d1704cd96d7c2757b325fc7aac6fd
> Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1816007
>
> Note that technically this driver reverts the image creation failback
fallback
> for the vxhs driver since I don't have a means to test it,
> and IMHO it is better to leave it not supported as it was prior to
> generic image creation patches.
>
> Also drop iscsi_create_opts which was left accidently
accidentally
>
> Signed-off-by: Maxim Levitsky <mlevitsk at redhat.com>
> ---
> +++ b/block/file-posix.c
> @@ -3513,6 +3513,8 @@ static BlockDriver bdrv_host_device = {
> .bdrv_reopen_prepare = raw_reopen_prepare,
> .bdrv_reopen_commit = raw_reopen_commit,
> .bdrv_reopen_abort = raw_reopen_abort,
> + .bdrv_co_create_opts = bdrv_co_create_opts_simple,
> + .create_opts = &bdrv_create_opts_simple,
I'd drop the leading & for consistency with the rest of this struct
initializer.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
More information about the sheepdog
mailing list