From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58937) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X6wKo-00022s-TB for qemu-devel@nongnu.org; Tue, 15 Jul 2014 02:35:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X6wKf-0005TN-Lw for qemu-devel@nongnu.org; Tue, 15 Jul 2014 02:35:30 -0400 Received: from mail-pd0-x234.google.com ([2607:f8b0:400e:c02::234]:43911) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X6wKe-0005Sv-VZ for qemu-devel@nongnu.org; Tue, 15 Jul 2014 02:35:21 -0400 Received: by mail-pd0-f180.google.com with SMTP id y13so4250090pdi.25 for ; Mon, 14 Jul 2014 23:35:19 -0700 (PDT) From: Liu Yuan Date: Tue, 15 Jul 2014 14:34:58 +0800 Message-Id: <1405406098-30981-3-git-send-email-namei.unix@gmail.com> In-Reply-To: <1405406098-30981-1-git-send-email-namei.unix@gmail.com> References: <1405406098-30981-1-git-send-email-namei.unix@gmail.com> Subject: [Qemu-devel] [PATCH v3 2/2] qapi: add read-pattern support for quorum List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Eric Blake Signed-off-by: Liu Yuan --- qapi/block-core.json | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index e378653..22491bc 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -1384,6 +1384,18 @@ 'raw': 'BlockdevRef' } } ## +# @QuorumReadPattern +# An enumeration of quorum read pattern. +# +# @quorum: read all the children and do a quorum vote on reads +# +# @fifo: read a single child and try next child in FIFO order if read fails. +# +# Since: 2.2 +## +{ 'enum': 'QuorumReadPattern', 'data': [ 'quorum', 'fifo' ] } + +## # @BlockdevOptionsQuorum # # Driver specific block device options for Quorum @@ -1398,12 +1410,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 -- 1.9.1