From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34718) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWgOS-0007yh-FH for qemu-devel@nongnu.org; Fri, 19 Feb 2016 03:26:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aWgOP-00089l-4S for qemu-devel@nongnu.org; Fri, 19 Feb 2016 03:26:28 -0500 Received: from [59.151.112.132] (port=25213 helo=heian.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWgOO-00084H-LO for qemu-devel@nongnu.org; Fri, 19 Feb 2016 03:26:25 -0500 References: <1455588944-29799-1-git-send-email-xiecl.fnst@cn.fujitsu.com> <1455588944-29799-2-git-send-email-xiecl.fnst@cn.fujitsu.com> From: Wen Congyang Message-ID: <56C6D1CD.7010800@cn.fujitsu.com> Date: Fri, 19 Feb 2016 16:26:53 +0800 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 1/1] quorum: Change vote rules for 64 bits hash List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alberto Garcia , Changlong Xie , qemu devel , Kevin Wolf , Eric Blake Cc: "Dr. David Alan Gilbert" On 02/18/2016 11:16 PM, Alberto Garcia wrote: > On Tue 16 Feb 2016 03:15:44 AM CET, Changlong Xie wrote: >> If quorum has two children(A, B). A do flush sucessfully, but B flush >> failed. We MUST choice A as winner rather than just pick anyone of >> them. Otherwise the filesystem of guest will become read-only with >> following errors: >> >> end_request: I/O error, dev vda, sector 11159960 >> Aborting journal on device vda3-8 >> EXT4-fs error (device vda3): ext4_journal_start_sb:327: Detected abort journal >> EXT4-fs (vda3): Remounting filesystem read-only > > Hi Xie, > > Let's see if I'm getting this right: > > - When Quorum flushes to disk, there's a vote among the return values of > the flush operations of its members, and the one that wins is the one > that Quorum returns. > > - If there's a tie then Quorum choses the first result from the list of > winners. > > - With your patch you want to give priority to the vote with result == 0 > if there's any, so Quorum would return 0 (and succeed). > > This seems to me like an ad-hoc fix for a particular use case. What if > you have 3 members and two of them fail with the same error code? Would > you still return 0 or the error code from the other two? For example: children.0 returns 0 children.1 returns -EIO children.2 returns -EPIPE In this case, quorum returns -EPIPE now(without this patch). For example: children.0 returns -EPIPE children.1 returns -EIO children.2 returns 0 In this case, quorum returns 0 now. If two children returns the same error, and only one returns 0, this patch doesn't change the behavior. Back to your question, before this patch, sometimes quorum returns error, and sometimes quorum returns 0. In such case, which is better? Always return 0 or always return error? In my opinion, we can always return 0 if we allow quorum returns 0 in case 2. > > Also, is this only supposed to be used in FIFO mode? Your patch doesn't > seem to make any distinction. IIRC, FIFO mode is only for read operation. This patch is not for FIFO mode. Thanks Wen Congyang > > Thanks! > > Berto > > > . >