From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56211) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X8644-0007j5-3C for qemu-devel@nongnu.org; Fri, 18 Jul 2014 07:11:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X863y-0001EW-3h for qemu-devel@nongnu.org; Fri, 18 Jul 2014 07:11:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33265) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X863x-0001ES-Rd for qemu-devel@nongnu.org; Fri, 18 Jul 2014 07:10:54 -0400 Date: Fri, 18 Jul 2014 13:10:46 +0200 From: Kevin Wolf Message-ID: <20140718111046.GD3744@noname.redhat.com> References: <1405597808-15975-1-git-send-email-namei.unix@gmail.com> <20140718031131.GB2478@T430.redhat.com> <20140718055202.GG15811@ubuntu-trusty> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140718055202.GG15811@ubuntu-trusty> Subject: Re: [Qemu-devel] [PATCH] block/quorum: implement .bdrv_co_get_block_status List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Liu Yuan Cc: Fam Zheng , qemu-devel@nongnu.org, Stefan Hajnoczi , Benoit Canet 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 > > > Cc: Kevin Wolf > > > Cc: Stefan Hajnoczi > > > Signed-off-by: Liu Yuan > > > --- > > > 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