Re: [PATCH v2 0/8] Support Clang context analysis for ext2
From: Jan Kara
Date: Tue Aug 18 2026 - 08:48:45 EST
Hello!
On Tue 11-08-26 12:03:28, Timothy Day wrote:
> This description is mostly copied from v1:
>
> This series adds annotations for Clang's context analysis to ext2.
> Clang context analysis was recently added in a series by Marco
> Elver [1]. This allows the compiler to validate different
> locking patterns at compile time.
>
> This series enables context analysis, fixes pre-existing warnings,
> and adds new annotations. It is inspired by similar series in the
> block layer (NVMe host driver, for example [2]).
>
> I'm starting with ext2 since it's smaller and simpler compared to
> ext4/btrfs/etc. After ext2, I'd be interested in converting the
> other filesystems and infrastructure code in fs/. I think the ultimate
> goal would be to enable this by default across all of fs/.
>
> The series was built and tested with Clang 23 with
> CONFIG_WARN_CONTEXT_ANALYSIS enabled. I based on 7.2-rc7.
Thanks for the patches! They look good to me. Once the merge window is over
I'll queue them to my tree. The only thing I'm not fully sure is how much I
like the spinlock_init scoped guards - they looked quite confusing to me at
the first sight (as much as I understand the convenience, conceptually how
can initialization of a global lock be scoped?). I'll sleep over it, maybe
I'll change them to just spinlock_init() + scoped_guard for the lock itself
or maybe I'll get used to them. Anyway, no action on your side needed :).
Honza
--
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR