'Return total over committed disk size for all instances.'

def _get_disk_over_committed_size_total(self):

    disk_over_committed_size = 0
    instance_domains = self._host.list_instance_domains(only_running=False)
    if (not instance_domains):
        return disk_over_committed_size
    instance_uuids = [dom.UUIDString() for dom in instance_domains]
    ctx = nova_context.get_admin_context()
    filters = {'uuid': instance_uuids}
    local_instance_list = objects.InstanceList.get_by_filters(ctx, filters, use_slave=True)
    local_instances = {inst.uuid: inst for inst in local_instance_list}
    bdms = objects.BlockDeviceMappingList.bdms_by_instance_uuid(ctx, instance_uuids)
    for dom in instance_domains:
        try:
            guest = libvirt_guest.Guest(dom)
            config = guest.get_config()
            block_device_info = None
            if ((guest.uuid in local_instances) and (bdms and (guest.uuid in bdms))):
                block_device_info = driver.get_block_device_info(local_instances[guest.uuid], bdms[guest.uuid])
            disk_infos = self._get_instance_disk_info_from_config(config, block_device_info)
            if (not disk_infos):
                continue
            for info in disk_infos:
                disk_over_committed_size += int(info['over_committed_disk_size'])
        except libvirt.libvirtError as ex:
            error_code = ex.get_error_code()
            LOG.warning('Error    from    libvirt    while    getting    description    of    %(instance_name)s:    [Error    Code    %(error_code)s]    %(ex)s', {'instance_name': guest.name, 'error_code': error_code, 'ex': ex})
        except OSError as e:
            if (e.errno in (errno.ENOENT, errno.ESTALE)):
                LOG.warning('Periodic    task    is    updating    the    host    stat,    it    is    trying    to    get    disk    %(i_name)s,    but    disk    file    was    removed    by    concurrent    operations    such    as    resize.', {'i_name': guest.name})
            elif (e.errno == errno.EACCES):
                LOG.warning('Periodic    task    is    updating    the    host    stat,    it    is    trying    to    get    disk    %(i_name)s,    but    access    is    denied.    It    is    most    likely    due    to    a    VM    that    exists    on    the    compute    node    but    is    not    managed    by    Nova.', {'i_name': guest.name})
            else:
                raise
        except exception.VolumeBDMPathNotFound as e:
            LOG.warning('Periodic    task    is    updating    the    host    stats,    it    is    trying    to    get    disk    info    for    %(i_name)s,    but    the    backing    volume    block    device    was    removed    by    concurrent    operations    such    as    resize.    Error:    %(error)s', {'i_name': guest.name, 'error': e})
        greenthread.sleep(0)
    return disk_over_committed_size
