public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Kiran Patil <kiran.patil@intel.com>
To: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
Cc: Roland Dreier <roland@kernel.org>,
	linux-scsi@vger.kernel.org, target-devel@vger.kernel.org
Subject: Re: [PATCH] target: Make transport_lookup_cmd_lun() locking	IRQ-safe
Date: Wed, 15 Jun 2011 10:52:35 -0700	[thread overview]
Message-ID: <4DF8F163.6010103@intel.com> (raw)
In-Reply-To: <1308158714.20109.33.camel@haakon2.linux-iscsi.org>

On 6/15/2011 10:25 AM, Nicholas A. Bellinger wrote:
> On Wed, 2011-06-15 at 10:22 -0700, Roland Dreier wrote:
>> On Wed, Jun 15, 2011 at 10:06 AM, Nicholas A. Bellinger
>> <nab@linux-iscsi.org>  wrote:
>>> Btw, I think the same type of conversion may need to happen for
>>> transport_lookup_tmr_lun() as well, as I believe qla_target.c can call
>>> this directly from interrupt context in certain situations.
>> Yes, I think I sent another mail about this... the reason I didn't just
>> send a patch is that transport_lookup_tmr_lun() ends with:
>>
>>          spin_lock(&se_tmr->tmr_dev->se_tmr_lock);
>>          list_add_tail(&se_tmr->tmr_list,&se_tmr->tmr_dev->dev_tmr_list);
>>          spin_unlock(&se_tmr->tmr_dev->se_tmr_lock);
>>
>> and indeed se_tmr_lock looks like it is taken with bare spin_lock()
>> in lots of places.
>>
> Actually, it's only two places:  core_tmr_release_req() and
> core_tmr_lun_reset()
>
>> Presumably se_tmr_lock is taken from process context sometimes?
>> So we would need to convert all those spin_lock()s to spin_lock_irq()
>> (or irqsave I guess).
>>
> Correct, both of the above are only every called from process context,
> so a simple conversion to spin_lock_irq() for these two, and
> spin_lock_irqsave() in transport_lookup_tmr_lun() should by sufficent..
Likewise, we need to do same change in function 
"transport_get_lun_for_tmr", specifically for tmr_lock. Please correct 
me if I am missing anything.
> --nab
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
Thanks,
-- Kiran P.

  reply	other threads:[~2011-06-15 17:52 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-14  3:44 [PATCH] target: Make transport_lookup_cmd_lun() locking IRQ-safe Roland Dreier
2011-06-14  8:12 ` Christoph Hellwig
2011-06-14 15:58   ` Roland Dreier
2011-06-16 12:15     ` Christoph Hellwig
2011-06-15 16:58   ` Nicholas A. Bellinger
2011-06-16 12:18     ` Christoph Hellwig
2011-06-15 17:06 ` Nicholas A. Bellinger
2011-06-15 17:22   ` Roland Dreier
2011-06-15 17:25     ` Nicholas A. Bellinger
2011-06-15 17:52       ` Kiran Patil [this message]
2011-06-15 19:41         ` Roland Dreier
2011-06-15 20:53           ` Kiran Patil
2011-06-15 18:53       ` Roland Dreier

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=4DF8F163.6010103@intel.com \
    --to=kiran.patil@intel.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=nab@linux-iscsi.org \
    --cc=roland@kernel.org \
    --cc=target-devel@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