Linux XFS filesystem development
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Dave Chinner <dgc@kernel.org>
Cc: Carlos Maiolino <cem@kernel.org>, Christoph Hellwig <hch@lst.de>,
	linux-xfs@vger.kernel.org
Subject: Re: improve log context annotations
Date: Wed, 22 Jul 2026 11:20:28 +0200	[thread overview]
Message-ID: <20260722092028.GA31991@lst.de> (raw)
In-Reply-To: <amAKAmIoTvoa6SY7@dread>

On Wed, Jul 22, 2026 at 10:08:34AM +1000, Dave Chinner wrote:
> Honestly, I'd prefer to kill the annotations and replace them with
> asserts that the lock is held so there's actual runtime validation
> that catches errors when they occur. These lock annotations don't
> tell you that the locking is correct, just that the function
> manipulates a lock.

Well, very strong disagreement here, as compile time annotations
are much more poweful as they are statically verified.

> The sparse annotations have always been more of an annoyance and
> reactive, because we only use them sporadically to suppress errors.

And the difference is that with the clang context annotations we
now have a reliably architected way to enforce them, which get
picked up all over the kernel.

The spare checks are gone, so there is no point in discussing them
any more.


      reply	other threads:[~2026-07-22  9:20 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-20  9:45 improve log context annotations Christoph Hellwig
2026-07-20  9:45 ` [PATCH 1/8] xfs: fix the lock annotation on xfs_iget_cache_hit Christoph Hellwig
2026-07-20  9:45 ` [PATCH 2/8] xfs: fix the lock annotation in xfs_extent_busy_update_extent Christoph Hellwig
2026-07-20  9:45 ` [PATCH 3/8] xfs: fix the lock annotation in xfs_mru_cache_lookup Christoph Hellwig
2026-07-20  9:45 ` [PATCH 4/8] xfs: improve lock annotations in the log code Christoph Hellwig
2026-07-20  9:45 ` [PATCH 5/8] xfs: add lock annotations to xfs_try_open_zone Christoph Hellwig
2026-07-20  9:45 ` [PATCH 6/8] xfs: add lock annotations to xlog_state_shutdown_callbacks Christoph Hellwig
2026-07-20  9:45 ` [PATCH 7/8] xfs: add a lock annotation to xlog_cil_push_background Christoph Hellwig
2026-07-20  9:45 ` [PATCH 8/8] xfs: add lock annotations to xfs_ail_delete* Christoph Hellwig
2026-07-21  9:16 ` improve log context annotations Carlos Maiolino
2026-07-21 15:01   ` Christoph Hellwig
2026-07-21 15:23     ` Darrick J. Wong
2026-07-21 15:27       ` Christoph Hellwig
2026-07-22  0:08   ` Dave Chinner
2026-07-22  9:20     ` Christoph Hellwig [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260722092028.GA31991@lst.de \
    --to=hch@lst.de \
    --cc=cem@kernel.org \
    --cc=dgc@kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox