From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:55464) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1zyc-0006fH-8k for qemu-devel@nongnu.org; Thu, 16 Aug 2012 09:19:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T1zya-00040Z-Dw for qemu-devel@nongnu.org; Thu, 16 Aug 2012 09:19:06 -0400 Received: from paradis.irqsave.net ([109.190.18.76]:39514) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1zyZ-00040H-Sx for qemu-devel@nongnu.org; Thu, 16 Aug 2012 09:19:04 -0400 Date: Thu, 16 Aug 2012 15:18:52 +0200 From: =?iso-8859-1?Q?Beno=EEt?= Canet Message-ID: <20120816131852.GA2080@irqsave.net> References: <1344953651-16622-1-git-send-email-benoit@irqsave.net> <1344953651-16622-5-git-send-email-benoit@irqsave.net> <502A77F8.207@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <502A77F8.207@redhat.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [RFC V3 4/9] quorum: Add quorum_getlength(). List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: kwolf@redhat.com, =?iso-8859-1?Q?Beno=EEt?= Canet , stefanha@linux.vnet.ibm.com, qemu-devel@nongnu.org, blauwirbel@gmail.com, anthony@codemonkey.ws, pbonzini@redhat.com, afaerber@suse.de Le Tuesday 14 Aug 2012 =E0 10:08:24 (-0600), Eric Blake a =E9crit : > On 08/14/2012 08:14 AM, Beno=EEt Canet wrote: > > Signed-off-by: Benoit Canet > > --- > > block/quorum.c | 9 +++++++++ > > 1 file changed, 9 insertions(+) > >=20 > > diff --git a/block/quorum.c b/block/quorum.c > > index f228428..a3f16ed 100644 > > --- a/block/quorum.c > > +++ b/block/quorum.c > > @@ -162,12 +162,21 @@ static void quorum_close(BlockDriverState *bs) > > g_free(s->bs); > > } > > =20 > > +static int64_t quorum_getlength(BlockDriverState *bs) > > +{ > > + BDRVQuorumState *s =3D bs->opaque; > > + > > + return bdrv_getlength(s->bs[0]); >=20 > Is this implementation right? Shouldn't this be a quorum decision, > where all s->bs[...] elements have to agree on the same size, or even > where they can differ on size, as long as all files with larger size > have unallocated holes past the size of the smaller member? You are right. I have trouble figuring how it would work with differents sizes. Requiring quorum decision on the same size seems the best solutions I will implement it. Beno=EEt >=20 > --=20 > Eric Blake eblake@redhat.com +1-919-301-3266 > Libvirt virtualization library http://libvirt.org >=20