From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36999) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XJJRQ-0006Yf-Mc for qemu-devel@nongnu.org; Mon, 18 Aug 2014 05:41:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XJJRK-0005ne-Nj for qemu-devel@nongnu.org; Mon, 18 Aug 2014 05:41:28 -0400 Received: from mail-pa0-x22a.google.com ([2607:f8b0:400e:c03::22a]:39662) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XJJRK-0005nY-F7 for qemu-devel@nongnu.org; Mon, 18 Aug 2014 05:41:22 -0400 Received: by mail-pa0-f42.google.com with SMTP id lf10so7531818pab.1 for ; Mon, 18 Aug 2014 02:41:19 -0700 (PDT) From: Liu Yuan Date: Mon, 18 Aug 2014 17:41:04 +0800 Message-Id: <1408354865-23490-2-git-send-email-namei.unix@gmail.com> In-Reply-To: <1408354865-23490-1-git-send-email-namei.unix@gmail.com> References: <1408354865-23490-1-git-send-email-namei.unix@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [Qemu-devel] [PATCH v6 1/2] qapi: add read-pattern enum for quorum List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Eric Blake Reviewed-by: Eric Blake Reviewed-by: BenoƮt Canet Signed-off-by: Liu Yuan --- 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 e378653..42033d9 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -1384,6 +1384,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 @@ -1398,12 +1411,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