From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:32949) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aY5xO-0000mj-Ht for qemu-devel@nongnu.org; Tue, 23 Feb 2016 00:56:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aY5xL-00014d-BT for qemu-devel@nongnu.org; Tue, 23 Feb 2016 00:56:22 -0500 Received: from [59.151.112.132] (port=40876 helo=heian.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aY5xK-0000vr-FG for qemu-devel@nongnu.org; Tue, 23 Feb 2016 00:56:19 -0500 Message-ID: <56CBF4CF.6030401@cn.fujitsu.com> Date: Tue, 23 Feb 2016 13:57:35 +0800 From: Changlong Xie MIME-Version: 1.0 References: <1456134637-421-1-git-send-email-xiecl.fnst@cn.fujitsu.com> <1456134637-421-2-git-send-email-xiecl.fnst@cn.fujitsu.com> In-Reply-To: Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 1/1] quorum: modify vote rules for flush operation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alberto Garcia , qemu devel , Eric Blake , Kevin Wolf , Max Reitz Cc: "Dr. David Alan Gilbert" On 02/22/2016 10:33 PM, Alberto Garcia wrote: > On Mon 22 Feb 2016 10:50:37 AM CET, Changlong Xie wrote: >> - winner = quorum_get_vote_winner(&error_votes); >> - result = winner->value.l; >> - >> + if (success_count >= s->threshold) >> + result = 0; >> + else { >> + winner = quorum_get_vote_winner(&error_votes); >> + result = winner->value.l; >> + } > > Please use braces in both branches of the if. scripts/checkpatch.pl > should report that. Surely. > > Other than that I think the patch is correct, but I still wonder if we > should emit QUORUM_REPORT_BAD (or a new event) for the operations that To me QUORUM_REPORT_BAD is not a good choice. > fail. Or why wouldn't the user want to be notified of a flush failure? > I'll introduce a new event in next series. Thanks -Xie > Berto > > > . >