cgroup-v2: make new field cg_set optional

The new field cg_set is currently marked as required which causes backward
compatibility problem when using newer CRIU version to restore dumped image
from older version. This commit makes this field optional and reworks the
logic to fallback to use cg_set from task_core when it is not in
thread_core.

Signed-off-by: Bui Quang Minh <minhquangbui99@gmail.com>
This commit is contained in:
Bui Quang Minh 2023-03-16 23:09:18 +07:00 committed by Andrei Vagin
parent 529f298913
commit 69befdde18
3 changed files with 11 additions and 5 deletions

View file

@ -106,7 +106,7 @@ message thread_core_entry {
optional string comm = 13;
optional uint64 blk_sigset_extended = 14;
optional rseq_entry rseq_entry = 15;
required uint32 cg_set = 16;
optional uint32 cg_set = 16;
}
message task_rlimits_entry {