From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35862) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YT8vs-0007iQ-Fh for qemu-devel@nongnu.org; Wed, 04 Mar 2015 08:01:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YT8vm-0000kM-F7 for qemu-devel@nongnu.org; Wed, 04 Mar 2015 08:01:48 -0500 Received: from szxga03-in.huawei.com ([119.145.14.66]:64172) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YT8vl-0000jK-Lh for qemu-devel@nongnu.org; Wed, 04 Mar 2015 08:01:42 -0500 Message-ID: <54F70213.90108@huawei.com> Date: Wed, 4 Mar 2015 21:01:07 +0800 From: zhanghailiang MIME-Version: 1.0 References: <1425017996-6748-1-git-send-email-zhang.zhanghailiang@huawei.com> <54F09FFB.2070008@redhat.com> <54F12DD7.6080208@huawei.com> <54F4881F.9080200@redhat.com> <54F55F8D.7040403@huawei.com> <20150303085934.GA2293@work-vm> <54F6FC8B.7030805@huawei.com> <20150304125047.GF2530@work-vm> In-Reply-To: <20150304125047.GF2530@work-vm> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2] migration: Convert 'status' of MigrationInfo to use an enum type List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Dr. David Alan Gilbert" Cc: hangaohuai@huawei.com, quintela@redhat.com, qemu-devel@nongnu.org, armbru@redhat.com, amit.shah@redhat.com, peter.huangpeng@huawei.com, lcapitulino@redhat.com On 2015/3/4 20:50, Dr. David Alan Gilbert wrote: > * zhanghailiang (zhang.zhanghailiang@huawei.com) wrote: >> On 2015/3/3 16:59, Dr. David Alan Gilbert wrote: >>> * zhanghailiang (zhang.zhanghailiang@huawei.com) wrote: >>>> On 2015/3/2 23:56, Eric Blake wrote: >>>>> On 02/27/2015 07:54 PM, zhanghailiang wrote: >>>>>> On 2015/2/28 0:48, Eric Blake wrote: >>>>>>> On 02/26/2015 11:19 PM, zhanghailiang wrote: >>>>>>>> The original 'status' is an open-coded 'str' type, convert it to use an >>>>>>>> enum type. >>>>> >>>>>>>> +# @MigState: >>>>>>> >>>>>>> Do we have to abbreviate? I guess leaving it like this makes the rest >>>>>>> of the existing code base have less churn (since it matches the spelling >>>>>>> of the enum that was previous interanl only), but it might look nicer as >>>>>> >>>>>> Yes, this is the reason ..., agreed, i don't like the abbreviate, >>>>>> But there is already a 'MigrationState' type defined: >>>>>> >>>>> >>>>>> >>>>>> So, what about MigrationStatus ? ;) >>>>> >>>>> That would be fine with me. >>>>> >>>> >>>> Bad news, this name has also been used :( >>> >>> Hmm, how about 'MigrationStage' ? >> >> Er, thanks for your reply, i will follow the suggestion of Eric and Markus, >> Rename the original 'MigrationStatus' which is used internally-only. >> Keep using MigrationStatus in the new places. >> >> I will rename 'MigrationStatus' (only used for updating status of migration periodically) >> to 'MigrationDynamicStatus'. :) > > OK, Since it's only used in HMP you could rename it to HMPMigrationStatus. OK, Thanks. >>>> In hmp.c: >>>> >>>> typedef struct MigrationStatus >>>> { >>>> QEMUTimer *timer; >>>> Monitor *mon; >>>> bool is_block_migration; >>>> } MigrationStatus >>>> >>>> >>> -- >>> Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK >>> >>> . >>> >> >> >> > -- > Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK > > . >