lxcfs/0012-lxcfs-proc_diskstats_read-func-obtain-data-from-blki.patch
wangkang101 c4b0d62eb5 update to 4.0.5
Signed-off-by: wangkang101 <873229877@qq.com>
2020-08-29 17:37:34 +08:00

31 lines
1.2 KiB
Diff

diff --git a/src/cgroups/cgfsng.c b/src/cgroups/cgfsng.c
index ca80a75..5ec0352 100644
--- a/src/cgroups/cgfsng.c
+++ b/src/cgroups/cgfsng.c
@@ -754,7 +754,11 @@ static int cgfsng_get_io(struct cgroup_ops *ops, const char *cgroup,
static int cgfsng_get_io_service_bytes(struct cgroup_ops *ops,
const char *cgroup, char **value)
{
- return cgfsng_get_io(ops, cgroup, "blkio.io_service_bytes_recursive", value);
+ int ret;
+ ret = cgfsng_get_io(ops, cgroup, "blkio.throttle.io_service_bytes_recursive", value);
+ if (ret < 0)
+ return cgfsng_get_io(ops, cgroup, "blkio.throttle.io_service_bytes", value);
+ return ret;
}
static int cgfsng_get_io_service_time(struct cgroup_ops *ops,
@@ -766,7 +770,11 @@ static int cgfsng_get_io_service_time(struct cgroup_ops *ops,
static int cgfsng_get_io_serviced(struct cgroup_ops *ops, const char *cgroup,
char **value)
{
- return cgfsng_get_io(ops, cgroup, "blkio.io_serviced_recursive", value);
+ int ret;
+ ret = cgfsng_get_io(ops, cgroup, "blkio.throttle.io_serviced_recursive", value);
+ if (ret < 0)
+ return cgfsng_get_io(ops, cgroup, "blkio.throttle.io_serviced", value);
+ return ret;
}
static int cgfsng_get_io_merged(struct cgroup_ops *ops, const char *cgroup,