]> xenbits.xensource.com Git - libvirt.git/commit
storage: Need to update freeExtent at delete primary partition
authorJohn Ferlan <jferlan@redhat.com>
Fri, 27 Mar 2015 15:04:22 +0000 (11:04 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Thu, 9 Apr 2015 23:04:18 +0000 (19:04 -0400)
commit1ffd82bb8919834c29c333d94af2a2235b27c17b
tree4807caed6d621e3b94f52aeb2445c461a6093b3f
parent1095230dee8e1bf184248b087695f45f867a4143
storage: Need to update freeExtent at delete primary partition

Commit id '471e1c4e' only considered updating the pool if the extended
partition was removed. As it turns out removing a primary partition
would also need to update the freeExtent list otherwise the following
sequence would fail (assuming a "fresh" disk pool for /dev/sde of 500M):

$  virsh pool-info disk-pool
...
Capacity:       509.88 MiB
Allocation:     0.00 B
Available:      509.84 MiB

$ virsh vol-create-as disk-pool sde1 --capacity 300M
$ virsh vol-delete --pool disk-pool sde1
$ virsh vol-create-as disk-pool sde1 --capacity 300M
error: Failed to create vol sde1
error: internal error: no large enough free extent

$

This patch will refresh the pool, rereading the partitions, and
return
src/storage/storage_backend_disk.c