]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
storage: Prior to creating a volume, refresh the pool
authorJohn Ferlan <jferlan@redhat.com>
Wed, 30 Sep 2015 21:53:01 +0000 (17:53 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Mon, 5 Oct 2015 12:14:44 +0000 (08:14 -0400)
commitfdda37608a6e22406fbdfe4ac0c573a96a8d0417
tree134392b796f01081dd44e4bc5033114020807177
parentcb19cff468432e55366014658f405066ce06c2f2
storage: Prior to creating a volume, refresh the pool

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

Although perhaps bordering on a don't do that type scenario, if
someone creates a volume in a pool outside of libvirt, then uses that
same name to create a volume in the pool via libvirt, then the creation
will fail and in some cases cause the same name volume to be deleted.

This patch will refresh the pool just prior to checking whether the
named volume exists prior to creating the volume in the pool. While
it's still possible to have a timing window to create a file after the
check - at least we tried.  At that point, someone is being malicious.
src/storage/storage_driver.c