Re: [PATCH 2/6] Use virTimeMs when appropriate

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 13, 2011 at 16:15:39 +0800, Daniel Veillard wrote:
> On Tue, Jun 07, 2011 at 03:01:56PM +0200, Jiri Denemark wrote:
...
> > diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
> > index f7eaa1c..5d7494b 100644
> > --- a/src/qemu/qemu_migration.c
> > +++ b/src/qemu/qemu_migration.c
> > @@ -852,13 +849,9 @@ qemuMigrationUpdateJobStatus(struct qemud_driver *driver,
> >          return -1;
> >      }
> >  
> > -    if (gettimeofday(&now, NULL) < 0) {
> > -        priv->jobInfo.type = VIR_DOMAIN_JOB_FAILED;
> > -        virReportSystemError(errno, "%s",
> > -                             _("cannot get time of day"));
> > +    if (virTimeMs(&priv->jobInfo.timeElapsed) < 0)
> >          return -1;
> > -    }
> > -    priv->jobInfo.timeElapsed = timeval_to_ms(now) - priv->jobStart;
> > +    priv->jobInfo.timeElapsed -= priv->jobStart;
> >  
> >      switch (status) {
> >      case QEMU_MONITOR_MIGRATION_STATUS_INACTIVE:

Actually this chunk was wrong since it didn't set
    priv->jobInfo.type = VIR_DOMAIN_JOB_FAILED
if virTimeMs failed. So I fixed it

>   ACK, this cleans things up on top of previous patch and looks correct

and pushed. Thanks,

Jirka

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]