From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48183) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XMx12-0005G0-K3 for qemu-devel@nongnu.org; Thu, 28 Aug 2014 06:33:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XMx0y-0001JP-89 for qemu-devel@nongnu.org; Thu, 28 Aug 2014 06:33:16 -0400 Received: from mail-we0-x232.google.com ([2a00:1450:400c:c03::232]:48771) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XMx0x-0001J1-TZ for qemu-devel@nongnu.org; Thu, 28 Aug 2014 06:33:12 -0400 Received: by mail-we0-f178.google.com with SMTP id u57so552972wes.9 for ; Thu, 28 Aug 2014 03:33:11 -0700 (PDT) Date: Thu, 28 Aug 2014 11:33:08 +0100 From: Stefan Hajnoczi Message-ID: <20140828103308.GD26741@stefanha-thinkpad.redhat.com> References: <1408354865-23490-1-git-send-email-namei.unix@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="sgneBHv3152wZ8jf" Content-Disposition: inline In-Reply-To: <1408354865-23490-1-git-send-email-namei.unix@gmail.com> Subject: Re: [Qemu-devel] [PATCH v6 0/2] add read-pattern for block qourum List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Liu Yuan Cc: Kevin Wolf , qemu-devel@nongnu.org, Stefan Hajnoczi , Benoit Canet --sgneBHv3152wZ8jf Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Aug 18, 2014 at 05:41:03PM +0800, Liu Yuan wrote: > v6: > - fix a unused warning introduced by last version >=20 > v5: > - simplify a for loop in quorum_aio_finalize() >=20 > v4: > - swap the patch order > - update comment for fifo pattern in qaip > - use qapi enumeration in quorum driver instead of manual parsing >=20 > v3: > - separate patch into two, one for quorum and one for qapi for easier re= view > - add enumeration for quorum read pattern > - remove unrelated blank line fix from this patch set >=20 > v2: > - rename single as 'fifo' > - rename read_all_children as read_quorum_children > - fix quorum_aio_finalize() for fifo pattern >=20 > This patch adds single read pattern to quorum driver and quorum vote is d= efault > pattern. >=20 > For now we do a quorum vote on all the reads, it is designed for unreliab= le > underlying storage such as non-redundant NFS to make sure data integrity = at the > cost of the read performance. >=20 > For some use cases as following: >=20 > VM > -------------- > | | > v v > A B >=20 > Both A and B has hardware raid storage to justify the data integrity on i= ts own. > So it would help performance if we do a single read instead of on all the= nodes. > Further, if we run VM on either of the storage node, we can make a local = read > request for better performance. >=20 > This patch generalize the above 2 nodes case in the N nodes. That is, >=20 > vm -> write to all the N nodes, read just one of them. If single read fai= ls, we > try to read next node in FIFO order specified by the startup command. >=20 > The 2 nodes case is very similar to DRBD[1] though lack of auto-sync > functionality in the single device/node failure for now. But compared wit= h DRBD > we still have some advantages over it: >=20 > - Suppose we have 20 VMs running on one(assume A) of 2 nodes' DRBD backed > storage. And if A crashes, we need to restart all the VMs on node B. But = for > practice case, we can't because B might not have enough resources to setu= p 20 VMs > at once. So if we run our 20 VMs with quorum driver, and scatter the repl= icated > images over the data center, we can very likely restart 20 VMs without any > resource problem. >=20 > After all, I think we can build a more powerful replicated image function= ality > on quorum and block jobs(block mirror) to meet various High Availibility = needs. >=20 > E.g, Enable single read pattern on 2 children, > =20 > -drive driver=3Dquorum,children.0.file.filename=3D0.qcow2,\ > children.1.file.filename=3D1.qcow2,read-pattern=3Dfifo,vote-threshold=3D1 >=20 > [1] http://en.wikipedia.org/wiki/Distributed_Replicated_Block_Device >=20 > Cc: Benoit Canet > Cc: Eric Blake > Cc: Kevin Wolf > Cc: Stefan Hajnoczi > Liu Yuan (2): > qapi: add read-pattern enum for quorum > block/quorum: add simple read pattern support >=20 > block/quorum.c | 177 +++++++++++++++++++++++++++++++++++++--------= ------ > qapi/block-core.json | 20 +++++- > 2 files changed, 148 insertions(+), 49 deletions(-) I dropped the \n from the error_setg() error message while merging. Please do not use \n with error_setg(). Please extend the quorum qemu-iotests to cover the new fifo read pattern. You can send the tests as a separate patch series. Thanks, applied to my block tree: https://github.com/stefanha/qemu/commits/block Stefan --sgneBHv3152wZ8jf Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJT/wVkAAoJEJykq7OBq3PIjK8IAJ2UObyGOm/pMNj/KwjwqMeV pC2cN/YmEQANZR1988yaqLCJhFpRPMNIcyTsUKs7sVUk1yGoqhp3rKVoiqOEDaLH 90fIQvfrW9O30gC9OZYO91fHud2zplc6iClveEjnkCD3TIjlC92FD+wYXJSdcNof TZNIXmsmq1PcF+hu0ZMQLtiwnuaMSwYkyKqI8ximiw1L8Q3MnOfRd5I3gvqtC/bs KBm5M6MyGf+9765cNhNN1MoBjGJLBCA6cnHGvO1wueIsKyJswMbVSE1r68R9zy7e JCb6gIhMaVIiua9swES5iBBxbUjH7FIHhvren+cXw++UFNs/gR0hCFtFAphrMCU= =Ab5T -----END PGP SIGNATURE----- --sgneBHv3152wZ8jf--