]> xenbits.xensource.com Git - libvirt.git/commit
storage: Don't assume storage pool exists for FC/SCSI refresh thread
authorJohn Ferlan <jferlan@redhat.com>
Mon, 2 Nov 2015 22:21:11 +0000 (17:21 -0500)
committerJohn Ferlan <jferlan@redhat.com>
Thu, 12 Nov 2015 11:30:33 +0000 (06:30 -0500)
commitd3fa510a759b180a2a87b11d9ed57e437d1914e1
treef8190049ea42605c3074fbdab74f67853574d716
parentc3afa6a9a3a0313172cdb586f54ebac5ab129d19
storage: Don't assume storage pool exists for FC/SCSI refresh thread

https://bugzilla.redhat.com/show_bug.cgi?id=1277781

The virStoragePoolFCRefreshThread had passed a pointer to the pool obj
in the virStoragePoolFCRefreshInfoPtr; however, we cannot assume that
the pool exists still since we don't keep the pool lock throughout
the duration of the thread.

Therefore, instead of passing the pool obj pointer, pass the UUID of
the pool and perform a lookup.  If found, then we can perform the
refresh using the locked pool obj pointer; otherwise, we just exit
the thread since the pool is now gone.
src/storage/storage_backend_scsi.c