Skip to content

Conversation

@kolyshkin
Copy link
Contributor

Backport of #4765 to release-1.2. Original description follows.


This makes prepareCriuRestoreMounts more readable, smaller, and slightly faster.

Split to 4 commits for easier review.

Should not change behavior in any way.

Covered by existing tests in tests/integration/checkpoint.bats.

@kolyshkin kolyshkin added the backport/1.2-pr A backport PR to release-1.2 label Aug 28, 2025
@kolyshkin kolyshkin changed the base branch from main to release-1.2 August 28, 2025 02:21
Copy link
Member

@cyphar cyphar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cyphar cyphar added this to the 1.2.7 milestone Aug 28, 2025
@cyphar
Copy link
Member

cyphar commented Aug 28, 2025

I'm confused why the GHA jobs haven't been triggered? They triggered just fine a few hours ago...

1. Replace the big "if !" block with the if block and continue,
   simplifying the code flow.

2. Move comments closer to the code, improving readability.

This commit is best reviewed with --ignore-all-space or similar.

Signed-off-by: Kir Kolyshkin <[email protected]>
(cherry picked from commit 0c93d41)
Signed-off-by: Kir Kolyshkin <[email protected]>
It makes sense to ignore cgroup mounts much early in the code,
saving some time on unnecessary operations.

Signed-off-by: Kir Kolyshkin <[email protected]>
(cherry picked from commit b8aa548)
Signed-off-by: Kir Kolyshkin <[email protected]>
Since its code is now trivial, and it is only called from a single
place, it does not make sense to have it as a separate function.

Signed-off-by: Kir Kolyshkin <[email protected]>
(cherry picked from commit f91fbd3)
Signed-off-by: Kir Kolyshkin <[email protected]>
Instead of generating a list of tmpfs mount and have a special function
to check whether the path is in the list, let's go over the list of
mounts directly. This simplifies the code and improves readability.

Signed-off-by: Kir Kolyshkin <[email protected]>
(cherry picked from commit ce3cd42)
Signed-off-by: Kir Kolyshkin <[email protected]>
@lifubang
Copy link
Member

Manually retriggering GHA by rebasing, as it failed to run automatically.

@lifubang lifubang enabled auto-merge August 28, 2025 04:31
@lifubang lifubang merged commit daa7a74 into opencontainers:release-1.2 Aug 28, 2025
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/checkpoint-restore backport/1.2-pr A backport PR to release-1.2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants