[for 26.04_linux-nvidia-bos]: fs/ntfs3: fix mount failure on 64K page-size kernels#451
Closed
jamieNguyenNVIDIA wants to merge 1 commit into
Closed
Conversation
On 64K page-size kernels, mounting NTFS volumes smaller than ~650 MB fails with EINVAL. The issue is in log_replay(): the initial log page size probe uses PAGE_SIZE (65536) instead of DefaultLogPageSize (4096) when PAGE_SIZE exceeds DefaultLogPageSize * 2. This makes norm_file_page() require the $LogFile to be at least 50 * 65536 = 3.2 MB, but mkfs.ntfs creates a $LogFile of only ~1.5 MB for a typical 300 MB volume. norm_file_page() returns 0 and the mount is rejected with EINVAL. On 4K kernels the #if guard evaluates to true, so use_default=true is passed and DefaultLogPageSize (4096) is used, requiring only ~200 KB. This path works fine. Fix this by always passing use_default=true, which forces the initial probe to use DefaultLogPageSize regardless of the kernel's PAGE_SIZE. This is safe because, after reading the on-disk restart area, log_replay() already re-adjusts log->page_size to match the volume's actual sys_page_size. Also fix read_log_page() to pass log->page_size instead of PAGE_SIZE to ntfs_fix_post_read(), matching the actual buffer size. Fixes: b46acd6 ("fs/ntfs3: Add NTFS journal") Tested-by: Matthew R. Ochs <mochs@nvidia.com> Signed-off-by: Jamie Nguyen <jamien@nvidia.com> Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com> (cherry picked from commit b7a9125cac8645245d2473c6c0a50e338280ad23 linux-next) Signed-off-by: Jamie Nguyen <jamien@nvidia.com>
Contributor
PR Validation ReportPatchscan ✅ No Missing FixesAll cherry-picked commits checked — no missing upstream fixes found. PR Lint ❌ Errors foundDetailsChecking 1 commits...
Cherry-pick digest:
┌──────────────┬──────────────────────────────────────────────────────────────────┬────────────┬─────────┬───────────────────────────┐
│ Local │ Referenced upstream / Patch subject │ Patch-ID │ Subject │ SoB chain │
├──────────────┼──────────────────────────────────────────────────────────────────┼────────────┼─────────┼───────────────────────────┤
│ 1eeabccaa766 │ [SAUCE] fs/ntfs3: fix mount failure on 64k page-size kernels │ N/A │ N/A │ jamien, alexandr, jamien │
└──────────────┴──────────────────────────────────────────────────────────────────┴────────────┴─────────┴───────────────────────────┘
Lint results:
E: 1eeabccaa766 ("fs/ntfs3: fix mount failure on 64K page-size kerne"): not SAUCE/UBUNTU/Revert but has no upstream reference trailer (cherry picked from commit ... or backported from ...)
|
nvmochs
approved these changes
Jun 4, 2026
Collaborator
nvmochs
left a comment
There was a problem hiding this comment.
LGTM!
Acked-by: Matthew R. Ochs <mochs@nvidia.com>
Collaborator
Boro reviewSummaryNo issues found across the reviewed commits. Findings: no problems found Latest watcher review: open review Kernel deb build: successful (download debs, 4 files) Head: This comment is maintained by nv-pr-bot. It is updated when the GitHub watcher publishes a newer review. |
Collaborator
|
Looks good!
|
3f0b466 to
1eeabcc
Compare
Collaborator
|
|
Collaborator
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.
Summary
Backport linux-next commit
b7a9125cac8645245d2473c6c0a50e338280ad23to fix an
ntfs3mount failure on 64K page-size kernels.The original failure was reproduced by LTP
fsconfig01using the new mountAPI path:
fsopen("ntfs")fsconfig(FSCONFIG_CMD_CREATE)ntfs3driverOn 64K kernels, small NTFS volumes could fail with
EINVALbecauselog_replay()usedPAGE_SIZEfor the initial NTFS log page-size probe.For a 64K kernel this inflated the minimum accepted
$LogFilesize fromabout 200 KiB to about 3.2 MiB. A 300 MiB NTFS filesystem, such as the one
created by LTP
fsconfig01, has a smaller log file and was rejected.The fix makes the initial probe use the NTFS default log page size and makes
read_log_page()pass the actual log page size tontfs_fix_post_read().Backport Provenance
The patch cherry-picked cleanly from linux-next.
b7a9125cac8645245d2473c6c0a50e338280ad2326.04_linux-nvidia-boscommit:1eeabccaa766806f47ca672795ba092204876904Test Methodology
Imagentfs3.kofsconfig01from LTP20260130LTP_SINGLE_FS_TYPE=ntfsPAGE_SIZE=4096PAGE_SIZE=65536LTP Results
fsconfig01ntfsResult26.04_linux-nvidia-bos7.0.0-2008-nvidia-bosLTP_EXIT=026.04_linux-nvidia-bos7.0.0-2008-nvidia-bos-64kLTP_EXIT=0Validation Summary
The reported 64K
ntfs3failure is fixed on both target branches: LTPfsconfig01now passes forntfswithPAGE_SIZE=65536.The same LTP
fsconfig01ntfstest also passes on 4K kernels for bothtarget branches, so no regression was observed in the fixed
ntfs3code path.LP: https://bugs.launchpad.net/ubuntu/+source/linux-nvidia-7.0/+bug/2155467