Skip to content

[release-1.4 backport] libct: retry with nr_inodes=2 to fix Focal mount errors - #5360

Merged
rata merged 1 commit into
opencontainers:release-1.4from
lifubang:backport-5358-to-release-1.4
Jul 3, 2026
Merged

rata merged 1 commit into
opencontainers:release-1.4from
lifubang:backport-5358-to-release-1.4

Conversation

@lifubang

@lifubang lifubang commented Jul 1, 2026 •

Copy link
Copy Markdown
Member

Backport of #5358 to release-1.4.

Cherry-picked from commit a5690a0.


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

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>
(cherry picked from commit a5690a0)
Signed-off-by: lifubang <lifubang@acmcoder.com>
@lifubang
lifubang force-pushed the backport-5358-to-release-1.4 branch from 585d380 to 5d91aac Compare July 1, 2026 16:01

@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

@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

@rata
rata merged commit b3be0ba into opencontainers:release-1.4 Jul 3, 2026
43 checks passed
@lifubang lifubang added the backport/1.4-pr A backport PR to release-1.4 label Jul 11, 2026
@lifubang lifubang added this to the 1.4.4 milestone Jul 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants