[libvirt] [PATCH v2 02/22] qemu: Introduce qemuBlockJobUpdate

Jiri Denemark jdenemar at redhat.com
Wed Jun 10 11:31:25 UTC 2015


On Wed, Jun 10, 2015 at 07:21:27 -0400, John Ferlan wrote:
> 
> 
> On 06/02/2015 08:34 AM, Jiri Denemark wrote:
> > The wrapper is useful for calling qemuBlockJobEventProcess with the
> > event details stored in disk's privateData, which is the most likely
> > usage of qemuBlockJobEventProcess.
> > 
> > Signed-off-by: Jiri Denemark <jdenemar at redhat.com>
> > ---
...
> > diff --git a/src/qemu/qemu_blockjob.c b/src/qemu/qemu_blockjob.c
> > index 098a43a..605c2a5 100644
> > --- a/src/qemu/qemu_blockjob.c
> > +++ b/src/qemu/qemu_blockjob.c
...
> > @@ -218,9 +243,7 @@ qemuBlockJobSyncEnd(virQEMUDriverPtr driver,
> >      if (diskPriv->blockJobSync && diskPriv->blockJobStatus != -1) {
> >          if (ret_status)
> >              *ret_status = diskPriv->blockJobStatus;
> > -        qemuBlockJobEventProcess(driver, vm, disk,
> > -                                 diskPriv->blockJobType,
> > -                                 diskPriv->blockJobStatus);
> > +        qemuBlockJobUpdate(driver, vm, disk);
> 
> ^^
> This doesn't get the returned status...

qemuBlockJobUpdate returns the original value of
diskPriv->blockJobStatus, which is already stored to *ret_status above.
Not to mention that one of the following patches will completely remove
ret_status from qemuBlockJobSyncEnd.

Jirka




More information about the libvir-list mailing list