Skip to content

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

Open
lifubang wants to merge 1 commit into
opencontainers:release-1.5from
lifubang:backport-5358-to-release-1.5
Open

[release-1.5 backport] libct: retry with nr_inodes=2 to fix Focal mount errors#5359
lifubang wants to merge 1 commit into
opencontainers:release-1.5from
lifubang:backport-5358-to-release-1.5

Conversation

@lifubang

@lifubang lifubang commented Jul 1, 2026

Copy link
Copy Markdown
Member

Backport of #5358 to release-1.5.

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.5 branch from 20aefa9 to 6dc94f9 Compare July 1, 2026 16:00

@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

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.

2 participants