From: Wen Congyang <wency@cn.fujitsu.com>
To: Alberto Garcia <berto@igalia.com>,
Changlong Xie <xiecl.fnst@cn.fujitsu.com>,
qemu devel <qemu-devel@nongnu.org>, Kevin Wolf <kwolf@redhat.com>,
Eric Blake <eblake@redhat.com>
Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2 1/1] quorum: Change vote rules for 64 bits hash
Date: Fri, 19 Feb 2016 16:26:53 +0800 [thread overview]
Message-ID: <56C6D1CD.7010800@cn.fujitsu.com> (raw)
In-Reply-To: <w5160xmqcah.fsf@maestria.local.igalia.com>
On 02/18/2016 11:16 PM, Alberto Garcia wrote:
> On Tue 16 Feb 2016 03:15:44 AM CET, Changlong Xie <xiecl.fnst@cn.fujitsu.com> 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
>
>
> .
>
next prev parent reply other threads:[~2016-02-19 8:26 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-16 2:15 [Qemu-devel] [PATCH v2 0/1] change quorum vote rules for 64-bits hash Changlong Xie
2016-02-16 2:15 ` [Qemu-devel] [PATCH v2 1/1] quorum: Change vote rules for 64 bits hash Changlong Xie
2016-02-18 10:00 ` Dr. David Alan Gilbert
2016-02-18 15:16 ` Alberto Garcia
2016-02-19 8:26 ` Wen Congyang [this message]
2016-02-19 11:24 ` Alberto Garcia
2016-02-20 14:28 ` Max Reitz
2016-02-22 3:17 ` Changlong Xie
2016-02-22 9:02 ` Dr. David Alan Gilbert
2016-02-22 9:52 ` Changlong Xie
2016-02-22 9:59 ` Dr. David Alan Gilbert
2016-02-22 10:34 ` Kevin Wolf
2016-02-22 10:39 ` Dr. David Alan Gilbert
2016-02-23 2:55 ` Changlong Xie
2016-02-22 13:31 ` Alberto Garcia
2016-02-22 13:43 ` Alberto Garcia
2016-02-22 16:37 ` Eric Blake
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56C6D1CD.7010800@cn.fujitsu.com \
--to=wency@cn.fujitsu.com \
--cc=berto@igalia.com \
--cc=dgilbert@redhat.com \
--cc=eblake@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=xiecl.fnst@cn.fujitsu.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).