[sheepdog] [PATCH 2/2] block: trickle down the fallback image creation function use to the block drivers
Maxim Levitsky
mlevitsk at redhat.com
Thu Mar 26 14:30:16 CET 2020
On Thu, 2020-03-26 at 08:20 -0500, Eric Blake wrote:
> 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
100% true.
>
> > 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
True. I did a spell check on the commit message, but I guess I updated it
afterward with this.
>
> >
> > 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.
Can I? This is struct reference and I think that only for function references,
the leading & is optional.
Best regards,
Maxim Levitsky
More information about the sheepdog
mailing list