From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46052) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMIZP-0000Ae-93 for qemu-devel@nongnu.org; Thu, 21 Jan 2016 11:58:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aMIZN-0000vL-OX for qemu-devel@nongnu.org; Thu, 21 Jan 2016 11:58:51 -0500 References: <1451035376-7252-1-git-send-email-xiecl.fnst@cn.fujitsu.com> <1451035376-7252-3-git-send-email-xiecl.fnst@cn.fujitsu.com> <56A03A42.7060802@cn.fujitsu.com> From: Eric Blake Message-ID: <56A10E42.5040500@redhat.com> Date: Thu, 21 Jan 2016 09:58:42 -0700 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="IWveX6s6s56VO4H70VgKjUKnAgATUMIHk" Subject: Re: [Qemu-devel] [PATCH v9 2/3] quorum: implement bdrv_add_child() and bdrv_del_child() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alberto Garcia , Wen Congyang , Changlong Xie , qemu devel , Kevin Wolf , Stefan Hajnoczi Cc: zhanghailiang , qemu block , Jiang Yunhong , Dong Eddie , Markus Armbruster , "Dr. David Alan Gilbert" , Gonglei This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --IWveX6s6s56VO4H70VgKjUKnAgATUMIHk Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 01/21/2016 06:05 AM, Alberto Garcia wrote: > On Thu 21 Jan 2016 02:54:10 AM CET, Wen Congyang = wrote: >=20 >>>> @@ -875,9 +878,9 @@ static int quorum_open(BlockDriverState *bs, QDi= ct *options, int flags, >>>> ret =3D -EINVAL; >>>> goto exit; >>>> } >>>> - if (s->num_children < 2) { >>>> + if (s->num_children < 1) { >>>> error_setg(&local_err, >>>> - "Number of provided children must be greater tha= n 1"); >>>> + "Number of provided children must be 1 or more")= ; >>>> ret =3D -EINVAL; >>>> goto exit; >>>> } >>> >>> I have a question: if you have a Quorum with just one member and you >>> add a new one, how do you know if it has the same data as the >>> existing one? >>> >>> In general, what do you do to make sure that the data in a new Quorum= >>> child is consistent with that of the rest of the array? >> >> Quorum can have more than one child when it starts. But we don't do >> the similar check. So I don't think we should do such check here. >=20 > Yes, but when you start a VM you can verify in advance that all members= > of the Quorum have the same data. If you do that on a running VM how ca= n > you know if the new disk is consistent with the others? User error if it is not. Just the same as it is user error if you request a shallow drive-mirror but the destination is not the same contents as the backing file. I don't think qemu has to protect us from user error in this case. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --IWveX6s6s56VO4H70VgKjUKnAgATUMIHk Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJWoQ5CAAoJEKeha0olJ0NqEJ8H/RtdhvpFWUGlp/+Q9AnUKkRz hstHe6kQ2QMOBmhtiV08vBE8oUl9YOxMv2HJGijW9mDkOSXz8zoQj5QVxebYzDTx /DANDWrMRCf84nX3GG8VYyOh/Z87l9I+0J17uK8cfg3/L6JheowWuK8TBRn8ZnOe Rxakz+EynBNyP9HdKKcplk5QBFE2YjsSFpcZraLZk84U8UHDXh6TzxNZ/BipXhAS Tbkb+AALY5D5aQZ5Q6uwhG+hRnweM9FW+JMXkkEBtW+W/wM92r1AyZY3LslO0bbQ ADPFl8LgcoBHKki24HN7SEzWUTGB0z2bGWBS0j/djQauuzC/Apkj1IOdJ3feZ10= =HTrq -----END PGP SIGNATURE----- --IWveX6s6s56VO4H70VgKjUKnAgATUMIHk--