Skip to content

Commit df7ec72

Browse files
Christoph Hellwigcmaiolino
authored andcommitted
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>
1 parent baed03e commit df7ec72

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

fs/xfs/xfs_log.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1180,9 +1180,11 @@ xfs_log_cover(
11801180
int error = 0;
11811181
bool need_covered;
11821182

1183-
ASSERT((xlog_cil_empty(mp->m_log) && xlog_iclogs_empty(mp->m_log) &&
1184-
!xfs_ail_min_lsn(mp->m_log->l_ailp)) ||
1185-
xlog_is_shutdown(mp->m_log));
1183+
if (!xlog_is_shutdown(mp->m_log)) {
1184+
ASSERT(xlog_cil_empty(mp->m_log));
1185+
ASSERT(xlog_iclogs_empty(mp->m_log));
1186+
ASSERT(!xfs_ail_min_lsn(mp->m_log->l_ailp));
1187+
}
11861188

11871189
if (!xfs_log_writable(mp))
11881190
return 0;

0 commit comments

Comments
 (0)