Stopped checking matches of MFTMirr against MFT at record 16

Since its 2017 edition, Windows 10 has stopped mirroring $MFT to the
full size of $MFTMirr leading to mounts of partitions with big clusters
to be rejected because of mismatches. With this patch, only 16 records
are checked, though mirroring is still done for all records in $MFTMirr.
This commit is contained in:
Jean-Pierre André 2017-12-22 11:29:00 +01:00
parent d99a376a90
commit 85e208176f
2 changed files with 7 additions and 1 deletions

View File

@ -959,7 +959,8 @@ ntfs_volume *ntfs_device_mount(struct ntfs_device *dev, ntfs_mount_flags flags)
vol->mftmirr_size = l;
}
ntfs_log_debug("Comparing $MFTMirr to $MFT...\n");
for (i = 0; i < vol->mftmirr_size; ++i) {
/* Windows 10 does not update the full $MFTMirr any more */
for (i = 0; (i < vol->mftmirr_size) && (i < FILE_first_user); ++i) {
MFT_RECORD *mrec, *mrec2;
const char *ESTR[12] = { "$MFT", "$MFTMirr", "$LogFile",
"$Volume", "$AttrDef", "root directory", "$Bitmap",

View File

@ -506,6 +506,11 @@ static int fix_mftmirr(ntfs_volume *vol)
ntfs_log_info("Comparing $MFTMirr to $MFT... ");
done = FALSE;
/*
* Since 2017, Windows 10 does not mirror to full $MFTMirr when
* using big clusters, and some records may be found different.
* Nevertheless chkdsk.exe mirrors it fully, so we do similarly.
*/
for (i = 0; i < vol->mftmirr_size; ++i) {
MFT_RECORD *mrec, *mrec2;
const char *ESTR[12] = { "$MFT", "$MFTMirr", "$LogFile",