From: Christoph Hellwig <hch@lst.de>
To: Bart Van Assche <bvanassche@acm.org>
Cc: "Martin K . Petersen" <martin.petersen@oracle.com>,
linux-scsi@vger.kernel.org, John Garry <john.garry@linux.dev>,
Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH v5 7/8] scsi: scsi_debug: Improve lock context annotations
Date: Mon, 12 Oct 2026 14:24:57 +0200 [thread overview]
Message-ID: <20261012122457.GB31394@lst.de> (raw)
In-Reply-To: <e2ddd0bc90e0b5eb0b7eb72c0013d7e2e10be8fe.1791499174.git.bvanassche@acm.org>
On Thu, Oct 08, 2026 at 03:42:18PM -0700, Bart Van Assche wrote:
> static inline void
> sdeb_meta_read_lock(struct sdeb_store_info *sip)
> + __acquires_shared(&sip->macc_meta_lck)
> + __context_unsafe(/*conditional locking*/)
> {
> - if (sdebug_no_rwlock) {
> - if (sip)
> - __acquire(&sip->macc_meta_lck);
> - else
> - __acquire(&sdeb_fake_rw_lck);
> - } else {
> + if (!sdebug_no_rwlock) {
Why can't this be modelled using a __acquire variant? And if you
add __context_unsafe(/*conditional locking*/) please add a detailed
comment why that is needed, otherwise no one is going to understand
this in the future.
next prev parent reply other threads:[~2026-10-12 12:25 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-08 22:42 [PATCH v5 0/8] scsi_debug: Enable lock context analysis Bart Van Assche
2026-10-08 22:42 ` [PATCH v5 1/8] scsi: scsi_debug: Fix a locking bug in resp_write_same() Bart Van Assche
2026-10-08 22:42 ` [PATCH v5 2/8] scsi: scsi_debug: Split resp_write_same() Bart Van Assche
2026-10-08 22:52 ` sashiko-bot
2026-10-08 23:27 ` Bart Van Assche
2026-10-08 22:42 ` [PATCH v5 3/8] scsi: scsi_debug: Split corrupt_lbas() Bart Van Assche
2026-10-08 22:42 ` [PATCH v5 4/8] scsi: scsi_debug: Split resp_read_dt0() Bart Van Assche
2026-10-12 12:23 ` Christoph Hellwig
2026-10-12 17:18 ` John Garry
2026-10-08 22:42 ` [PATCH v5 5/8] scsi: scsi_debug: Split resp_write_dt0() Bart Van Assche
2026-10-08 22:42 ` [PATCH v5 6/8] scsi: scsi_debug: Split resp_atomic_write() Bart Van Assche
2026-10-08 22:42 ` [PATCH v5 7/8] scsi: scsi_debug: Improve lock context annotations Bart Van Assche
2026-10-12 12:24 ` Christoph Hellwig [this message]
2026-10-12 15:31 ` Bart Van Assche
2026-10-08 22:42 ` [PATCH v5 8/8] scsi: core: Enable lock context analysis for the scsi_debug driver 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=20261012122457.GB31394@lst.de \
--to=hch@lst.de \
--cc=bvanassche@acm.org \
--cc=john.garry@linux.dev \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.