Commit df7ec722 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Carlos Maiolino
Browse files

xfs: improve the assert at the top of xfs_log_cover



Move each condition into a separate assert so that we can see which
on triggered.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarDarrick J. Wong <djwong@kernel.org>
Signed-off-by: default avatarCarlos Maiolino <cem@kernel.org>
parent baed03ef
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -1180,9 +1180,11 @@ xfs_log_cover(
	int			error = 0;
	bool			need_covered;

	ASSERT((xlog_cil_empty(mp->m_log) && xlog_iclogs_empty(mp->m_log) &&
	        !xfs_ail_min_lsn(mp->m_log->l_ailp)) ||
		xlog_is_shutdown(mp->m_log));
	if (!xlog_is_shutdown(mp->m_log)) {
		ASSERT(xlog_cil_empty(mp->m_log));
		ASSERT(xlog_iclogs_empty(mp->m_log));
		ASSERT(!xfs_ail_min_lsn(mp->m_log->l_ailp));
	}

	if (!xfs_log_writable(mp))
		return 0;