From patchwork Fri Aug 29 16:29:36 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 384303 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id D124D14010C for ; Sat, 30 Aug 2014 02:33:16 +1000 (EST) Received: from localhost ([::1]:43052 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNP6w-0003mI-OI for incoming@patchwork.ozlabs.org; Fri, 29 Aug 2014 12:33:14 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46700) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNP4L-0007PV-ND for qemu-devel@nongnu.org; Fri, 29 Aug 2014 12:30:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XNP4G-0002lu-IK for qemu-devel@nongnu.org; Fri, 29 Aug 2014 12:30:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:28734) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNP4G-0002ln-A5 for qemu-devel@nongnu.org; Fri, 29 Aug 2014 12:30:28 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s7TGUOeP006264 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 29 Aug 2014 12:30:24 -0400 Received: from localhost (ovpn-112-42.ams2.redhat.com [10.36.112.42]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s7TGUN15009106; Fri, 29 Aug 2014 12:30:24 -0400 From: Stefan Hajnoczi To: Date: Fri, 29 Aug 2014 17:29:36 +0100 Message-Id: <1409329803-20744-9-git-send-email-stefanha@redhat.com> In-Reply-To: <1409329803-20744-1-git-send-email-stefanha@redhat.com> References: <1409329803-20744-1-git-send-email-stefanha@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id s7TGUOeP006264 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Peter Maydell , Stefan Hajnoczi , Liu Yuan Subject: [Qemu-devel] [PULL 08/35] qapi: add read-pattern enum for quorum X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Liu Yuan Cc: Eric Blake Reviewed-by: Eric Blake Reviewed-by: BenoƮt Canet Signed-off-by: Liu Yuan Signed-off-by: Stefan Hajnoczi --- qapi/block-core.json | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index fb74c56..a685d02 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -1419,6 +1419,19 @@ 'raw': 'BlockdevRef' } } ## +# @QuorumReadPattern +# +# An enumeration of quorum read patterns. +# +# @quorum: read all the children and do a quorum vote on reads +# +# @fifo: read only from the first child that has not failed +# +# Since: 2.2 +## +{ 'enum': 'QuorumReadPattern', 'data': [ 'quorum', 'fifo' ] } + +## # @BlockdevOptionsQuorum # # Driver specific block device options for Quorum @@ -1433,12 +1446,17 @@ # @rewrite-corrupted: #optional rewrite corrupted data when quorum is reached # (Since 2.1) # +# @read-pattern: #optional choose read pattern and set to quorum by default +# (Since 2.2) +# # Since: 2.0 ## { 'type': 'BlockdevOptionsQuorum', 'data': { '*blkverify': 'bool', 'children': [ 'BlockdevRef' ], - 'vote-threshold': 'int', '*rewrite-corrupted': 'bool' } } + 'vote-threshold': 'int', + '*rewrite-corrupted': 'bool', + '*read-pattern': 'QuorumReadPattern' } } ## # @BlockdevOptions