> -----Original Message-----
> From: Kevin Wolf <[email protected]>
> Sent: Tuesday, May 18, 2021 3:39 PM
> To: Lukas Straub <[email protected]>
> Cc: Zhang, Chen <[email protected]>; Max Reitz <[email protected]>;
> Stefan Hajnoczi <[email protected]>; Fam Zheng <[email protected]>;
> qemu-dev <[email protected]>; qemu-block <qemu-
> [email protected]>; Minghao Yuan <[email protected]>; Zhang Chen
> <[email protected]>
> Subject: Re: [RFC PATCH] block/io.c: Flush parent for quorum in generic code
> 
> Am 18.05.2021 um 08:33 hat Lukas Straub geschrieben:
> > On Wed, 12 May 2021 15:49:57 +0800
> > Zhang Chen <[email protected]> wrote:
> >
> > > Fix the issue from this patch:
> > > [PATCH] block: Flush all children in generic code From
> > > 883833e29cb800b4d92b5d4736252f4004885191
> > >
> > > Quorum driver do not have the primary child.
> > > It will caused guest block flush issue when use quorum and NBD.
> > > The vm guest flushes failed,and then guest filesystem is shutdown.
> >
> > Hi,
> > I think the problem is rather that the quorum driver provides
> > .bdrv_co_flush_to_disk (which predates .bdrv_co_flush) instead of
> > .bdrv_co_flush. Can you try with the following patch instead?
> >
> > diff --git a/block/quorum.c b/block/quorum.c index
> > cfc1436abb..f2c0805000 100644
> > --- a/block/quorum.c
> > +++ b/block/quorum.c
> > @@ -1279,7 +1279,7 @@ static BlockDriver bdrv_quorum = {
> >      .bdrv_dirname                       = quorum_dirname,
> >      .bdrv_co_block_status               = quorum_co_block_status,
> >
> > -    .bdrv_co_flush_to_disk              = quorum_co_flush,
> > +    .bdrv_co_flush                      = quorum_co_flush,
> >
> >      .bdrv_getlength                     = quorum_getlength,
> 
> Thanks, Lukas. This is exactly what I was going to suggest after having a look
> at the code now.
> 
> The problem is not related to drivers not having a primary child in general
> (though quorum might be the only one in this category at the moment), but
> that quorum wants to override the default error handling semantics with its
> voting mechanism.

Yes, you are right. We can ignore this patch.
I tested Lukas's patch, it works for me.
Hi Lukas, Can you send this patch to upstream?

Thanks
Chen

> 
> Kevin

Reply via email to