Rejected updates of uninitialized MFTMirr
Reject updating uninitialized MFTMirr because it leads to endless recursions as updating the MFTMirr entry of MFT implies further updating MFTMirr. This is probably specific to ntfsfix, as mounts are normally rejected when MFTMirr does not match MFT.edge.strict_endians^2
parent
3f3b771cb0
commit
bb0168e56b
|
@ -172,6 +172,15 @@ int ntfs_mft_records_write(const ntfs_volume *vol, const MFT_REF mref,
|
|||
cnt = vol->mftmirr_size - m;
|
||||
if (cnt > count)
|
||||
cnt = count;
|
||||
if ((m + cnt) > vol->mftmirr_na->initialized_size >>
|
||||
vol->mft_record_size_bits) {
|
||||
errno = ESPIPE;
|
||||
ntfs_log_perror("Trying to write non-allocated mftmirr"
|
||||
" records (%lld > %lld)", (long long)m + cnt,
|
||||
(long long)vol->mftmirr_na->initialized_size >>
|
||||
vol->mft_record_size_bits);
|
||||
return -1;
|
||||
}
|
||||
bmirr = ntfs_malloc(cnt * vol->mft_record_size);
|
||||
if (!bmirr)
|
||||
return -1;
|
||||
|
|
Loading…
Reference in New Issue