Tal Nisan has uploaded a new change for review. Change subject: core: Calculate total committed size of a storage domain correctly ......................................................................
core: Calculate total committed size of a storage domain correctly Bug-Url: https://bugzilla.redhat.com/1147246 Change-Id: I60a63917e4e0bc060109346759fe7412d3365970 Signed-off-by: Tal Nisan <tni...@redhat.com> --- M packaging/dbscripts/create_functions.sql 1 file changed, 8 insertions(+), 1 deletion(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/33/33433/1 diff --git a/packaging/dbscripts/create_functions.sql b/packaging/dbscripts/create_functions.sql index 72d2593..6595ef6 100644 --- a/packaging/dbscripts/create_functions.sql +++ b/packaging/dbscripts/create_functions.sql @@ -424,7 +424,14 @@ BEGIN mult := ( SELECT - COALESCE(SUM(images_storage_domain_view.size),0) + COALESCE(SUM( + CASE + WHEN (images_storage_domain_view.active = true + AND (images_storage_domain_view.entity_type IS NULL OR -- Floating disk + images_storage_domain_view.entity_type <> 'TEMPLATE')) -- or a VM + THEN images_storage_domain_view.size + ELSE images_storage_domain_view.actual_size + END),0) FROM images_storage_domain_view WHERE images_storage_domain_view.storage_id = v_storage_domain_id ); -- convert to GB from bytes -- To view, visit http://gerrit.ovirt.org/33433 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I60a63917e4e0bc060109346759fe7412d3365970 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: ovirt-engine-3.5 Gerrit-Owner: Tal Nisan <tni...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches