xfs : fix build with trace enabled, improve error checks

- Remove referencing an undeclared identifier

    - Instead of an assert, just log an error for XFS V5 filesystems
      and don't try to mount them

Change-Id: I67303aff89b81a28b7333569fea8113b6020dc54
Reviewed-on: https://review.haiku-os.org/c/haiku/+/5204
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
This commit is contained in:
Mashijams 2022-04-13 23:00:56 +05:30 committed by Adrien Destugues
parent 1d2cf139a8
commit 2cecdeed2e
2 changed files with 4 additions and 2 deletions

View File

@ -301,7 +301,6 @@ Inode::GetNodefromTree(uint16& levelsInTree, Volume* volume,
ArrayDeleter<char> nodeDeleter(node);
TRACE("levels:(%d)\n", levelsInTree);
TRACE("Numrecs:(%d)\n", fRoot->NumRecords());
TreePointer* ptrToNode = GetPtrFromRoot(1);
uint64 fileSystemBlockNo = B_BENDIAN_TO_HOST_INT64(*ptrToNode);

View File

@ -25,7 +25,10 @@ XfsSuperBlock::IsValid() const
}
// Checking version 4 file system
ASSERT((Version() & 0x000f) == 4)
if ((Version() & 0x000f) > 4) {
ERROR("XFS version 5 or later is not yet supported");
return false;
}
return true;
}