]> git.ipfire.org Git - thirdparty/linux.git/commit
ntfs: restore $MFT mirror contents check
authorDaeMyung Kang <charsyam@gmail.com>
Sun, 10 May 2026 17:11:14 +0000 (02:11 +0900)
committerNamjae Jeon <linkinjeon@kernel.org>
Mon, 11 May 2026 14:30:48 +0000 (23:30 +0900)
commit2beaa98b46c4cc90ed8a674f27a586d7f547bbe5
tree9f28ba568d411b71521fc45e2a2e7eec103d5b51
parent8c16c1c00167134f15ca8e9defdf38b1cac08c36
ntfs: restore $MFT mirror contents check

check_mft_mirror() still computes the number of bytes to validate in each
mirrored MFT record, but the actual comparison against $MFTMirr was dropped
when the superblock code was updated.

As a result, mount misses a stale or inconsistent $MFTMirr as long as both
records pass the structural baad-record checks. Restore the comparison and
log an error when the primary $MFT record differs from its mirror copy.

Returning false lets the existing mount error handling mark the volume as
having NTFS errors and, with on_errors=remount-ro, continue read-only. The
default on_errors=continue mount policy still allows the mount to proceed.

Fixes: 6251f0b0de7d ("ntfs: update super block operations")
Signed-off-by: DaeMyung Kang <charsyam@gmail.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
fs/ntfs/super.c