Re: improve log context annotations
Christoph Hellwig <[email protected]>
| Newsgroups | org.kernel.vger.linux-xfs |
|---|---|
| Message-ID | <[email protected]> |
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.