On 11/04/2013 04:26 AM, Zhanghaoyu (A) wrote: > Avoid starting a new migration task while the previous one still exist. > > Signed-off-by: Zeng Junliang <zengjunli...@huawei.com> > ---
It's best to put comments here... > migration.c | 34 ++++++++++++++++++++++------------ > 1 files changed, 22 insertions(+), 12 deletions(-) ... > s->downtime = end_time - start_time; > -- 1.7.3.1.msysgit.0 BTW, while error happened during migration, need > the "erroring" state to avoid starting a new migration task while > current migration task still exist? And, do the new added migration > states need to be reported to libvirt? ...rather than here, since most mail clients will strip anything after the '-- ' separator output by git as if it were the signature, making it very difficult to reply to (as you can see, my mailer corrupted the formatting of your question due to how I forced it to reply to your signature). As to whether libvirt needs to know about the state, I'm not sure. Libvirt already has its own code to prevent concurrent attempts at migration, so theoretically libvirt should never trip the situation that you appear to be coding for. Perhaps providing more details in the commit message about how to actually get into the situation will make it easier to evaluate. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature