Skip to content

[release-1.5 backport] libct: Enforce nr_inodes=2 to fix Focal mount errors#5355

Open
lifubang wants to merge 2 commits into
opencontainers:release-1.5from
lifubang:backport-5353-to-release-1.5
Open

[release-1.5 backport] libct: Enforce nr_inodes=2 to fix Focal mount errors#5355
lifubang wants to merge 2 commits into
opencontainers:release-1.5from
lifubang:backport-5353-to-release-1.5

Conversation

@lifubang

Copy link
Copy Markdown
Member

Backport of #5353 to release-1.5.

Cherry-picked from commits:

  • 6428976 (libct: Enforce nr_inodes=2 to fix Focal mount errors)
  • 67e6a11 (libct: fallback to legacy runc behavior for uncertain kernel compat)

lifubang added 2 commits June 29, 2026 16:42
On most kernels `nr_inodes=1` works fine. However, Ubuntu 20.04 (Focal) with
the official 5.4 kernel carries a private patch in mm/shmem.c that rejects
"nr_inodes<2", so let's keep `nr_inodes=2` here!

Signed-off-by: lifubang <lifubang@acmcoder.com>
(cherry picked from commit 6428976)
Signed-off-by: lifubang <lifubang@acmcoder.com>
We don't know whether some kernels will fail with "nr_blocks=1,nr_inodes=2",
so let's fall back to the old runc behavior of mounting a tmpfs without
these options.

Signed-off-by: lifubang <lifubang@acmcoder.com>
(cherry picked from commit 67e6a11)
Signed-off-by: lifubang <lifubang@acmcoder.com>
@lifubang lifubang added the backport/1.5-pr A backport PR to release-1.5 label Jun 29, 2026
@lifubang lifubang added this to the 1.5.1 milestone Jun 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/1.5-pr A backport PR to release-1.5

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant