]> git.ipfire.org Git - thirdparty/libvirt.git/commit
iscsi_direct: Reset pool capacity and allocation just before refresh
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 28 Feb 2019 11:02:06 +0000 (12:02 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 28 Feb 2019 12:55:38 +0000 (13:55 +0100)
commit290383cb2f864b738a34d4591dffd6114717fbdf
tree2f9c60e4cdf5ab85535618ad00aca00859c45490
parent33a07b8e4154b25f7119c0d2177983a5a1f1cae0
iscsi_direct: Reset pool capacity and allocation just before refresh

Jirka reported a bug that with every 'virsh pool-refresh' an
iscsi-direct pool would grow and grow. The problem is that
virISCSIDirectRefreshVol() only adds to def->capacity and
def->allocation but nothing clears it out to begin with.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
src/storage/storage_backend_iscsi_direct.c