]> xenbits.xensource.com Git - libvirt.git/commit
storage: Don't update volume objs list before we successfully create one
authorErik Skultety <eskultet@redhat.com>
Thu, 28 May 2015 15:00:01 +0000 (17:00 +0200)
committerErik Skultety <eskultet@redhat.com>
Tue, 2 Jun 2015 13:02:02 +0000 (15:02 +0200)
commit4749d82a8bb92b908fe7f30038d8b1ea3390384d
tree0d04599e0ee42e631b8bfb1a7e603947542a5ec9
parent152e315433f2ff69a5e91a2269812918da2ce091
storage: Don't update volume objs list before we successfully create one

We do update pool volume object list before we actually create any
volume. If buildVol fails, we then try to delete the volume in the
storage as well as remove it from our structures. The problem is, that
any backend that supports both buildVol and deleteVol would fail in this
case which is completely unnecessary. This patch causes the update to
take place after we know a volume has been created successfully, thus no
removal in case of a buildVol failure is necessary.

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