mirror of
https://git.code.sf.net/p/ntfs-3g/ntfs-3g.git
synced 2024-11-23 18:14:24 +08:00
Silenced fixup warnings when allocating a new MFT record
When creating a new MFT record, do not issue a warning if the current record has bad fixups. These warnings are meaningless, difficult to interpret and cause unneeded worries.
This commit is contained in:
parent
b6b100b588
commit
366c20e8a2
@ -1629,6 +1629,7 @@ ntfs_inode *ntfs_mft_record_alloc(ntfs_volume *vol, ntfs_inode *base_ni)
|
||||
int err;
|
||||
u32 usa_ofs;
|
||||
le16 seq_no, usn;
|
||||
BOOL oldwarn;
|
||||
|
||||
if (base_ni)
|
||||
ntfs_log_enter("Entering (allocating an extent mft record for "
|
||||
@ -1742,10 +1743,22 @@ found_free_rec:
|
||||
if (!m)
|
||||
goto undo_mftbmp_alloc;
|
||||
|
||||
/*
|
||||
* As this is allocating a new record, do not expect it to have
|
||||
* been initialized previously, so do not warn over bad fixups
|
||||
* (hence avoid warn flooding when an NTFS partition has been wiped).
|
||||
*/
|
||||
oldwarn = !NVolNoFixupWarn(vol);
|
||||
NVolSetNoFixupWarn(vol);
|
||||
if (ntfs_mft_record_read(vol, bit, m)) {
|
||||
if (oldwarn)
|
||||
NVolClearNoFixupWarn(vol);
|
||||
free(m);
|
||||
goto undo_mftbmp_alloc;
|
||||
}
|
||||
if (oldwarn)
|
||||
NVolClearNoFixupWarn(vol);
|
||||
|
||||
/* Sanity check that the mft record is really not in use. */
|
||||
if (ntfs_is_file_record(m->magic) && (m->flags & MFT_RECORD_IN_USE)) {
|
||||
ntfs_log_error("Inode %lld is used but it wasn't marked in "
|
||||
|
Loading…
Reference in New Issue
Block a user