Mount-v2
Revision as of 07:17, 26 January 2022 by Ptikhomirov (talk | contribs)
Mount-v2 CRIU algorithm
Introduction
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)
See my talks about it on Linux Plumbers Conference:
And here is the example of order inversion where multiple temporary mounts needed to achieve the result:
to be continued...