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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Christophe

Attachment: pgphX4MzlG4VI.pgp
Description: PGP signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]