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: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
This commit is contained in:
Christoph Hellwig 2026-01-09 16:18:21 +01:00 committed by Carlos Maiolino
parent baed03efe2
commit df7ec7226f

View File

@ -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;