From patchwork Fri Aug 15 05:05:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Liu Yuan X-Patchwork-Id: 380076 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 7FC9A1400DE for ; Fri, 15 Aug 2014 15:07:21 +1000 (EST) Received: from localhost ([::1]:57442 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XI9jT-00063l-CL for incoming@patchwork.ozlabs.org; Fri, 15 Aug 2014 01:07:19 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46474) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XI9hw-0003rg-KK for qemu-devel@nongnu.org; Fri, 15 Aug 2014 01:05:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XI9hn-0004dX-It for qemu-devel@nongnu.org; Fri, 15 Aug 2014 01:05:44 -0400 Received: from mail-pa0-x22e.google.com ([2607:f8b0:400e:c03::22e]:39186) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XI9hn-0004cu-7j for qemu-devel@nongnu.org; Fri, 15 Aug 2014 01:05:35 -0400 Received: by mail-pa0-f46.google.com with SMTP id lj1so2907074pab.33 for ; Thu, 14 Aug 2014 22:05:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=mqtIVclxnkqI2jwhtJ5IqeVF5uudWRpXL08AgiwhXXg=; b=xGO0bUt/vp35aLtEHKGhUiV0WbOuErkDO2fYOTrFa8Ikst0H673mgKFKRlqB2qrKGm vX5SrGkU7g3Yve6Z/7VYQTvc+KozTa8HBQPGYcXA0N3bUsbvth5VvSViwNE6w1CwiKy5 whyNbsTJR/3mZZ7f9GNM3YDM+xeXWfnkRHDQEl4L6Jn4QMqQtWg9FUWj1l5f9NZ4h8bF N24RCRNsn/Dok2ZCv0KoZrjJOkD+3djwpVHRysz3kyclfBzvJERiJ0+VeKCFhT0Vg7jq PGIL3uIJ8X42k1cqsff6ybuvZkfqFVDAurnMZfZEGTQeAJi8pYumi0Pt8tvoTgmyotVW w0ZA== X-Received: by 10.70.37.33 with SMTP id v1mr6957572pdj.155.1408079132734; Thu, 14 Aug 2014 22:05:32 -0700 (PDT) Received: from localhost.localdomain ([27.9.27.202]) by mx.google.com with ESMTPSA id b1sm24078827pat.45.2014.08.14.22.05.29 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 14 Aug 2014 22:05:31 -0700 (PDT) From: Liu Yuan To: qemu-devel@nongnu.org Date: Fri, 15 Aug 2014 13:05:16 +0800 Message-Id: <1408079117-15064-2-git-send-email-namei.unix@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1408079117-15064-1-git-send-email-namei.unix@gmail.com> References: <1408079117-15064-1-git-send-email-namei.unix@gmail.com> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c03::22e Subject: [Qemu-devel] [PATCH v5 1/2] 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 Cc: Eric Blake Reviewed-by: Eric Blake Signed-off-by: Liu Yuan Reviewed-by: BenoƮt Canet --- 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