[libvirt] [PATCH 1/2] qemu: Keep track of what disks are being migrated

Jiri Denemark jdenemar at redhat.com
Tue May 12 13:06:04 UTC 2015


On Tue, May 12, 2015 at 13:53:20 +0100, Daniel P. Berrange wrote:
> On Tue, May 12, 2015 at 02:37:09PM +0200, Jiri Denemark wrote:
> > Instead of redoing the same filtering over and over everytime we need to
> > walk through all disks which are being migrated.
> > 
> > Signed-off-by: Jiri Denemark <jdenemar at redhat.com>
> > ---
> >  src/conf/domain_conf.h    |  2 ++
> >  src/qemu/qemu_migration.c | 23 ++++++-----------------
> >  2 files changed, 8 insertions(+), 17 deletions(-)
> > 
> > diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
> > index 2cd105a7..391f49a 100644
> > --- a/src/conf/domain_conf.h
> > +++ b/src/conf/domain_conf.h
> > @@ -703,6 +703,8 @@ struct _virDomainDiskDef {
> >      int blockJobStatus; /* status of the finished block job */
> >      bool blockJobSync; /* the block job needs synchronized termination */
> >  
> > +    bool migrating; /* the disk is being migrated */
> 
> I'm not a huge fan of the fact that we're filling the generic
> virDomainDiskDef struct with ever more QEMU driver state fields.

Hmm, I think we could just introduce a per-disk priv where we would hide
all this stuff.

Jirka




More information about the libvir-list mailing list