[release-1.5 backport] libct: retry with nr_inodes=2 to fix Focal mount errors#5359
Open
lifubang wants to merge 1 commit into
Open
[release-1.5 backport] libct: retry with nr_inodes=2 to fix Focal mount errors#5359lifubang wants to merge 1 commit into
lifubang wants to merge 1 commit into
Conversation
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>
20aefa9 to
6dc94f9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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=1works fine. However, Ubuntu 20.04 (Focal) withthe official 5.4 kernel carries a private patch in "mm/shmem.c" that rejects
nr_inodes<2, so retry withnr_inodes=2here.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