1. 13 2月, 2014 1 次提交
    • N
      target: Fix 32-bit + CONFIG_LBDAF=n link error w/ sector_div · cdf55949
      Nicholas Bellinger 提交于
      This patch changes core_alua_state_lba_dependent() to use do_div()
      instead sector_div() to avoid the following link error on 32-bit
      with CONFIG_LBDAF=n as reported by Jim:
      
      buildlog-1391099072.txt-drivers/built-in.o: In function `target_alua_state_check':
      buildlog-1391099072.txt-(.text+0x928d93): undefined reference to `__umoddi3'
      buildlog-1391099072.txt:make: *** [vmlinux] Error 1 --
      buildlog-1391101753.txt-  CC      init/version.o
      buildlog-1391101753.txt-  LD      init/built-in.o
      buildlog-1391101753.txt-drivers/built-in.o: In function `core_alua_state_lba_dependent':
      buildlog-1391101753.txt-/home/jim/linux/drivers/target/target_core_alua.c:503: undefined reference to `__umoddi3'
      buildlog-1391101753.txt:make: *** [vmlinux] Error 1
      Reported-by: NJim Davis <jim.epost@gmail.com>
      Cc: Hannes Reinecke <hare@suse.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      cdf55949
  2. 10 1月, 2014 3 次提交
  3. 18 12月, 2013 4 次提交
  4. 21 11月, 2013 4 次提交
  5. 11 9月, 2013 3 次提交
    • N
      target: Update copyright ownership/year information to 2013 · 4c76251e
      Nicholas Bellinger 提交于
      Update copyright ownership/year information for target-core,
      loopback, iscsi-target, tcm_qla2xx, vhost and iser-target.
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      4c76251e
    • G
      target: Fix >= v3.9+ regression in PR APTPL + ALUA metadata write-out · f730f915
      Gera Kazakov 提交于
      This patch fixes a >= v3.9+ regression in __core_scsi3_write_aptpl_to_file()
      + core_alua_write_tpg_metadata() write-out, where a return value of -EIO was
      incorrectly being returned upon success.
      
      This bug was originally introduced in:
      
      commit 0e9b10a9
      Author: Al Viro <viro@zeniv.linux.org.uk>
      Date:   Sat Feb 23 15:22:43 2013 -0500
      
          target: writev() on single-element vector is pointless
      
      However, given that the return of core_scsi3_update_and_write_aptpl()
      was not used to determine if a command should be returned with non GOOD
      status, this bug was not being triggered in PR logic until v3.11-rc1 by
      commit:
      
      commit 459f213b
      Author: Andy Grover <agrover@redhat.com>
      Date:   Thu May 16 10:41:02 2013 -0700
      
          target: Allocate aptpl_buf inside update_and_write_aptpl()
      
      So, go ahead and only return -EIO if kernel_write() returned a
      negative value.
      Reported-by: NGera Kazakov <gkazakov@msn.com>
      Signed-off-by: NGera Kazakov <gkazakov@msn.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Andy Grover <agrover@redhat.com>
      Cc: stable@vger.kernel.org # 3.9+
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      f730f915
    • N
      target: Avoid non-existent tg_pt_gp_mem in target_alua_state_check · 89c12cc9
      Nicholas Bellinger 提交于
      This patch adds an check for a non-existent port->sep_alua_tg_pt_gp_mem
      within target_alua_state_check(), which is not present for internally
      dispatched EXTENDED_COPY WRITE I/O to the destination target port.
      
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Martin Petersen <martin.petersen@oracle.com>
      Cc: Chris Mason <chris.mason@fusionio.com>
      Cc: Roland Dreier <roland@purestorage.com>
      Cc: Zach Brown <zab@redhat.com>
      Cc: James Bottomley <JBottomley@Parallels.com>
      Cc: Nicholas Bellinger <nab@linux-iscsi.org>
      Signed-off-by: NNicholas Bellinger <nab@daterainc.com>
      89c12cc9
  6. 13 8月, 2013 1 次提交
  7. 11 4月, 2013 1 次提交
  8. 26 2月, 2013 1 次提交
  9. 11 1月, 2013 1 次提交
  10. 28 11月, 2012 1 次提交
  11. 07 11月, 2012 4 次提交
  12. 18 9月, 2012 1 次提交
  13. 08 9月, 2012 1 次提交
  14. 13 6月, 2012 1 次提交
  15. 17 5月, 2012 2 次提交
    • N
      target: Add MI_REPORT_TARGET_PGS ext. header + implict_trans_secs attribute · 5b9a4d72
      Nicholas Bellinger 提交于
      This patch adds support for ALUA MI_REPORT_TARGET_PGS extended header
      format defined within SPC-4.  It changes target core ALUA emulation logic
      within target_emulate_report_target_port_groups() to support both the
      extended and original length only header formats.
      
      It includes adding a new 'implict_trans_secs' attribute for each ALUA
      target port group to control the value returned to the application client
      for an recommended implict translation timeout in seconds.  By default
      this value is currently set to zero, and limited up to 255 by virtue of
      using a single byte in the extended header format.
      
      This value is used by target_emulate_report_target_port_groups() within
      the extended header logic to set IMPLICIT TRANSITION TIME as defined by
      spc4r30.
      
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Rob Evers <revers@redhat.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Roland Dreier <roland@purestorage.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      5b9a4d72
    • N
      target: Fix MAINTENANCE_IN service action CDB checks to use lower 5 bits · ba539743
      Nicholas Bellinger 提交于
      This patch fixes the MAINTENANCE_IN service action type checks to only
      look at the proper lower 5 bits of cdb byte 1.  This addresses the case
      where MI_REPORT_TARGET_PGS w/ extended header using the upper three bits of
      cdb byte 1 was not processed correctly in transport_generic_cmd_sequencer,
      as well as the three cases for standby, unavailable, and transition ALUA
      primary access state checks.
      
      Also add MAINTENANCE_IN to the excluded list in transport_generic_prepare_cdb()
      to prevent the PARAMETER DATA FORMAT bits from being cleared.
      
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Rob Evers <revers@redhat.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Roland Dreier <roland@purestorage.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      ba539743
  16. 07 5月, 2012 1 次提交
  17. 26 2月, 2012 1 次提交
  18. 18 1月, 2012 1 次提交
  19. 14 12月, 2011 2 次提交
  20. 06 12月, 2011 2 次提交
    • J
      target: remove unused struct fields · 5c73b678
      Jörn Engel 提交于
      Some are never used, some are set but never read, dev_hoq_count is
      incremented and decremented, but never read.
      Signed-off-by: NJoern Engel <joern@logfs.org>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      5c73b678
    • N
      target: Address legacy PYX_TRANSPORT_* return code breakage · 03e98c9e
      Nicholas Bellinger 提交于
      This patch removes legacy usage of PYX_TRANSPORT_* return codes in a number
      of locations and addresses cases where transport_generic_request_failure()
      was returning the incorrect sense upon CHECK_CONDITION status after the
      v3.1 converson to use errno return codes.
      
      This includes the conversion of transport_generic_request_failure() to
      process cmd->scsi_sense_reason and handle extra TCM_RESERVATION_CONFLICT
      before calling transport_send_check_condition_and_sense() to queue up
      response status.  It also drops PYX_TRANSPORT_OUT_OF_MEMORY_RESOURCES legacy
      usgae, and returns TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE w/ a response
      for these cases.
      
      transport_generic_allocate_tasks(), transport_generic_new_cmd(), backend
      SCF_SCSI_DATA_SG_IO_CDB ->do_task(), and emulated ->execute_task() have
      all been updated to set se_cmd->scsi_sense_reason and return errno codes
      universally upon failure.  This includes cmd->scsi_sense_reason assignment
      in target_core_alua.c, target_core_pr.c and target_core_cdb.c emulation code.
      
      Finally it updates fabric modules to remove the legacy usage, and for
      TFO->new_cmd_map() callers forwards return values outside of fabric code.
      iscsi-target has also been updated to remove a handful of special cases
      related to the cleanup and signaling QUEUE_FULL handling w/ ft_write_pending()
      
      (v2: Drop extra SCF_SCSI_CDB_EXCEPTION check during failure from
           transport_generic_new_cmd, and re-add missing task->task_error_status
           assignment in transport_complete_task)
      
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: stable@kernel.org
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      03e98c9e
  21. 04 11月, 2011 2 次提交
  22. 01 11月, 2011 1 次提交
  23. 24 10月, 2011 1 次提交
    • N
      target: Fix REPORT TARGET PORT GROUPS handling with small allocation length · 6b20fa9a
      Nicholas Bellinger 提交于
      This patch fixes a bug with the handling of REPORT TARGET PORT GROUPS
      containing a smaller allocation length than the payload requires causing
      memory writes beyond the end of the buffer.  This patch checks for the
      minimum 4 byte length for the response payload length, and also checks
      upon each loop of T10_ALUA(su_dev)->tg_pt_gps_list to ensure the Target
      port group and Target port descriptor list is able to fit into the
      remaining allocation length.
      
      If the response payload exceeds the allocation length length, then rd_len
      is still increments to indicate to the initiator that the payload has
      been truncated.
      Reported-by: NRoland Dreier <roland@purestorage.com>
      Cc: stable@kernel.org
      Signed-off-by: NNicholas Bellinger <nab@risingtidesystems.com>
      6b20fa9a