[libvirt] [PATCH] Fix handling of disk backing stores with cgroups

Daniel P. Berrange berrange at redhat.com
Thu Apr 29 16:00:47 UTC 2010


On Wed, Apr 28, 2010 at 11:03:42AM -0600, Eric Blake wrote:
> On 04/28/2010 09:27 AM, Daniel P. Berrange wrote:
> > +                memset(&meta, 0, sizeof(meta));
> > +
> > +                ret = virStorageFileGetMetadata(path, &meta);
> > +
> > +                if (path != vm->def->disks[i]->src)
> > +                    VIR_FREE(path);
> > +                path = NULL;
> > +
> > +                if (ret < 0)
> > +                    goto cleanup;
> > +
> > +                path = meta.backingStore;
> 
> I had to go read virStorageFileGetMetadata to make sure there was no
> leak or double-free, but after a few minutes review, I'm convinced you
> did it right.
> 
> ACK.

I'm self-NACKing this. It misses the hotplug use case with the same problem


Daniel
-- 
|: Red Hat, Engineering, London    -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :|
|: http://autobuild.org        -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|




More information about the libvir-list mailing list