core/cgroup: cache IO accounting data when pruning a cgroup
authorIvan Shapovalov <intelfx@intelfx.name>
Fri, 20 Sep 2024 11:01:51 +0000 (13:01 +0200)
committerIvan Shapovalov <intelfx@intelfx.name>
Mon, 23 Sep 2024 18:12:58 +0000 (20:12 +0200)
commit17bbdefd8c49617d7596bbf708c818a9773a9b44
tree5e02fab5a8c093f5604b8722e2a9427424ef1215
parenta0020ad84bb092fc72cde7dca5784a0a4e613fd7
core/cgroup: cache IO accounting data when pruning a cgroup

When removing a cgroup in unit_prune_cgroup(), read IO metrics to cache
them similar to the existing treatment of the CPU and memory usage data.

Note that we do not do this for the IP metrics as the firewall objects
are only destroyed in unit_free() and thus stay alive long enough to
be read out directly by all interested parties.

Fixes #26988.
src/core/cgroup.c