Re: [PATCH] ntfs: mount read-only when mft records are smaller than the device block
From: Christoph Hellwig
Date: Tue Aug 25 2026 - 01:47:41 EST
On Sun, Aug 23, 2026 at 10:45:48AM -0700, Dennis Tighe wrote:
> An mft record is written with a single bio of exactly mft_record_size
> bytes. bio_unaligned() rejects a bio whose size is not a multiple of the
> device's logical block size, so on a volume whose mft records are smaller
> than that block no mft record can be written at all.
>
> On 512n and 512e drives this is a non-issue; however, on 4Kn drives when
> the mft record (1k) is smaller than the logical block size (4k) mft
> writes begin to fail. At the same time, other writes that use all 4k
> will succeed leading to a corruption situation.
>
> This is a stopgap change that mounts as read-only. The longer term fix is
> to perform 4k writes on 4Kn devices when writing the mft; however, that's
> more involved.
Between this and your previous patch it is pretty clear that a sector
size > 512 bytes is not supported. So instead of adding predicted
band aids, reject this entirely for now and let someone who has the time
actually understand this for real fix it with a real design test plan
and all the others bits needed.