Linux EXT4 FS development
 help / color / mirror / Atom feed
* [PATCH v1 0/9] Support Clang context analysis for ext2
@ 2026-07-12 16:56 Timothy Day
  2026-07-12 16:56 ` [PATCH v1 1/9] ext2: fix ext2_xattr_delete_inode() context analysis warning Timothy Day
                   ` (9 more replies)
  0 siblings, 10 replies; 22+ messages in thread
From: Timothy Day @ 2026-07-12 16:56 UTC (permalink / raw)
  To: linux-ext4
  Cc: Jan Kara, Marco Elver, linux-fsdevel, linux-kernel, Timothy Day

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-rc2 (since the
minimum Clang version was recently bumped to 23 in 7.2+ [3]).

I'd appreciate reviews and suggestions. I'm especially interested in
suggestions on how we can make this easier to enable for other
filesystems.

Thanks!

[1] https://lore.kernel.org/lkml/20251219154418.3592607-1-elver@google.com/
[2] https://lore.kernel.org/all/20260706141452.3008233-1-nilay@linux.ibm.com/
[3] https://lore.kernel.org/all/20260515124426.2227783-1-elver@google.com/

Timothy Day (9):
  ext2: fix ext2_xattr_delete_inode() context analysis warning
  ext2: mark s_next_generation as guarded by s_next_gen_lock
  ext2: annotate ext2_update_dynamic_rev() as requiring s_lock
  ext2: mark statfs overhead cache as guarded by s_lock
  ext2: mark s_mount_state as guarded by s_lock
  ext2: annotate ext2_init_block_alloc_info() as requiring
    truncate_mutex
  ext2: annotate block-mapping helpers as requiring truncate_mutex
  ext2: annotate s_rsv_window_root as requiring s_rsv_window_lock
  ext2: enabled context analysis support for ext2 filesystem

 fs/ext2/Makefile |  2 ++
 fs/ext2/balloc.c |  4 ++++
 fs/ext2/ext2.h   | 19 +++++++++++--------
 fs/ext2/inode.c  |  7 +++++++
 fs/ext2/super.c  | 18 +++++++++++++-----
 fs/ext2/xattr.c  |  4 +++-
 6 files changed, 40 insertions(+), 14 deletions(-)

-- 
2.39.5


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2026-07-14 22:52 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-12 16:56 [PATCH v1 0/9] Support Clang context analysis for ext2 Timothy Day
2026-07-12 16:56 ` [PATCH v1 1/9] ext2: fix ext2_xattr_delete_inode() context analysis warning Timothy Day
2026-07-13 14:32   ` Theodore Tso
2026-07-13 16:44     ` Timothy Day
2026-07-13 22:27       ` Marco Elver
2026-07-13 22:56         ` Marco Elver
2026-07-14 21:12           ` Timothy Day
2026-07-14 22:08             ` Marco Elver
2026-07-14 22:52               ` Marco Elver
2026-07-14  2:26       ` Theodore Tso
2026-07-14  4:17         ` Timothy Day
2026-07-14  4:49           ` Theodore Tso
2026-07-12 16:56 ` [PATCH v1 2/9] ext2: mark s_next_generation as guarded by s_next_gen_lock Timothy Day
2026-07-12 16:56 ` [PATCH v1 3/9] ext2: annotate ext2_update_dynamic_rev() as requiring s_lock Timothy Day
2026-07-12 16:56 ` [PATCH v1 4/9] ext2: mark statfs overhead cache as guarded by s_lock Timothy Day
2026-07-12 16:56 ` [PATCH v1 5/9] ext2: mark s_mount_state " Timothy Day
2026-07-12 16:56 ` [PATCH v1 6/9] ext2: annotate ext2_init_block_alloc_info() as requiring truncate_mutex Timothy Day
2026-07-12 16:56 ` [PATCH v1 7/9] ext2: annotate block-mapping helpers " Timothy Day
2026-07-12 16:56 ` [PATCH v1 8/9] ext2: annotate s_rsv_window_root as requiring s_rsv_window_lock Timothy Day
2026-07-12 16:56 ` [PATCH v1 9/9] ext2: enabled context analysis support for ext2 filesystem Timothy Day
2026-07-14 17:27 ` [PATCH v1 0/9] Support Clang context analysis for ext2 Jan Kara
2026-07-14 18:10   ` Timothy Day

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox