From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44123) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gCnnV-0007XV-Nd for qemu-devel@nongnu.org; Wed, 17 Oct 2018 11:31:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gCnnU-0000pt-Rf for qemu-devel@nongnu.org; Wed, 17 Oct 2018 11:31:45 -0400 Date: Wed, 17 Oct 2018 17:31:32 +0200 From: Kevin Wolf Message-ID: <20181017153132.GI31479@localhost.localdomain> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH 2/3] quorum: Return an error if the blkverify mode has invalid settings List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alberto Garcia Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org, Markus Armbruster , Max Reitz Am 17.10.2018 um 16:33 hat Alberto Garcia geschrieben: > The blkverify mode of Quorum can only be enabled if the number of > children is exactly two and the value of vote-threshold is also two. > > If the user tries to enable it but the other settings are incorrect > then QEMU simply prints an error message to stderr and carries on > disabling the blkverify setting. > > This patch makes quorum_open() fail and return an error in this case. > > Signed-off-by: Alberto Garcia > Reported-by: Markus Armbruster While reviewing this, I think I found another problem: Shouldn't .bdrv_add_child refuse to add a child if s->is_blkverify == true? (And probably assert in .bdrv_del_child that s->is_blkverify == false after checking s->num_children <= s->threshold) Kevin