mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Matt Ochs <mochs@nvidia.com>
To: Jamie Nguyen <jamien@nvidia.com>
Cc: "almaz.alexandrovich@paragon-software.com"
	<almaz.alexandrovich@paragon-software.com>,
	"ntfs3@lists.linux.dev" <ntfs3@lists.linux.dev>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] fs/ntfs3: fix mount failure on 64K page-size kernels
Date: Thu, 14 May 2026 23:27:40 +0000	[thread overview]
Message-ID: <07B56930-040D-4DA2-A62A-D82CE7EBDECB@nvidia.com> (raw)
In-Reply-To: <20260428154549.11902-1-jamien@nvidia.com>

> On Apr 28, 2026, at 10:45, Jamie Nguyen <jamien@nvidia.com> wrote:
> 
> 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: b46acd6a6a62 ("fs/ntfs3: Add NTFS journal")
> Signed-off-by: Jamie Nguyen <jamien@nvidia.com>

Tested with 4k and 64k page sizes.

Tested-by: Matthew R. Ochs <mochs@nvidia.com>

      reply	other threads:[~2026-05-14 23:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-28 15:45 Jamie Nguyen
2026-05-14 23:27 ` Matt Ochs [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=07B56930-040D-4DA2-A62A-D82CE7EBDECB@nvidia.com \
    --to=mochs@nvidia.com \
    --cc=almaz.alexandrovich@paragon-software.com \
    --cc=jamien@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ntfs3@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®