]> xenbits.xensource.com Git - libvirt.git/commit
storage: Introduce storagePoolUpdateAllState function
authorErik Skultety <eskultet@redhat.com>
Mon, 16 Mar 2015 15:30:03 +0000 (16:30 +0100)
committerErik Skultety <eskultet@redhat.com>
Tue, 7 Apr 2015 14:22:40 +0000 (16:22 +0200)
commit2a31c5f030a14d85055dd8c40cf309995b09c112
treeb5510804e0f432a626ee5e71010846b1ba1e6d92
parenta9700771f5166bbe0112077d14b3b9b19276a85b
storage: Introduce storagePoolUpdateAllState function

The 'checkPool' callback was originally part of the storageDriverAutostart function,
but the pools need to be checked earlier during initialization phase,
otherwise we can't start a domain which mounts a volume after the
libvirtd daemon restarted. This is because qemuProcessReconnect is called
earlier than storageDriverAutostart. Therefore the 'checkPool' logic has been
moved to storagePoolUpdateAllState which is called inside storageDriverInitialize.

We also need a valid 'conn' reference to be able to execute 'refreshPool'
during initialization phase. Though it isn't available until storageDriverAutostart
all of our storage backends do ignore 'conn' pointer, except for RBD,
but RBD doesn't support 'checkPool' callback, so it's safe to pass
conn = NULL in this case.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1177733
src/storage/storage_driver.c