Mount-v2

Revision as of 16:26, 25 January 2022 by Ptikhomirov (talk | contribs) (Mount-v2 CRIU algorithm which uses new MOVE_MOUNT_SET_GROUP kernel feature)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Mount-v2 CRIU algorithm

After we've merged MOVE_MOUNT_SET_GROUP feature to mainstream linux v5.15 torvalds/linux@9ffb14e now we can use it to restore sharing groups of mounts without the need to care about inheriting those groups when create mounts, we can just set sharing groups at later stage and before that construct mount trees with private mounts.

Restoring propagation right with conservative approach of both creating mounts and inheriting propagation groups looks like mission impossible task for us due to many problems:

  • Criu knows nothing about the initial history or order of mount tree creation;
  • Propagation can create tons of mounts;
  • Propagation may change parent mounts for existing mount tree;
  • "Mount trap" - propagation may cover initial mount;
  • "Non-uniform" propagation - there are different tricks with mount order and temporary children-"lock" mounts, which create mount trees which can't be restored without those tricks.
  • "Cross-namespace" sharing groups creation need to be ordered with mount namespace creation right.
  • Sharing groups vs mount tree order inversion can be very complex to restore and require multiple auxiliary. (see example below)
Mounts-inverse-order-example.gif

to be continued...