[libvirt] [PATCH 06/25] qemu: blockjob: Register new and running blockjobs in the global table
Peter Krempa
pkrempa at redhat.com
Fri Jul 19 06:45:35 UTC 2019
On Fri, Jul 19, 2019 at 00:18:31 -0300, Julio Faracco wrote:
> Hi guys,
>
> Em sex, 12 de jul de 2019 às 13:06, Peter Krempa <pkrempa at redhat.com> escreveu:
> >
> > Add the job structure to the table when instantiating a new job and
> > remove it when it terminates/fails.
> >
> > Signed-off-by: Peter Krempa <pkrempa at redhat.com>
> > ---
> > src/qemu/qemu_blockjob.c | 29 ++++++++++++++++++++++-------
> > src/qemu/qemu_blockjob.h | 6 ++++--
> > src/qemu/qemu_driver.c | 16 ++++++++--------
> > src/qemu/qemu_migration.c | 4 ++--
> > src/qemu/qemu_process.c | 6 +++---
> > 5 files changed, 39 insertions(+), 22 deletions(-)
[...]
> > diff --git a/src/qemu/qemu_blockjob.h b/src/qemu/qemu_blockjob.h
> > index da529090ad..b7aaa86f4d 100644
> > --- a/src/qemu/qemu_blockjob.h
> > +++ b/src/qemu/qemu_blockjob.h
> > @@ -80,7 +80,8 @@ struct _qemuBlockJobData {
> >
> >
> > qemuBlockJobDataPtr
> > -qemuBlockJobDiskNew(virDomainDiskDefPtr disk,
> > +qemuBlockJobDiskNew(virDomainObjPtr vm,
> > + virDomainDiskDefPtr disk,
> > qemuBlockJobType type,
> > const char *jobname)
> > ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3);
>
> I think this patch is missing an attribute shift... Compilation is failing:
>
> diff --git a/src/qemu/qemu_blockjob.h b/src/qemu/qemu_blockjob.h
> index d07ab75c8b..b0d17963fd 100644
> --- a/src/qemu/qemu_blockjob.h
> +++ b/src/qemu/qemu_blockjob.h
> @@ -106,7 +106,7 @@ qemuBlockJobDiskNew(virDomainObjPtr vm,
> virDomainDiskDefPtr disk,
> qemuBlockJobType type,
> const char *jobname)
> - ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(3);
> + ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(4);
Oops, yes. I was contemplating whether to allow disk being NULL as the
internals allow it, but it does not seem to make sense so the above
change is correct.
I'll push a fix right away thanks for the report.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20190719/5acd7a31/attachment-0001.sig>
More information about the libvir-list
mailing list