1. 19 5月, 2014 6 次提交
  2. 07 4月, 2014 2 次提交
    • N
      target: Pass in transport supported PI at session initialization · e70beee7
      Nicholas Bellinger 提交于
      In order to support local WRITE_INSERT + READ_STRIP operations for
      non PI enabled fabrics, the fabric driver needs to be able signal
      what protection offload operations are supported.
      
      This is done at session initialization time so the modes can be
      signaled by individual se_wwn + se_portal_group endpoints, as well
      as optionally across different transports on the same endpoint.
      
      For iser-target, set TARGET_PROT_ALL if the underlying ib_device
      has already signaled PI offload support, and allow this to be
      exposed via a new iscsit_transport->iscsit_get_sup_prot_ops()
      callback.
      
      For loopback, set TARGET_PROT_ALL to signal SCSI initiator mode
      operation.
      
      For all other drivers, set TARGET_PROT_NORMAL to disable fabric
      level PI.
      
      Cc: Martin K. Petersen <martin.petersen@oracle.com>
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Cc: Quinn Tran <quinn.tran@qlogic.com>
      Cc: Giridhar Malavali <giridhar.malavali@qlogic.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      e70beee7
    • N
      target: Add TFO->abort_task for aborted task resources release · 131e6abc
      Nicholas Bellinger 提交于
      Now that TASK_ABORTED status is not generated for all cases by
      TMR ABORT_TASK + LUN_RESET, a new TFO->abort_task() caller is
      necessary in order to give fabric drivers a chance to unmap
      hardware / software resources before the se_cmd descriptor is
      released via the normal TFO->release_cmd() codepath.
      
      This patch adds TFO->aborted_task() in core_tmr_abort_task()
      in place of the original transport_send_task_abort(), and
      also updates all fabric drivers to implement this caller.
      
      The fabric drivers that include changes to perform cleanup
      via ->aborted_task() are:
      
        - iscsi-target
        - iser-target
        - srpt
        - tcm_qla2xxx
      
      The fabric drivers that currently set ->aborted_task() to
      NOPs are:
      
        - loopback
        - tcm_fc
        - usb-gadget
        - sbp-target
        - vhost-scsi
      
      For the latter five, there appears to be no additional cleanup
      required before invoking TFO->release_cmd() to release the
      se_cmd descriptor.
      
      v2 changes:
        - Move ->aborted_task() call into transport_cmd_finish_abort (Alex)
      
      Cc: Alex Leung <amleung21@yahoo.com>
      Cc: Mark Rustad <mark.d.rustad@intel.com>
      Cc: Roland Dreier <roland@kernel.org>
      Cc: Vu Pham <vu@mellanox.com>
      Cc: Chris Boot <bootc@bootc.net>
      Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Cc: Giridhar Malavali <giridhar.malavali@qlogic.com>
      Cc: Saurav Kashyap <saurav.kashyap@qlogic.com>
      Cc: Quinn Tran <quinn.tran@qlogic.com>
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      131e6abc
  3. 20 3月, 2014 1 次提交
  4. 16 3月, 2014 24 次提交
  5. 10 3月, 2014 2 次提交
  6. 25 2月, 2014 1 次提交
    • D
      qla2xxx: Fix kernel panic on selective retransmission request · 6f58c780
      Dr. Greg Wettstein 提交于
      A selective retransmission request (SRR) is a fibre-channel
      protocol control request which provides support for requesting
      retransmission of a data sequence in response to an issue such as
      frame loss or corruption.  These events are experienced
      infrequently in fibre-channel based networks which makes
      it difficult to test and assess codepaths which handle these
      events.
      
      We were fortunate enough, for some definition of fortunate, to
      have a metro-area single-mode SAN link which, at 10 GBPS
      sustained load levels, would consistently generate SRR's in
      a SCST based target implementation using our SCST/in-kernel
      Qlogic target interface driver.  In response to an SRR the
      in-kernel Qlogic target driver immediately panics resulting
      in a catastrophic storage failure for serviced initiators.
      
      The culprit was a debug statement in the qla_target.c file which
      does not verify that a pointer to the SCSI CDB is not null.
      The unchecked pointer dereference results in the kernel panic
      and resultant system failure.
      
      The other two references to the SCSI CDB by the SRR handling code
      use a ternary operator to verify a non-null pointer is being
      acted on.  This patch simply adds a similar test to the implicated
      debug statement.
      
      This patch is a candidate for any stable kernel being maintained
      since it addresses a potentially catastrophic event with
      minimal downside.
      Signed-off-by: NDr. Greg Wettstein <greg@enjellic.com>
      Cc: <stable@vger.kernel.org> #3.5+
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      6f58c780
  7. 21 2月, 2014 4 次提交
    • N
      tcm_qla2xxx: Fix NAA formatted name for NPIV WWPNs · 84197a36
      Nicholas Bellinger 提交于
      This patch fixes the NAA formatted name used by EVPD=0x83
      device identifer to reflect the proper NPIV enabled WWPN.
      
      Cc: Sawan Chandak <sawan.chandak@qlogic.com>
      Cc: Quinn Tran <quinn.tran@qlogic.com>
      Cc: Saurav Kashyap <saurav.kashyap@qlogic.com>
      Cc: Giridhar Malavali <giridhar.malavali@qlogic.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      84197a36
    • N
      tcm_qla2xxx: Perform configfs depend/undepend for base_tpg · 7474f52a
      Nicholas Bellinger 提交于
      This patch performs configfs_depend_item() during TPG enable for
      base_tpg (eg: non-NPIV) ports, and configfs_undepend_item() during
      TPG disable for base_tpg.
      
      This is done to ensure that any attempt to configfs rmdir a base_tpg
      with active NPIV ports will fail with -EBUSY, until all associated
      NPIV ports have been explicitly shutdown and base_tpg disabled.
      
      Note that the actual configfs_[un]depend_item() is done from seperate
      process context, as these are not intended to be called directly
      from configfs callbacks.
      
      Cc: Sawan Chandak <sawan.chandak@qlogic.com>
      Cc: Quinn Tran <quinn.tran@qlogic.com>
      Cc: Saurav Kashyap <saurav.kashyap@qlogic.com>
      Cc: Giridhar Malavali <giridhar.malavali@qlogic.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      7474f52a
    • N
      tcm_qla2xxx: Add NPIV specific enable/disable attribute logic · 394d62ba
      Nicholas Bellinger 提交于
      This patch adds seperate logic for NPIV specific enable/disable
      attribute logic, as NPIV vs. non-NPIV enable/disable ends up being
      different enough to warrent seperate logic for setting configfs
      tpg_group dependencies in the non-NPIV case.
      
      Cc: Sawan Chandak <sawan.chandak@qlogic.com>
      Cc: Quinn Tran <quinn.tran@qlogic.com>
      Cc: Saurav Kashyap <saurav.kashyap@qlogic.com>
      Cc: Giridhar Malavali <giridhar.malavali@qlogic.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      394d62ba
    • N
      qla2xxx: Check + fail when npiv_vports_inuse exists in shutdown · 3c231bda
      Nicholas Bellinger 提交于
      This patch adds an check to qlt_stop_phase1() to avoid shutdown
      when the base_vha contains a non-zero fc_host->npiv_vports_inuse
      count.
      
      This includes holding qla_tgt_mutex in qlt_stop_phase1() between
      the fc_host->npiv_vports_inuse check + setting of tgt->tgt_stop to
      avoid a possible race between qlt_lport_register() -> tcm_qla2xxx
      -> tcm_qla2xxx_lport_register_npiv_cb() calling fc_vport_create().
      
      Cc: Sawan Chandak <sawan.chandak@qlogic.com>
      Cc: Quinn Tran <quinn.tran@qlogic.com>
      Cc: Saurav Kashyap <saurav.kashyap@qlogic.com>
      Cc: Giridhar Malavali <giridhar.malavali@qlogic.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      3c231bda