linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Smart <James.Smart@Emulex.Com>
To: Mike Christie <michaelc@cs.wisc.edu>
Cc: linux-scsi@vger.kernel.org
Subject: Re: [PATCH 4/4] fc class: use transport host byte values
Date: Thu, 15 Mar 2007 09:41:59 -0400	[thread overview]
Message-ID: <45F94D27.2090006@emulex.com> (raw)
In-Reply-To: <45F865D2.9020201@cs.wisc.edu>

Background:
   The states, in the transport are:
      event               state
     --------------------------------
       n/a                running
     lose connectivity    blocked
     fastfail timeout     still blocked, but with fastfail indicator
     dev_loss timeout     unblocked/removed

Question:

The chkready helper in the transport catches race conditions where the
block is being put in place, but queuecommand is running on another cpu,
thus returning DID_IMM_RETRY.

Your patch is updating chkready to look for the case when fastfail has
fired, and returning DID_TRANSPORT_FASTFAIL  ?  Why ?  The request
queue would be blocked so there should be no call to queuecommand that
would fall into this category - unless you are assuming that fastfail
timeout is so fast that it could fall into the same race condition as
blocked.

What I think is right is - DID_TRANSPORT_FASTFAIL only is returned by
the drivers on the i/o they kill as part of the terminate_io function
invoked by fastfail (or on the new block queue kill request I mentioned
an email ago).  There should be no reason to add it to chkready unless
you are trying to be absolutely protective for the above race conditions.
(and hey - it makes sense that if you involve the request queue to kill
all io at fast fail, there won't be any io to call queuecommand for, and
even if it did get through, it'll be marked for requeuing to the request
queue who will note the fastfail kill has been called and can immediately
give it back to the upper layers with the proper status).

-- james s



  reply	other threads:[~2007-03-15 13:42 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-14 19:52 RFC: add transport host byte values and common failure behavior michaelc
2007-03-14 19:52 ` [PATCH 1/4] iscsi class, qla4xxx and libiscsi: export iscsi session state in sysfs michaelc
2007-03-14 19:52   ` [PATCH 2/4] scsi: add transport host byte errors michaelc
2007-03-14 19:52     ` [PATCH 3/4] iscsi class, libiscsi and qla4xxx: convert to new transport host byte values michaelc
2007-03-14 19:52       ` [PATCH 4/4] fc class: use " michaelc
2007-03-14 20:11     ` [PATCH 2/4] scsi: add transport host byte errors Mike Christie
2007-03-14 21:14     ` Mike Christie
2007-03-15 13:41       ` James Smart [this message]
2007-03-15 14:26         ` [PATCH 4/4] fc class: use transport host byte values Mike Christie
2007-03-15 14:45           ` James Smart
2007-03-15 13:20     ` [PATCH 2/4] scsi: add transport host byte errors James Smart
2007-03-15 14:52       ` Mike Christie
2007-03-15 16:33         ` James Smart
2007-03-15 12:58   ` [PATCH 1/4] iscsi class, qla4xxx and libiscsi: export iscsi session state in sysfs James Smart
2007-03-15 14:20     ` Mike Christie

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=45F94D27.2090006@emulex.com \
    --to=james.smart@emulex.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=michaelc@cs.wisc.edu \
    /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).