linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Christie <michaelc@cs.wisc.edu>
To: Mike Christie <michaelc@cs.wisc.edu>
Cc: James.Smart@Emulex.Com, linux-scsi@vger.kernel.org
Subject: Re: [Comments Needed] scan vs remove_target deadlock
Date: Fri, 14 Apr 2006 12:58:52 -0500	[thread overview]
Message-ID: <443FE2DC.1050009@cs.wisc.edu> (raw)
In-Reply-To: <443FE05A.8090501@cs.wisc.edu>

Mike Christie wrote:
> James Smart wrote:
>>> Actually, maybe, I should not have brought this up as it could just be
>>> more of a workaround of the core problem. For FC in fc_user_scan() do
>>> you need some sort of lock around the rport loop?
>> Yes, I had noticed this as well. However, I don't think this is influencing
>> the deadlock.
>>
> 
> iscsi needed a lock too. And so we ended up just adding a semaphore
> around the addition and deletion and scanning of sessions. We also do

Do what can happen is that we go from

iscs_user_scan()
	grab iscsi lock around sessions
		scsi-ml scan()
			grab scsi scan lock


delete session
	grab iscsi lock
	remove session from sessions list

	scsi ml host/decice deletion
		grab scsi scan lock

and I am just saying I think we are duplicating some of the locking in
the transport class (due to some weirdness with the userspace
workarounds this is more or less true).

  reply	other threads:[~2006-04-14 17:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-10 18:25 [Comments Needed] scan vs remove_target deadlock James Smart
2006-04-11  4:03 ` Mike Christie
2006-04-13 15:14   ` James Smart
2006-04-14  4:23     ` Mike Christie
2006-04-14 10:19       ` James Smart
2006-04-14 17:48         ` Mike Christie
2006-04-14 17:58           ` Mike Christie [this message]
2006-04-11  8:53 ` Stefan Richter
2006-04-13 15:21   ` James Smart
2006-04-14 19:16     ` Stefan Richter
2006-04-18 20:09     ` Michael Reed
2006-04-18 21:35       ` James Smart
2006-04-19 15:34         ` Michael Reed

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=443FE2DC.1050009@cs.wisc.edu \
    --to=michaelc@cs.wisc.edu \
    --cc=James.Smart@Emulex.Com \
    --cc=linux-scsi@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;
as well as URLs for NNTP newsgroup(s).