From: Bart Van Assche <bvanassche@acm.org>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org,
"Christoph Hellwig" <hch@infradead.org>,
"Marco Elver" <elver@google.com>,
"Cc : Christoph Böhmwalder" <christoph.boehmwalder@linbit.com>,
"Bart Van Assche" <bvanassche@acm.org>
Subject: [PATCH 00/12] drbd: Enable lock context analysis
Date: Thu, 9 Jul 2026 14:35:21 -0700 [thread overview]
Message-ID: <cover.1783632330.git.bvanassche@acm.org> (raw)
Hi Jens,
This patch series enables compile-time lock context analysis for DRBD. The goal
of this series is to allow the compiler to statically verify that locks are
acquired and released correctly, helping to prevent deadlocks and race
conditions. This version addresses feedback received on the v1 series, improves
the annotations, and refactors some conditional locking paths to use the modern
cleanup.h guard infrastructure.
Changes since v1:
- Extracted the DRBD patches from a larger series. See also
"[PATCH 00/27] Enable lock context analysis in drivers/block/"
(https://lore.kernel.org/all/cover.1781042470.git.bvanassche@acm.org/).
- Fixed the indentation of the arguments of
drbd_nl_put_dump_connections_result().
- Combined the two drbd_req_state() patches into a single patch.
Please consider these patches for the next merge window.
Thanks,
Bart.
Bart Van Assche (12):
drbd: Remove "extern" from function declarations
drbd: Retain one _get_ldev_if_state() implementation
drbd: Remove the get_ldev_if_state() macro
drbd: Remove the 'local' lock context
drbd: Simplify the bitmap locking functions.
drbd: Move two declarations
drbd: Pass 'resource' directly to complete_conflicting_writes()
drbd: Split drbd_nl_get_connections_dumpit()
drbd: Make a mutex_unlock() call unconditional
drbd: Rework locking in drbd_req_state()
drbd: Annotate drbd_bm_{lock,unlock}()
drbd: Enable lock context analysis
drivers/block/drbd/Makefile | 3 +
drivers/block/drbd/drbd_bitmap.c | 43 +-
drivers/block/drbd/drbd_config.h | 2 +-
drivers/block/drbd/drbd_int.h | 594 +++++++++++++------------
drivers/block/drbd/drbd_interval.h | 11 +-
drivers/block/drbd/drbd_main.c | 41 +-
drivers/block/drbd/drbd_nl.c | 117 ++---
drivers/block/drbd/drbd_receiver.c | 27 +-
drivers/block/drbd/drbd_req.c | 10 +-
drivers/block/drbd/drbd_req.h | 24 +-
drivers/block/drbd/drbd_state.c | 49 +-
drivers/block/drbd/drbd_state.h | 35 +-
drivers/block/drbd/drbd_state_change.h | 32 +-
drivers/block/drbd/drbd_worker.c | 6 +-
14 files changed, 508 insertions(+), 486 deletions(-)
next reply other threads:[~2026-07-09 21:35 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-09 21:35 Bart Van Assche [this message]
2026-07-09 21:35 ` [PATCH 01/12] drbd: Remove "extern" from function declarations Bart Van Assche
2026-07-09 21:35 ` [PATCH 02/12] drbd: Retain one _get_ldev_if_state() implementation Bart Van Assche
2026-07-09 21:35 ` [PATCH 03/12] drbd: Remove the get_ldev_if_state() macro Bart Van Assche
2026-07-09 21:35 ` [PATCH 04/12] drbd: Remove the 'local' lock context Bart Van Assche
2026-07-09 21:35 ` [PATCH 05/12] drbd: Simplify the bitmap locking functions Bart Van Assche
2026-07-09 21:35 ` [PATCH 06/12] drbd: Move two declarations Bart Van Assche
2026-07-09 21:35 ` [PATCH 07/12] drbd: Pass 'resource' directly to complete_conflicting_writes() Bart Van Assche
2026-07-09 21:35 ` [PATCH 08/12] drbd: Split drbd_nl_get_connections_dumpit() Bart Van Assche
2026-07-09 21:35 ` [PATCH 09/12] drbd: Make a mutex_unlock() call unconditional Bart Van Assche
2026-07-09 21:35 ` [PATCH 10/12] drbd: Rework locking in drbd_req_state() Bart Van Assche
2026-07-09 21:35 ` [PATCH 11/12] drbd: Annotate drbd_bm_{lock,unlock}() Bart Van Assche
2026-07-09 21:35 ` [PATCH 12/12] drbd: Enable lock context analysis Bart Van Assche
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=cover.1783632330.git.bvanassche@acm.org \
--to=bvanassche@acm.org \
--cc=axboe@kernel.dk \
--cc=christoph.boehmwalder@linbit.com \
--cc=elver@google.com \
--cc=hch@infradead.org \
--cc=linux-block@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