On Thu, Jun 09, 2016 at 11:13:56PM +0200, Iustin Pop wrote: > From: Iustin Pop <ius...@google.com> > > The function getInstDisksFromObj takes an Instance object, extracts its uuids, > and passes that to getInstDisks. This function then looks up the given UUID in > the configuration, retrieves the instance object associated with it, and > proceeds to retrieves the disks of that object. In effect, this call chain not > only does an unnecessary lookup, it also doesn't do what it claims, since it > will not actually use the passed object. In some cases, the callers of > getInstDisksFromObj were even looking the instance up before hand to pass it > to > the function… > > Drop the getInstDisks (by uuid/name version), since it's not used except by > getInstDisksFromObj, and move parts of its functionality directly to > getInstDisksFromObj, which is now renamed for simplicity. > > Signed-off-by: Iustin Pop <ius...@google.com>
Ugh. What a mess. Thanks for untangling it. LGTM.