qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: zhanghailiang <zhang.zhanghailiang@huawei.com>
To: Eric Blake <eblake@redhat.com>, qemu-devel@nongnu.org
Cc: hangaohuai@huawei.com, quintela@redhat.com, armbru@redhat.com,
	lcapitulino@redhat.com, amit.shah@redhat.com,
	peter.huangpeng@huawei.com, dgilbert@redhat.com
Subject: Re: [Qemu-devel] [PATCH RFC] migration: Convert 'status' of MigrationInfo to use an enum type
Date: Fri, 27 Feb 2015 09:23:18 +0800	[thread overview]
Message-ID: <54EFC706.20801@huawei.com> (raw)
In-Reply-To: <54EF3A9A.3000100@redhat.com>

On 2015/2/26 23:24, Eric Blake wrote:
> On 02/26/2015 12:58 AM, zhanghailiang wrote:
>> The original 'status' is an open-coded 'str' type, convert it to use an
>> enum type.
>> This conversion is backwards compatible, better documented and
>> more convenient for future extensibility.
>>
>> In addition, Fix a typo for qapi-schema.json: comppleted -> completed
>>
>> Signed-off-by: zhanghailiang <zhang.zhanghailiang@huawei.com>
>> ---
>
>
>> +++ b/qapi-schema.json
>> @@ -411,18 +411,42 @@
>>              'overflow': 'int' } }
>>
>>   ##
>> +# @MigState:
>> +#
>> +# An enumeration of migration status.
>> +#
>> +# @failed: some error occurred during migration process. (since 0.14.0)
>> +#
>> +# @none: no migration has happened ever.
>
> s/happened ever/ever happened/
>

>> +#
>> +# @setup: migration process has been initiated. (since 0.14.0)
>> +#
>> +# @cancelling: in the process of cancelling migration. (since 2.0)
>
> It's weird to advertise this enum value when the code goes to lengths to
> hide it behind 'active', but I guess it's okay.
>

Hmm, yes, this state is only used internally, and will return 'active' to user
instead, it is a problem left over by history, which introduced by 51cf4c1a commit.
It is no side effect, maybe a NOTE should be added.

>> +#
>> +# @cancelled: cancelling migration is finished. (since 0.14.0)
>> +#
>> +# @active: in the process of doing migration. (since 0.14.0)
>> +#
>> +# @completed: migration is finished. (since 0.14.0)
>> +#
>> +# Since: 2.3
>
> It's weird to see various enum values stating (since xyz) that is older
> than 2.3.  Generally, we only use that for an enum value that is newer
> than the enumeration.  I'd be just fine if you got rid of all of the
> per-value '(since xyz)' strings.
>

OK, will fix in v2.

> Otherwise, looks good to me.
>

Thanks.
zhanghailiang

      reply	other threads:[~2015-02-27  1:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-26  7:58 [Qemu-devel] [PATCH RFC] migration: Convert 'status' of MigrationInfo to use an enum type zhanghailiang
2015-02-26 15:24 ` Eric Blake
2015-02-27  1:23   ` zhanghailiang [this message]

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=54EFC706.20801@huawei.com \
    --to=zhang.zhanghailiang@huawei.com \
    --cc=amit.shah@redhat.com \
    --cc=armbru@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=eblake@redhat.com \
    --cc=hangaohuai@huawei.com \
    --cc=lcapitulino@redhat.com \
    --cc=peter.huangpeng@huawei.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@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 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).