All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Christie <michaelc@cs.wisc.edu>
To: David C Somayajulu <david.somayajulu@qlogic.com>
Cc: linux-scsi@vger.kernel.org, David Wagner <david.wagner@qlogic.com>
Subject: Re: [PATCH]qla4xxx:Add support for Async Message PDUs [REPOST with fixes]
Date: Thu, 01 May 2008 09:59:08 -0500	[thread overview]
Message-ID: <4819DABC.4070501@cs.wisc.edu> (raw)
In-Reply-To: <1209602162.20166.9.camel@d5102avq18960>

David C Somayajulu wrote:
> On Wed, 2008-04-30 at 14:36 -0500, Mike Christie wrote:
>> Mike Christie wrote:
>>> David C Somayajulu wrote:
>>>> +        }
>>>> +        if (sshdr.asc == 0x3f && sshdr.ascq == 0x0e) {
>>>> +            /* induce rescan */
>>>> +            iscsi_block_session(ddb_entry->sess);
>>>> +            iscsi_unblock_session(ddb_entry->sess);
>>>> +        }
>>> I think I was wrong off list. We could actually just call 
>>> iscsi_unblock_session, but we do not know the state of the session do 
>>> we? If we got a event that indicated the session was failed could we 
>>> have a block queued up and this would reverse it by accident?
>>>
>>> I was thinking that because qla4xxx_process_aen is called before this we 
>>> could just check the ddb state, but we can call iscsi_block_session from 
>>> the interrupt handler to queue up a block so I think that could race 
>>> with the unblock call here.
>> Maybe to handle the race we do not want to call qla4xxx_mark_device_busy 
>> when we get SCS_TIMEOUT. If we get a ddb aen then could we just wait for 
>> that and all those events would be serialized through the dpc thread?
>>
>> What does SCS_TIMEOUT mean?
> I think the driver on receiving the Async Message PDU of type
> ISCSI_ASYNC_MSG_SCSI_EVENT, should first retrieve the DDB state. If the
> session is still not active, it should block it. If the DDB state

You should not need to block it though. qla4xxx_process_aen will have 
done this already when it set the ddb state, wouldn't it? I am saying if 
the ddb state indicates that it is not active then the session should be 
in the blocked state by the time we get to handling the iscsi async event.


> indicates the session is active, then call iscsi_unblock_session() if
> rescan is needed. What do you think of this solution ?
> 
> SCS_TIMEOUT is generated when there is a transport layer timeout for one
> of the PDUs issued as result of an IOCB.
> 

Do you need some locking or something then? If the dpc thread is about 
to check the ddb state to handle the iscsi async pdu like we said above, 
then we get a SCS_TIMEOUT, could the dpc thread read the ddb state and 
see a good ddb state, then the SCS_TIMEOUT handling would set the state 
to DDB_STATE_MISSING and queue a block. The dpc thread would then queue 
a unblock early?


      reply	other threads:[~2008-05-01 14:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-18 20:44 [PATCH]qla4xxx:Add support for Async Message PDUs David C Somayajulu
2008-04-22 16:20 ` Mike Christie
2008-04-24 16:01   ` David C Somayajulu
2008-04-24 16:40     ` Mike Christie
2008-04-24 19:42       ` David C Somayajulu
2008-04-25 19:23       ` David C Somayajulu
2008-04-26 16:42         ` Mike Christie
2008-04-28 15:39           ` David C Somayajulu
2008-04-30 18:35           ` [PATCH]qla4xxx:Add support for Async Message PDUs [REPOST with fixes] David C Somayajulu
2008-04-30 19:23             ` Mike Christie
2008-04-30 19:36               ` Mike Christie
2008-05-01  0:36                 ` David C Somayajulu
2008-05-01 14:59                   ` Mike Christie [this message]

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=4819DABC.4070501@cs.wisc.edu \
    --to=michaelc@cs.wisc.edu \
    --cc=david.somayajulu@qlogic.com \
    --cc=david.wagner@qlogic.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 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.