All of lore.kernel.org
 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, Jianzhou Zhao <luckd0g@163.com>,
	"James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>,
	Kashyap Desai <kashyap.desai@broadcom.com>,
	Sumit Saxena <sumit.saxena@broadcom.com>,
	Shivasharan S <shivasharan.srikanteshwara@broadcom.com>,
	Chandrakanth patil <chandrakanth.patil@broadcom.com>,
	Sathya Prakash Veerichetty <sathya.prakash@broadcom.com>,
	Sreekanth Reddy <sreekanth.reddy@broadcom.com>,
	Suganath Prabu Subramani <suganath-prabu.subramani@broadcom.com>,
	Ranjan Kumar <ranjan.kumar@broadcom.com>,
	Nilesh Javali <njavali@marvell.com>,
	Manish Rangankar <mrangankar@marvell.com>,
	GR-QLogic-Storage-Upstream@marvell.com
Subject: Re: [PATCH v4 5/6] scsi: core: Protect host state changes with the host lock
Date: Mon, 3 Aug 2026 18:01:02 +0100	[thread overview]
Message-ID: <7ea61c74-ed48-44cf-bfab-3f3a49b3d455@oracle.com> (raw)
In-Reply-To: <970cc36fb627fae64b4957954483c74cf8e59c87.1785534721.git.bvanassche@acm.org>

On 31/07/2026 22:52, Bart Van Assche wrote:
> @@ -411,8 +413,8 @@ struct Scsi_Host *scsi_host_alloc(const struct scsi_host_template *sht, int priv
>   		return NULL;
>   
>   	shost->host_lock = &shost->default_lock;
> -	spin_lock_init(shost->host_lock);
> -	shost->shost_state = SHOST_CREATED;
> +	scoped_guard(spinlock_init, shost->host_lock)

Please forgive my ignorance, but what does spinlock_init do here in 
relation to setting shost->shost_state?

Elsewhere we have scoped_guard(spinlock_irq, shost->host_lock) for 
protecting setting shost->shost_state and this makes sense to me. 
However I am curious what scoped_guard(spinlock_init, ...) does.

> +		shost->shost_state = SHOST_CREATED;


  parent reply	other threads:[~2026-08-03 17:01 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-31 21:52 [PATCH v4 0/6] Enable lock context analysis in the SCSI core and UFS driver Bart Van Assche
2026-07-31 21:52 ` [PATCH v4 1/6] ufs: core: Set task state before io_schedule_timeout() Bart Van Assche
2026-07-31 21:52   ` [PATCH v4 2/6] ufs: core: Enable lock context analysis Bart Van Assche
2026-08-03 12:38     ` Peter Wang (王信友)
2026-07-31 21:52   ` [PATCH v4 3/6] scsi: core: Pass the SCSI host pointer directly Bart Van Assche
2026-08-03 13:01     ` John Garry
2026-08-03 16:14       ` Bart Van Assche
2026-08-03 16:30         ` John Garry
2026-08-03 17:15           ` Bart Van Assche
2026-07-31 21:52   ` [PATCH v4 4/6] scsi: core: Add lock context annotations Bart Van Assche
2026-07-31 22:07     ` sashiko-bot
2026-07-31 21:52   ` [PATCH v4 5/6] scsi: core: Protect host state changes with the host lock Bart Van Assche
2026-07-31 22:05     ` sashiko-bot
2026-08-03 17:01     ` John Garry [this message]
2026-08-03 17:11       ` Bart Van Assche
2026-08-04  9:16         ` Marco Elver
2026-07-31 21:52   ` [PATCH v4 6/6] scsi: core: Enable lock context analysis Bart Van Assche
2026-07-31 22:05     ` sashiko-bot
2026-08-03 12:19   ` [PATCH v4 1/6] ufs: core: Set task state before io_schedule_timeout() Peter Wang (王信友)

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=7ea61c74-ed48-44cf-bfab-3f3a49b3d455@oracle.com \
    --to=john.g.garry@oracle.com \
    --cc=GR-QLogic-Storage-Upstream@marvell.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=bvanassche@acm.org \
    --cc=chandrakanth.patil@broadcom.com \
    --cc=elver@google.com \
    --cc=kashyap.desai@broadcom.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=luckd0g@163.com \
    --cc=martin.petersen@oracle.com \
    --cc=mrangankar@marvell.com \
    --cc=njavali@marvell.com \
    --cc=ranjan.kumar@broadcom.com \
    --cc=sathya.prakash@broadcom.com \
    --cc=shivasharan.srikanteshwara@broadcom.com \
    --cc=sreekanth.reddy@broadcom.com \
    --cc=suganath-prabu.subramani@broadcom.com \
    --cc=sumit.saxena@broadcom.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.