From: Wen Congyang <wency@cn.fujitsu.com>
To: Alberto Garcia <berto@igalia.com>, qemu-devl <qemu-devel@nongnu.org>
Cc: Liu Yuan <namei.unix@gmail.com>, Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] quorum: validate vote threshold against num_children even if read-pattern is fifo
Date: Fri, 3 Jul 2015 16:50:50 +0800 [thread overview]
Message-ID: <55964CEA.4010907@cn.fujitsu.com> (raw)
In-Reply-To: <w51r3op4oqy.fsf@maestria.local.igalia.com>
On 07/03/2015 04:41 PM, Alberto Garcia wrote:
> On Fri 03 Jul 2015 08:45:06 AM CEST, Wen Congyang wrote:
>
>> We need to use threshold to check if too many write operation fails.
>> If threshold is larger than num children, we always get write error
>> event even if all write operations success.
>>
>> Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
>> ---
>> block/quorum.c | 12 ++++++------
>> 1 file changed, 6 insertions(+), 6 deletions(-)
>>
>> diff --git a/block/quorum.c b/block/quorum.c
>> index a7df17c..b0eead0 100644
>> --- a/block/quorum.c
>> +++ b/block/quorum.c
>> @@ -894,6 +894,12 @@ static int quorum_open(BlockDriverState *bs, QDict *options, int flags,
>> }
>>
>> s->threshold = qemu_opt_get_number(opts, QUORUM_OPT_VOTE_THRESHOLD, 0);
>> + /* and validate it against s->num_children */
>> + ret = quorum_valid_threshold(s->threshold, s->num_children, &local_err);
>> + if (ret < 0) {
>> + goto exit;
>> + }
>> +
>
> I wonder why this check was moved inside the (s->read_pattern ==
> QUORUM_READ_PATTERN_QUORUM) block when the fifo mode was introduced
> (adding Liu Yuan to Cc).
>
> I assume that you are not going to allow removing children under the
> vote_threshold limit as we discussed, right?
Yes.
Thanks
Wen Congyang
>
> Reviewed-by: Alberto Garcia <berto@igalia.com>
>
> Berto
> .
>
next prev parent reply other threads:[~2015-07-03 8:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-03 6:45 [Qemu-devel] quorum: validate vote threshold against num_children even if read-pattern is fifo Wen Congyang
2015-07-03 8:41 ` Alberto Garcia
2015-07-03 8:50 ` Wen Congyang [this message]
2015-08-19 2:53 ` Wen Congyang
2015-08-20 17:27 ` Kevin Wolf
2015-08-24 18:26 ` Max Reitz
2015-08-26 15:29 ` Max Reitz
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=55964CEA.4010907@cn.fujitsu.com \
--to=wency@cn.fujitsu.com \
--cc=berto@igalia.com \
--cc=namei.unix@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.