1. 10 3月, 2009 2 次提交
  2. 07 3月, 2009 5 次提交
  3. 14 1月, 2009 1 次提交
  4. 06 1月, 2009 1 次提交
  5. 30 12月, 2008 11 次提交
  6. 21 11月, 2008 1 次提交
  7. 28 10月, 2008 1 次提交
  8. 21 10月, 2008 1 次提交
  9. 13 10月, 2008 8 次提交
    • M
      [SCSI] iscsi_tcp: return a descriptive error value during connection errors · 6f481e3c
      Mike Christie 提交于
      The segment->done functions return a iscsi error value which gives
      a lot more info than conn failed, so this patch has us return
      that value. I also add a new one for xmit failures.
      Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      6f481e3c
    • M
      [SCSI] libiscsi: rename host reset to target reset · 8e124525
      Mike Christie 提交于
      I had this in my patchset to add target reset support, but
      it got dropped due to patching conflicts. This initial patch
      just renames the function and users. We are actually just
      dropping the session, and so this does not have anything to do
      with the host exactly. It does for software iscsi because
      we allocate a host per session, but for cxgb3i this makes no
      sense.
      Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      8e124525
    • M
      [SCSI] iscsi class: fix endpoint id handling · 21536062
      Mike Christie 提交于
      Some endpoint code was using unsigned int and some
      was using uint64_t. This converts it all to uint64_t.
      Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      21536062
    • M
      [SCSI] libiscsi: Support drivers initiating session removal · e5bd7b54
      Mike Christie 提交于
      If the driver knows when hardware is removed like with cxgb3i,
      bnx2i, qla4xxx and iser then we will want to remove the sessions/devices
      that are bound to that device before removing the host.
      
      cxgb3i and in the future bnx2i will remove the host and that will
      remove all the sessions on the hba. iser can call iscsi_kill_session
      when it gets an event that indicates that a hca is removed.
      And when qla4xxx is hooked in to the lib (it is only hooked into
      the class right now) it can call iscsi remove host like the
      partial offload card drivers.
      Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      e5bd7b54
    • M
      [SCSI] fc class: Add support for new transport errors · f46e307d
      Mike Christie 提交于
      If the target is blocked and fast io fail tmo has not fired
      then we requeue with DID_TRANSPORT_DISRUPTED. Once that
      tmo fires we fail with DID_TRANSPORT_FAILFAST.
      
      v2
      - seperate from
      "fc class: unblock target after calling terminate callback"
      to make it easier to review.
      - Add JamesS's ack from list.
      v2
      - initial patch
      Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
      Acked-by: NJames Smart <James.Smart@emulex.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      f46e307d
    • M
      [SCSI] scsi: add transport host byte errors (v3) · a4dfaa6f
      Mike Christie 提交于
      Currently, if there is a transport problem the iscsi drivers will return
      outstanding commands (commands being exeucted by the driver/fw/hw) with
      DID_BUS_BUSY and block the session so no new commands can be queued.
      Commands that are caught between the failure handling and blocking are
      failed with DID_IMM_RETRY or one of the scsi ml queuecommand return values.
      When the recovery_timeout fires, the iscsi drivers then fail IO with
      DID_NO_CONNECT.
      
      For fcp, some drivers will fail some outstanding IO (disk but possibly not
      tape) with DID_BUS_BUSY or DID_ERROR or some other value that causes a retry
      and hits the scsi_error.c failfast check, block the rport, and commands
      caught in the race are failed with DID_IMM_RETRY. Other drivers, may
      hold onto all IO and wait for the terminate_rport_io or dev_loss_tmo_callbk
      to be called.
      
      The following patches attempt to unify what upper layers will see drivers
      like multipath can make a good guess. This relies on drivers being
      hooked into their transport class.
      
      This first patch just defines two new host byte errors so drivers can
      return the same value for when a rport/session is blocked and for
      when the fast_io_fail_tmo fires.
      
      The idea is that if the LLD/class detects a problem and is going to block
      a rport/session, then if the LLD wants or must return the command to scsi-ml,
      then it can return it with DID_TRANSPORT_DISRUPTED. This will requeue
      the IO into the same scsi queue it came from, until the fast io fail timer
      fires and the class decides what to do.
      
      When using multipath and the fast_io_fail_tmo fires then the class
      can fail commands with DID_TRANSPORT_FAILFAST or drivers can use
      DID_TRANSPORT_FAILFAST in their terminate_rport_io callbacks or
      the equivlent in iscsi if we ever implement more advanced recovery methods.
      A LLD, like lpfc, could continue to return DID_ERROR and then it will hit
      the normal failfast path, so drivers do not have fully be ported to
      work better. The point of the patches is that upper layers will
      not see a failure that could be recovered from while the rport/session is
      blocked until fast_io_fail_tmo/recovery_timeout fires.
      
      V3
      Remove some comments.
      V2
      Fixed patch/diff errors and renamed DID_TRANSPORT_BLOCKED to
      DID_TRANSPORT_DISRUPTED.
      V1
      initial patch.
      Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      a4dfaa6f
    • M
      [SCSI] fc class: unblock target after calling terminate callback (take 2) · fff9d40c
      Mike Christie 提交于
      When we block a rport and the driver implements the terminate
      callback we will fail IO that was running quickly. However
      IO that was in the scsi_device/block queue sits there until
      the dev_loss_tmo fires, and this can make it look like IO is
      lost because new IO will get executed but that IO stuck in
      the blocked queue sits there for some time longer.
      
      With this patch when the fast io fail tmo fires, we will
      fail the blocked IO and any new IO. This patch also allows
      all drivers to partially support the fast io fail tmo. If the
      terminate io callback is not implemented, we will still fail blocked
      IO and any new IO, so multipath can handle that.
      
      This patch also allows the fc and iscsi classes to implement the
      same behavior. The timers are just unfornately named differently.
      
      This patch also fixes the problem where drivers were unblocking
      the target in their terminate callback, which was needed for
      rport removal, but for fast io fail timeout it would cause
      IO to bounce arround the scsi/block layer and the LLD queuecommand.
      And it for drivers that could have IO stuck but did not have
      a terminate callback the unblock calls in the class will fix
      them.
      
      v2.
      - fix up bit setting style to meet JamesS's pref.
      - Broke out new host byte error changes to make it easier to read.
      - added JamesS's ack from list.
      v1
      - initial patch
      Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
      Acked-by: NJames Smart <James.Smart@emulex.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      fff9d40c
    • M
      [SCSI] Add helper code so transport classes/driver can control queueing (v3) · f0c0a376
      Mike Christie 提交于
      SCSI-ml manages the queueing limits for the device and host, but
      does not do so at the target level. However something something similar
      can come in userful when a driver is transitioning a transport object to
      the the blocked state, becuase at that time we do not want to queue
      io and we do not want the queuecommand to be called again.
      
      The patch adds code similar to the exisiting SCSI_ML_*BUSY handlers.
      You can now return SCSI_MLQUEUE_TARGET_BUSY when we hit
      a transport level queueing issue like the hw cannot allocate some
      resource at the iscsi session/connection level, or the target has temporarily
      closed or shrunk the queueing window, or if we are transitioning
      to the blocked state.
      
      bnx2i, when they rework their firmware according to netdev
      developers requests, will also need to be able to limit queueing at this
      level. bnx2i will hook into libiscsi, but will allocate a scsi host per
      netdevice/hba, so unlike pure software iscsi/iser which is allocating
      a host per session, it cannot set the scsi_host->can_queue and return
      SCSI_MLQUEUE_HOST_BUSY to reflect queueing limits on the transport.
      
      The iscsi class/driver can also set a scsi_target->can_queue value which
      reflects the max commands the driver/class can support. For iscsi this
      reflects the number of commands we can support for each session due to
      session/connection hw limits, driver limits, and to also reflect the
      session/targets's queueing window.
      
      Changes:
      v1 - initial patch.
      v2 - Fix scsi_run_queue handling of multiple blocked targets.
      Previously we would break from the main loop if a device was added back on
      the starved list. We now run over the list and check if any target is
      blocked.
      v3 - Rediff for scsi-misc.
      Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      f0c0a376
  10. 09 10月, 2008 1 次提交
  11. 04 10月, 2008 4 次提交
    • A
      [SCSI] fc_transport: Add an API to allow an LLD to create vports · a30c3f69
      Andrew Vasquez 提交于
      There's already a fc_vport_termintate() call exported by
      the transport.  This patch adds a symmetric call to the API to allow
      an NPIV-capable LLD to instantiate vports sans user intervention.
      
      Additional comments/updates:
      
         Re: scsi_fc_transport.txt
           Add a function prototype for fc_vport_terminate similar to what's
           done for fc_vport_create
      
         Re: fc_vport_create
           I recommend we pass the channel number in fc_vport_create rather
           than fixing it at zero.
      
           Also, ids->vport_type should be set to FC_PORTTYPE_NPIV prior to
           calling fc_vport_create. The comment is also meaningless.
      
      Added-by and
      Signed-off-by: NJames Smart <james.smart@emulex.com>
      Signed-off-by: NAndrew Vasquez <andrew.vasquez@qlogic.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      a30c3f69
    • J
      [SCSI] Update the SCSI state model to allow blocking in the created state · 6f4267e3
      James Bottomley 提交于
      Brian King <brking@linux.vnet.ibm.com> reported that fibre channel
      devices can oops during scanning if their ports block (because the
      device goes from CREATED -> BLOCK -> RUNNING rather than CREATED ->
      BLOCK -> CREATED).
      
      Fix this by adding a new state: CREATED_BLOCK which can only transition
      back to CREATED and disallow the CREATED -> BLOCK transition.  Now both
      the created and blocked states that the mid-layer recognises can include
      CREATED_BLOCK.
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      6f4267e3
    • J
      [SCSI] add inline functions for recognising created and blocked states · 0f1d87a2
      James Bottomley 提交于
      The created and blocked states are very shortly going to correspond to
      mixed sdev_state states.
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      0f1d87a2
    • J
      [SCSI] scsi_netlink: Add transport and LLD recieve and event support · 22447be7
      James Smart 提交于
      This patch adds scsi netlink recieve and event support for transport
      and scsi LLDD's.  It is a reimplementation of the patch posted last
      week by David Somayajulu.
      http://marc.info/?l=linux-scsi&m=121745486221819&w=2
      
      There are a few things done differently:
      
      - Transport support is included
      
      - Event delivery is included
      
      - The vendor message is now its own unique message type, considered
        part of the generic "SCSI Transport".
      
      - LLDD entry points are now registered rather than included in the
        scsi_host_template.
      
        Background: When I started to implement the event handler via template,
        I had to either: muck up scsi_add_host and scsi_remove_host;  or have
        the event handler search all possible shosts. Neither was acceptable.
        Moving to a registration solves this, and also limits the scope of
        the changes to something that could be backported to a distro without
        breaking an already-released-distro kabi. However, I admit it isn't
        as elegant, as the passing of the LLDD host template in the
        registration and the complexity around dynamic add/remove shows.
      
      - The receive path was augmented to require a unique identifier for
        the LLDD before the message was allowed to be handed off to the
        driver. Given how quickly very fatal errors occur if there's msg
        mismatches (which I saw in testing my own tools :), I believe this
        to be a very good thing. The id plays off the vendor id scheme already
        introduced for the vendor unique event messages used by FC.
        Additionally, the id use as the basis of the registration/deregistration.
      
      - Send assist functions, for both the transport and LLDDs are included.
      
      [fujita.tomonori@lab.ntt.co.jp: fix missing cast]
      Signed-off-by: NJames Smart <james.smart@emulex.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      22447be7
  12. 29 8月, 2008 1 次提交
  13. 07 8月, 2008 1 次提交
  14. 06 8月, 2008 1 次提交
  15. 05 8月, 2008 1 次提交