From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37551) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1Jfe-0003Ku-E2 for qemu-devel@nongnu.org; Tue, 14 Aug 2012 12:08:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T1JfZ-0008B2-OY for qemu-devel@nongnu.org; Tue, 14 Aug 2012 12:08:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52586) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1JfZ-0008Ar-Ev for qemu-devel@nongnu.org; Tue, 14 Aug 2012 12:08:37 -0400 Message-ID: <502A77F8.207@redhat.com> Date: Tue, 14 Aug 2012 10:08:24 -0600 From: Eric Blake MIME-Version: 1.0 References: <1344953651-16622-1-git-send-email-benoit@irqsave.net> <1344953651-16622-5-git-send-email-benoit@irqsave.net> In-Reply-To: <1344953651-16622-5-git-send-email-benoit@irqsave.net> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig5710C3F44E97E3B5F0B4D466" 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: =?UTF-8?B?QmVub8OudCBDYW5ldA==?= Cc: kwolf@redhat.com, stefanha@linux.vnet.ibm.com, qemu-devel@nongnu.org, blauwirbel@gmail.com, anthony@codemonkey.ws, pbonzini@redhat.com, afaerber@suse.de, =?UTF-8?B?QmVub8OudCBDYW5ldA==?= This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig5710C3F44E97E3B5F0B4D466 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 08/14/2012 08:14 AM, Beno=C3=AEt 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]); 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? --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enig5710C3F44E97E3B5F0B4D466 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJQKnf5AAoJEKeha0olJ0Nqtn8IAKGyZDpa0tPF4pHAetYqlqVZ ur53ib7HcnUVTM5yMJlGWrwHS25L+23735rNlEReBYJNdrBSWHVIRDxXFD/ND2Ke yeUICN1Fqd4Pxn8EU8kZmJfBTj+3o3lftrR14q86QjyuD4S0CMunmfLHsWKpiJiZ /gbsEesS+WFHqgWFANM8VpQ09XXOoDlHnXJ2eU1VIAj0ryb52OtBnlfKUy2uaJEZ y+H8n9niXteXFoTDC4665UiqQUS23tF+lNhxy4mSXzIcLYGmZvDy12QjVmRPI3rQ 7duC39ickEuAIsLkfY96rl+0LslTvlEqP6bDCbs1Kj9yRz5KcPOQ8XmE6pGRKKM= =BLvl -----END PGP SIGNATURE----- --------------enig5710C3F44E97E3B5F0B4D466--