* [PATCH] xfs: improve the assert at the top of xfs_log_cover
@ 2026-01-09 15:18 Christoph Hellwig
2026-01-09 16:20 ` Darrick J. Wong
2026-01-13 13:10 ` Carlos Maiolino
0 siblings, 2 replies; 3+ messages in thread
From: Christoph Hellwig @ 2026-01-09 15:18 UTC (permalink / raw)
To: cem; +Cc: linux-xfs
Move each condition into a separate assert so that we can see which
on triggered.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
fs/xfs/xfs_log.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
index 511756429336..8ddd25970471 100644
--- a/fs/xfs/xfs_log.c
+++ b/fs/xfs/xfs_log.c
@@ -1138,9 +1138,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;
--
2.47.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] xfs: improve the assert at the top of xfs_log_cover
2026-01-09 15:18 [PATCH] xfs: improve the assert at the top of xfs_log_cover Christoph Hellwig
@ 2026-01-09 16:20 ` Darrick J. Wong
2026-01-13 13:10 ` Carlos Maiolino
1 sibling, 0 replies; 3+ messages in thread
From: Darrick J. Wong @ 2026-01-09 16:20 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: cem, linux-xfs
On Fri, Jan 09, 2026 at 04:18:21PM +0100, Christoph Hellwig wrote:
> Move each condition into a separate assert so that we can see which
> on triggered.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Yes that's really helpful for observability;
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
--D
> ---
> fs/xfs/xfs_log.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
> index 511756429336..8ddd25970471 100644
> --- a/fs/xfs/xfs_log.c
> +++ b/fs/xfs/xfs_log.c
> @@ -1138,9 +1138,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;
> --
> 2.47.3
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] xfs: improve the assert at the top of xfs_log_cover
2026-01-09 15:18 [PATCH] xfs: improve the assert at the top of xfs_log_cover Christoph Hellwig
2026-01-09 16:20 ` Darrick J. Wong
@ 2026-01-13 13:10 ` Carlos Maiolino
1 sibling, 0 replies; 3+ messages in thread
From: Carlos Maiolino @ 2026-01-13 13:10 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-xfs
On Fri, 09 Jan 2026 16:18:21 +0100, Christoph Hellwig wrote:
> Move each condition into a separate assert so that we can see which
> on triggered.
>
>
Applied to for-next, thanks!
[1/1] xfs: improve the assert at the top of xfs_log_cover
commit: df7ec7226fbe14d8654193933da81b2470cc5814
Best regards,
--
Carlos Maiolino <cem@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-01-13 13:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-09 15:18 [PATCH] xfs: improve the assert at the top of xfs_log_cover Christoph Hellwig
2026-01-09 16:20 ` Darrick J. Wong
2026-01-13 13:10 ` Carlos Maiolino
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox