[libvirt] [libvirt-glib] gobject: Also delete storage volume from its pool's list

Christophe Fergeau cfergeau at redhat.com
Wed Nov 21 10:43:09 UTC 2012

On Wed, Nov 21, 2012 at 09:30:02AM +0100, Michal Privoznik wrote:
> On 20.11.2012 19:51, Zeeshan Ali (Khattak) wrote:
> The latter one has been already checked as can be seen in context of the
> last chunk. The first one should not fail since it is us who inserted
> the value into volume->priv->vol;

Imo it's good to check that things are consistant with whatever assumptions
have to be true, if the hash gets corrupted somehow, we'll at least get a
warning that things are not in order. Most arguments to public/semi-public
APIs are sanity-checked this way.

> But assuming this function
> may be used somewhere else in the future these checks are actually
> correct - maybe my assumptions won't last then. Moreover, it doesn't
> hurt to check when playing around, right?

Well, it hurts in the sense that it has a runtime cost, which can be
non-negligible when these checks are run in a tight loop, but I don't think
these specific functions will be called that often.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20121121/8666947f/attachment-0001.sig>

More information about the libvir-list mailing list