Re: [PATCH] storage: Remove redundant refreshPool check

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

 



On 06/23/2016 03:32 AM, Martin Kletzander wrote:
> On Wed, Jun 22, 2016 at 08:29:35PM -0400, Cole Robinson wrote:
>> Every driver provides a refreshPool impl, and many other critical
>> places in the code unconditionally call it without checking if
>> it exists, so this check is pointless
> 
> I'm not entirely sure about it, but it'd be nicer if we actually checked
> that it's non-NULL.  Just to future-proof the code in case someone adds
> another backend.

Please check the other storage_driver.c code... every 'startPool' invocation
is followed by an uncondtional refreshPool call. If a driver is added without
a refreshPool impl, it will crash libvirtd from any avenue that the pool can
be started, so to support a driver like that will need much more work. This is
the one place in the code that checks for backend->refreshPool

- Cole

--
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]