[CRIU] [PATCH] cgroup: Print cgroup values being restored
Pavel Emelyanov
xemul at parallels.com
Wed Sep 23 08:15:07 PDT 2015
We have many complains about errors restoring cgroup props, so
print the exact values we restore _before_ doing this, not only
after successful restore :)
Signed-off-by: Pavel Emelyanov <xemul at parallels.com>
---
diff --git a/cgroup.c b/cgroup.c
index 7bdccf8..dbf47bd 100644
--- a/cgroup.c
+++ b/cgroup.c
@@ -960,6 +960,8 @@ static int restore_cgroup_prop(const CgroupPropEntry * cg_prop_entry_p,
return -1;
}
+ pr_info("Restoring cgroup property value [%s] to [%s]\n", cg_prop_entry_p->value, path);
+
cg = get_service_fd(CGROUP_YARD);
f = fopenat(cg, path, "w+");
if (!f) {
@@ -978,7 +980,6 @@ static int restore_cgroup_prop(const CgroupPropEntry * cg_prop_entry_p,
return -1;
}
- pr_info("Restored cgroup property value %s to %s\n", cg_prop_entry_p->value, path);
return 0;
}
@@ -1034,6 +1035,8 @@ static int restore_special_cpuset_props(char *paux, size_t off, CgroupDirEntry *
{
int i, j;
+ pr_info("Restore special cpuset props\n");
+
for (i = 0; special_cpuset_props[i]; i++) {
const char *name = special_cpuset_props[i];
More information about the CRIU
mailing list