Projects STRLCPY criu Commits 529f2989
🤬
  • cgroup-v2: make new field is_threaded optional

    The new field is_threaded 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 the skip fixing up threaded cgroup controllers if there
    is no information in dumped image.
    
    Signed-off-by: Bui Quang Minh <[email protected]>
  • Loading...
  • Bui Quang Minh committed with Andrei Vagin 1 year ago
    529f2989
    1 parent 6e681afb
  • ■ ■ ■ ■ ■
    criu/cgroup.c
    skipped 929 lines
    930 930   list_for_each_entry(cur, &cgroups, l) {
    931 931   cg_controller_entry__init(ce);
    932 932   
     933 + ce->has_is_threaded = true;
    933 934   ce->is_threaded = cur->is_threaded;
    934 935   ce->cnames = cur->controllers;
    935 936   ce->n_cnames = cur->n_controllers;
    skipped 1066 lines
    2002 2003   * process must be in this controller. Main thread has been
    2003 2004   * restored, so this thread is in this controller already.
    2004 2005   */
    2005  - if (!ctrl->is_threaded)
     2006 + if (!ctrl->has_is_threaded || !ctrl->is_threaded)
    2006 2007   continue;
    2007 2008   
    2008 2009   aux_off = ctrl_dir_and_opt(ctrl, aux, sizeof(aux), NULL, 0);
    skipped 270 lines
  • ■ ■ ■ ■
    images/cgroup.proto
    skipped 23 lines
    24 24  message cg_controller_entry {
    25 25   repeated string cnames = 1;
    26 26   repeated cgroup_dir_entry dirs = 2;
    27  - required bool is_threaded = 3;
     27 + optional bool is_threaded = 3;
    28 28  }
    29 29   
    30 30  message cg_member_entry {
    skipped 15 lines
Please wait...
Page is in error, reload to recover