Re: [PATCH] ntfs: mount read-only when mft records are smaller than the device block
Hyunchul Lee <[email protected]>
| Newsgroups | org.kernel.vger.linux-kernel,dev.linux.lists.ntfs |
|---|---|
| Message-ID | <CANFS6bb5BHY_XskcC2BoYQnB8iq0J0q90+r08xuANRoJNwHOeQ@mail.gmail.com> |
Hi Dennis, 2026년 8월 24일 (월) 오전 2:45, Dennis Tighe <[email protected]>님이 작성: > + 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