/* read the head block of the log and check the header  */
STATIC int xlog_header_check_mount(xfs_mount_t *mp, xlog_rec_header_t *head)
/* read the head block of the log and check the header  */
STATIC int xlog_header_check_mount(xfs_mount_t *mp, xlog_rec_header_t *head)
{
	ASSERT(be32_to_cpu(head->h_magicno) == XLOG_HEADER_MAGIC_NUM);
	if (uuid_is_nil(&head->h_fs_uuid)) {
		xlog_warn("XFS: nil uuid in log - IRIX style log");
	} else if (unlikely(!uuid_equal(&mp->m_sb.sb_uuid, &head->h_fs_uuid))) {
		xlog_warn("XFS: log has mismatched uuid - can't recover");
		xlog_header_check_dump(mp, head);
		XFS_ERROR_REPORT("xlog_header_check_mount",
				 XFS_ERRLEVEL_HIGH, mp);
		return XFS_ERROR(EFSCORRUPTED);
	}
	return 0;
}