Re: [PATCH] ntfs: mount read-only when mft records are smaller than the device block
From: Hyunchul Lee
Date: Mon Aug 24 2026 - 05:38:28 EST
Hi Dennis,
2026년 8월 24일 (월) 오전 2:45, Dennis Tighe <dennis.tighe@xxxxxxxxx>님이 작성:
> + if (vol->mft_record_size < bdev_logical_block_size(sb->s_bdev)) {
> + if (!sb_rdonly(sb)) {
> + ntfs_error(sb,
> + "mft record size (%i) is smaller than the device logical block size (%u). Mft records cannot be written. Mounting read-only.",
> + vol->mft_record_size,
> + bdev_logical_block_size(sb->s_bdev));
> + sb->s_flags |= SB_RDONLY;
> + }
> + }
This check is performed only during the initial mount.
A file system can be remounted read-write through
ntfs_reconfigure().
Please add this check to ntfs_reconfigure().
> +
> /* Initialize the cluster and mft allocators. */
> ntfs_setup_allocators(vol);
> /* Setup remaining fields in the super block. */
> --
> 2.43.0
>
--
Thanks,
Hyunchul