Linux SCSI subsystem development
 help / color / mirror / Atom feed
From: John Garry <john.g.garry@oracle.com>
To: Bart Van Assche <bvanassche@acm.org>,
	"Martin K . Petersen" <martin.petersen@oracle.com>
Cc: Marco Elver <elver@google.com>,
	linux-scsi@vger.kernel.org,
	"James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
Subject: Re: [PATCH v5 3/6] scsi: core: Pass the SCSI host pointer directly to scanning functions
Date: Thu, 6 Aug 2026 10:02:04 +0100	[thread overview]
Message-ID: <96fabc42-6fa8-4d20-8c48-9435121bb34e@oracle.com> (raw)
In-Reply-To: <c4c76a09b8fccfbeee5f0f86578a66781f4aff4c.1785965531.git.bvanassche@acm.org>

On 05/08/2026 22:36, Bart Van Assche wrote:
> In the functions scsi_probe_and_add_lun(), scsi_sequential_lun_scan(),
> scsi_report_lun_scan() and __scsi_scan_target() the SCSI host pointer is
> derived from the SCSI target pointer. Pass the SCSI host pointer
> directly.
> 
> This patch prepares for enabling lock context analysis. With this patch
> applied, lock context annotations can refer to the SCSI host pointer
> directly, e.g. __must_hold(&shost->scan_mutex). Without this patch, the
> following annotation would have to be used:
> 	__must_hold(&dev_to_shost(starget->dev.parent)->scan_mutex)
> Additionally, in code that locks shost->scan_mutex, the following would
> have to be added to help the compiler understand that shost ==
> dev_to_shost(starget->dev.parent):
> 	__assume_ctx_lock(&dev_to_shost(starget->dev.parent)->scan_mutex);
> __assume_ctx_lock() statements should be avoided if there is a good
> alternative. Hence this patch. No functionality has been changed.
> 
> Signed-off-by: Bart Van Assche<bvanassche@acm.org>

Reviewed-by: John Garry <john.g.garry@oracle.com>

  reply	other threads:[~2026-08-06  9:02 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-05 21:36 [PATCH v5 0/6] Enable lock context analysis in the SCSI core and UFS driver Bart Van Assche
2026-08-05 21:36 ` [PATCH v5 1/6] ufs: core: Set task state before io_schedule_timeout() Bart Van Assche
2026-08-05 21:36 ` [PATCH v5 2/6] ufs: core: Enable lock context analysis Bart Van Assche
2026-08-05 21:36 ` [PATCH v5 3/6] scsi: core: Pass the SCSI host pointer directly to scanning functions Bart Van Assche
2026-08-06  9:02   ` John Garry [this message]
2026-08-05 21:36 ` [PATCH v5 4/6] scsi: core: Add lock context annotations Bart Van Assche
2026-08-05 22:00   ` sashiko-bot
2026-08-06  9:03   ` John Garry
2026-08-05 21:36 ` [PATCH v5 5/6] scsi: core: Protect host state changes with the host lock Bart Van Assche
2026-08-06  9:13   ` John Garry
2026-08-06 17:19     ` Bart Van Assche
2026-08-07  8:21       ` John Garry
2026-08-07 22:26     ` Bart Van Assche
2026-08-05 21:36 ` [PATCH v5 6/6] scsi: core: Enable lock context analysis Bart Van Assche
2026-08-06  9:16   ` John Garry
2026-08-06 16:58     ` Bart Van Assche
2026-08-06  9:26 ` [PATCH v5 0/6] Enable lock context analysis in the SCSI core and UFS driver John Garry

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=96fabc42-6fa8-4d20-8c48-9435121bb34e@oracle.com \
    --to=john.g.garry@oracle.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=bvanassche@acm.org \
    --cc=elver@google.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox