int unit_get_io_accounting(
Unit *u,
CGroupIOAccountingMetric metric,
- bool allow_cache,
uint64_t *ret) {
uint64_t raw[_CGROUP_IO_ACCOUNTING_METRIC_MAX];
if (!crt)
return -ENODATA;
- if (allow_cache && crt->io_accounting_last[metric] != UINT64_MAX)
- goto done;
-
r = unit_get_io_accounting_raw(u, crt, raw);
if (r == -ENODATA && crt->io_accounting_last[metric] != UINT64_MAX)
goto done;
int unit_get_memory_accounting(Unit *u, CGroupMemoryAccountingMetric metric, uint64_t *ret);
int unit_get_tasks_current(Unit *u, uint64_t *ret);
int unit_get_cpu_usage(Unit *u, nsec_t *ret);
-int unit_get_io_accounting(Unit *u, CGroupIOAccountingMetric metric, bool allow_cache, uint64_t *ret);
+int unit_get_io_accounting(Unit *u, CGroupIOAccountingMetric metric, uint64_t *ret);
int unit_get_ip_accounting(Unit *u, CGroupIPAccountingMetric metric, uint64_t *ret);
int unit_get_effective_limit(Unit *u, CGroupLimitType type, uint64_t *ret);
assert(property);
assert_se((metric = cgroup_io_accounting_metric_from_string(property)) >= 0);
- (void) unit_get_io_accounting(u, metric, /* allow_cache= */ false, &value);
+ (void) unit_get_io_accounting(u, metric, &value);
return sd_bus_message_append(reply, "t", value);
}
assert(io_fields[k].journal_field);
- (void) unit_get_io_accounting(u, k, k > 0, &value);
+ (void) unit_get_io_accounting(u, k, &value);
if (value == UINT64_MAX)
continue;