Received: from eggs.gnu.org ([2001:4830:134:3::10]:36202) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYCWU-0004yT-KY for qemu-devel@nongnu.org; Tue, 23 Feb 2016 07:57:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aYCWR-0003Ba-EP for qemu-devel@nongnu.org; Tue, 23 Feb 2016 07:57:02 -0500 Received: from smtp3.mundo-r.com ([212.51.32.191]:30204 helo=smtp4.mundo-r.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYCWR-0003BA-3Q for qemu-devel@nongnu.org; Tue, 23 Feb 2016 07:56:59 -0500 From: Alberto Garcia In-Reply-To: <1456218099-386-3-git-send-email-xiecl.fnst@cn.fujitsu.com> References: <1456218099-386-1-git-send-email-xiecl.fnst@cn.fujitsu.com> <1456218099-386-3-git-send-email-xiecl.fnst@cn.fujitsu.com> Date: Tue, 23 Feb 2016 13:56:57 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [Qemu-devel] [PATCH v4 2/2] quorum: modify vote rules for flush operation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Changlong Xie , qemu devel , Eric Blake , Kevin Wolf , Max Reitz Cc: "Dr. David Alan Gilbert" On Tue 23 Feb 2016 10:01:39 AM CET, Changlong Xie wrote: > for (i = 0; i < s->num_children; i++) { > result = bdrv_co_flush(s->children[i]->bs); > - result_value.l = result; > - quorum_count_vote(&error_votes, &result_value, i); > + if (result) { > + quorum_flush_error(s->children[i]->bs->node_name, "Flush failed"); > + result_value.l = result; > + quorum_count_vote(&error_votes, &result_value, i); > + } else { > + success_count++; > + } As I wrote on the review of patch 1/2, I would pass 'result' directly instead of "Flush failed". Otherwise this patch looks good, thanks! Berto