Skip to content

libct: retry with nr_inodes=2 to fix Focal mount errors#5358

Merged
thaJeztah merged 1 commit into
opencontainers:mainfrom
lifubang:fix-nr-inodes-focal
Jul 1, 2026
Merged

libct: retry with nr_inodes=2 to fix Focal mount errors#5358
thaJeztah merged 1 commit into
opencontainers:mainfrom
lifubang:fix-nr-inodes-focal

Conversation

@lifubang

@lifubang lifubang commented Jul 1, 2026

Copy link
Copy Markdown
Member

Given that the majority of reviewers favor the 'nr_inodes=2' retry logic, we propose reverting #5353 and implementing the new approach:

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 retry with nr_inodes=2 here.
For reference, search for "case Opt_nr_inodes" in:
https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/focal/plain/mm/shmem.c?h=Ubuntu-5.4.0-216.236

Fix: #5348

@rata rata left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thanks!

@thaJeztah

Copy link
Copy Markdown
Member

I don't think we strictly need the revert commits; we can combine the patches in a single commit (can still mention that it "reverts" or "updates" the other ones

Given that the majority of reviewers favor the 'nr_inodes=2' retry logic,
we propose reverting opencontainers#5353 and implementing the new approach.

1. Revert "libct: add a fallback for nr_inodes=2"
This reverts commit 79ac577.

2. Revert "libct: Enforce nr_inodes=2 to fix Focal mount errors"
This reverts commit feea258.

3. The new approach:
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 retry with `nr_inodes=2` here.
For reference, search for "case Opt_nr_inodes" in:
https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/focal/plain/mm/shmem.c?h=Ubuntu-5.4.0-216.236

Signed-off-by: lifubang <lifubang@acmcoder.com>

@cpuguy83 cpuguy83 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

Validated on focal.

@thaJeztah thaJeztah left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@thaJeztah thaJeztah merged commit 6689c86 into opencontainers:main Jul 1, 2026
55 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Recent update to moby-runc causes execution failures on Ubuntu:Focal (20.04)

4 participants