qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] block/quorum: implement .bdrv_co_get_block_stat


From: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH] block/quorum: implement .bdrv_co_get_block_status
Date: Fri, 18 Jul 2014 13:10:46 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Am 18.07.2014 um 07:52 hat Liu Yuan geschrieben:
> On Fri, Jul 18, 2014 at 11:11:31AM +0800, Fam Zheng wrote:
> > On Thu, 07/17 19:50, Liu Yuan wrote:
> > > - allow drive-mirror to create sprase mirror on images like qcow2
> > > - allow qemu-img map to work as expected on quorum driver
> > > 
> > > Cc: Benoit Canet <address@hidden>
> > > Cc: Kevin Wolf <address@hidden>
> > > Cc: Stefan Hajnoczi <address@hidden>
> > > Signed-off-by: Liu Yuan <address@hidden>
> > > ---
> > >  block/quorum.c | 16 ++++++++++++++++
> > >  1 file changed, 16 insertions(+)
> > > 
> > > diff --git a/block/quorum.c b/block/quorum.c
> > > index ebf5c71..f0d0a98 100644
> > > --- a/block/quorum.c
> > > +++ b/block/quorum.c
> > > @@ -780,6 +780,21 @@ static coroutine_fn int 
> > > quorum_co_flush(BlockDriverState *bs)
> > >      return result;
> > >  }
> > >  
> > > +static int64_t coroutine_fn quorum_co_get_block_status(BlockDriverState 
> > > *bs,
> > > +                                                       int64_t 
> > > sector_num,
> > > +                                                       int nb_sectors,
> > > +                                                       int *pnum)
> > > +{
> > > +    BDRVQuorumState *s = bs->opaque;
> > > +    BlockDriverState *child_bs = s->bs[0];
> > 
> > Should we consider other children?
> > 
> 
> No, other children are identical because we always do multiple sync writes
> and at boot time we check the length.

But the basic assumption in quorum is that a single child isn't reliable
and can fail. Otherwise, you wouldn't have to read from all of them and
compare the results.

Kevin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]