1. 24 10月, 2011 9 次提交
  2. 23 8月, 2011 1 次提交
    • N
      target: Make standard INQUIRY return 'not connected' for tpg_virt_lun0 · 052605c6
      Nicholas Bellinger 提交于
      This patch changes target_emulate_inquiry_std() to set the 'not connected'
      (0x35) bit in standard INQUIRY response data when we are processing a
      request to a virtual LUN=0 mapping from struct se_device *g_lun0_dev that
      have been setup for us in transport_lookup_cmd_lun().
      
      This addresses an issue where qla2xxx FC clients need to be able
      to create demo-mode I_T FC Nexuses by default, but should not be
      exposing the default set of TPG LUNs to all FC clients.  This includes
      adding an new optional target_core_fabric_ops->tpg_check_demo_mode_login_only()
      caller to allow demo_mode nexuses to skip the old default of bulding
      a demo-mode MappedLUNs list via core_tpg_add_node_to_devs().
      
      (roland: Add missing tpg_check_demo_mode_login_only check in core_dev_add_lun)
      Reported-by: NRoland Dreier <roland@purestorage.com>
      Cc: Andrew Vasquez <andrew.vasquez@qlogic.com>
      Signed-off-by: NNicholas Bellinger <nab@risingtidesystems.com>
      052605c6
  3. 22 7月, 2011 19 次提交
    • N
      target: Bump version to v4.1.0-rc1-ml · fa495159
      Nicholas Bellinger 提交于
      This patch bumps the target core version to v4.1.0-rc1 now that we are
      in sync with upstream lio-core-2.6.git/master
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      fa495159
    • A
      target: remove custom hex2bin() implementation · 11650b85
      Andy Shevchenko 提交于
      This patch drops transport_asciihex_to_binaryhex() in favor of proper
      hex2bin usage from include/linux/kernel.h:hex2bin()
      Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      11650b85
    • N
      target: Update QUEUE ALGORITHM MODIFIER control page default · 5de619a3
      Nicholas Bellinger 提交于
      This patch adds the default 'Unrestricted reordering allowed' for SCSI
      control mode page QUEUE ALGORITHM MODIFIER on a per se_device basis in
      target_modesense_control() following spc4r23.  This includes a new
      emuluate_rest_reord configfs attribute that currently (only) accepts
      zero to signal 'Unrestricted reordering allowed' in control mode page
      usage by the backend target device.
      Reported-by: NRoland Dreier <roland@purestorage.com>
      Signed-off-by: NNicholas Bellinger <nab@risingtidesystems.com>
      5de619a3
    • N
      target: ->map_task_SG conversion to ->map_control_SG and ->map_data_SG · 1d20bb61
      Nicholas Bellinger 提交于
      This patch breaks up the ->map_task_SG() backend call into two seperate
      ->map_control_SG() and ->map_data_SG() in order to better address
      IBLOCK and pSCSI.  IBLOCK only allocates bios for ->map_data_SG(), and
      pSCSI will allocate a struct request for both cases.
      
      This patch fixes incorrect usage of ->map_task_SG() for all se_cmd descriptors
      in transport_generic_new_cmd() by moving the call into it's proper location
      directly inside of transport_allocate_data_tasks()
      Reported-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      1d20bb61
    • A
      target: Follow up core updates from AGrover and HCH (round 4) · 6708bb27
      Andy Grover 提交于
      This patch contains the squashed version of forth round series cleanups
      from Andy and Christoph following the post heavy lifting in the preceeding:
      'Eliminate usage of struct se_mem' and 'Make all control CDBs scatter-gather'
      changes.  This also includes a conversion of target core and the v3.0
      mainline fabric modules (loopback and tcm_fc) to use pr_debug and the
      CONFIG_DYNAMIC_DEBUG infrastructure!
      
      These have been squashed into this third and final round for v3.1.
      
      target: Remove ifdeffed code in t_g_process_write
      target: Remove direct ramdisk code
      target: Rename task_sg_num to task_sg_nents
      target: Remove custom debug macros for pr_debug. Use pr_err().
      target: Remove custom debug macros in mainline fabrics
      target: Set WSNZ=1 in block limits VPD. Abort if WRITE_SAME sectors = 0
      target: Remove transport do_se_mem_map callback
      target: Further simplify transport_free_pages
      target: Redo task allocation return value handling
      target: Remove extra parentheses
      target: change alloc_task call to take *cdb, not *cmd
      
      (nab: Fix bogus struct file assignments in fd_do_readv and fd_do_writev)
      Signed-off-by: NAndy Grover <agrover@redhat.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      6708bb27
    • A
      target: Eliminate usage of struct se_mem · ec98f782
      Andy Grover 提交于
      Both backstores and fabrics use arrays of struct scatterlist to describe
      data buffers. However TCM used struct se_mems, basically a linked list
      of scatterlist entries. We are able to simplify the code by eliminating
      this intermediate data structure and just using struct scatterlist[]
      throughout.
      
      Also, moved attachment of task to cmd out of transport_generic_get_task
      and into allocate_control_task and allocate_data_tasks. The reasoning
      is that it's nonintuitive that get_task should automatically add it to
      the cmd's task list -- it should just return an allocated, initialized
      task. That's all it should do, based on the function's name, so either the
      function shouldn't do it, or the name should change to encapsulate the
      entire essence of what it does.
      
      (nab: Fix compile warnings in tcm_fc, and make transport_kmap_first_data_page
       honor sg->offset for SGLs from contigious memory with TCM_Loop, and
       fix control se_cmd descriptor memory leak)
      Signed-off-by: NAndy Grover <agrover@redhat.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      ec98f782
    • A
      target: Pass 2nd param of transport_split_cdb by value · 3a867205
      Andy Grover 提交于
      Since sectors is not modified, it's more straightforward to do this.
      Signed-off-by: NAndy Grover <agrover@redhat.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      3a867205
    • A
      target: Enforce 1 page max for control cdb buffer sizes · d0229ae3
      Andy Grover 提交于
      Due to all cdbs' data buffers being referenced by scatterlists, buffers
      of more than a page are not contiguous. Instead of handling this in all
      control command handlers, we may be able to get away with just limiting
      control cdb data buffers to one page. The only control CDBs we handle that
      have potentially large data buffers are REPORT LUNS and UNMAP, so if we
      didn't want to live with this limitation, they would need to be modified
      to walk the pages in the data buffer's sgl.
      Signed-off-by: NAndy Grover <agrover@redhat.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      d0229ae3
    • A
      target: Make all control CDBs scatter-gather · 05d1c7c0
      Andy Grover 提交于
      Previously, some control CDBs did not allocate memory in pages for their
      data buffer, but just did a kmalloc. This patch makes all cdbs allocate
      pages.
      
      This has the benefit of streamlining some paths that had to behave
      differently when we used two allocation methods. The downside is that
      all accesses to the data buffer need to kmap it before use, and need to
      handle data in page-sized chunks if more than a page is needed for a given
      command's data buffer.
      
      Finally, note that cdbs with no data buffers are handled a little
      differently. Before, SCSI_NON_DATA_CDBs would not call get_mem at all
      (they'd be in the final else in transport_allocate_resources) but now
      these will make it into generic_get_mem, but just not allocate any
      buffers.
      Signed-off-by: NAndy Grover <agrover@redhat.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      05d1c7c0
    • R
      target: Implement Block Device Characteristics VPD page · e22a7f07
      Roland Dreier 提交于
      Implement page B1h, Block Device Characteristics, so that we can report
      a medium rotation rate of 1 (non-rotating / solid state) if the
      is_nonrot device attribute is set; we update the iblock backend to set
      this attribute if the underlying Linux block device has its nonrot
      flag set.
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      e22a7f07
    • N
      target: Add SCF_EMULATE_QUEUE_FULL -> transport_handle_queue_full · 07bde79a
      Nicholas Bellinger 提交于
      This patch adds SCF_EMULATE_QUEUE_FULL support using -EAGAIN failures
      via transport_handle_queue_full() to signal queue full in completion
      path TFO->queue_data_in() and TFO->queue_status() callbacks.
      
      This is done using a new se_cmd->transport_qf_callback() to handle
      the following queue full exception cases within target core:
      
      *) TRANSPORT_COMPLETE_OK (for completion path queue full)
      
      *) TRANSPORT_COMPLETE_QF_WP (for TRANSPORT_WRITE_PENDING queue full)
      
      *) transport_send_check_condition_and_sense() failure paths in
         transport_generic_request_failure() and transport_generic_complete_ok()
      
      All logic is driven using se_device->qf_work_queue -> target_qf_do_work()
      to to requeue outstanding se_cmd at the head of se_dev->queue_obj->qobj_list
      for transport_processing_thread() execution.
      
      Tested using tcm_qla2xxx with MAX_OUTSTANDING_COMMANDS=128 for FCP READ
      to trigger the TRANSPORT_COMPLETE_OK queue full cases, and a simulated
      TFO->write_pending() -EAGAIN failure to trigger TRANSPORT_COMPLETE_QF_WP.
      Reported-by: NRoland Dreier <roland@purestorage.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      07bde79a
    • N
      target: Add transport_handle_cdb_direct optimization · 695434e1
      Nicholas Bellinger 提交于
      This patch adds a transport_handle_cdb_direct() optimization for mapping
      and queueing tasks directly from within fabric processing context by calling
      the newly exported transport_generic_new_cmd().  This currently expects to
      be called from process context only, and will fail if called within interrupt
      context.
      
      This patch also leaves transport_generic_handle_cdb() unmodified for the
      moment to function as expected with existing tcm_fc and ib_srpt fabrics,
      and will be removed once these have been converted and tested with v4.1
      code using transport_handle_cdb_direct().
      
      Based on Andy's original patch here:
      
      [PATCH 39/42] target: Call transport_new_cmd instead of adding to cmd queue
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      695434e1
    • C
      target: merge release_cmd methods · 35462975
      Christoph Hellwig 提交于
      The release_cmd_to_pool and release_cmd_direct methods are always the same.
      Merge them into a single release_cmd method, and clean up the fallout.
      
      (nab: fix breakage in transport_generic_free_cmd() parameter build breakage
       in drivers/target/tcm_fc/tfc_cmd.c)
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      35462975
    • C
      target: remove the unused SCF_* flags · db1620a2
      Christoph Hellwig 提交于
      This patch contains a squashed version to remove unused  SCF_* flags:
      
      target: remove the unused SCF_SE_DISABLE_ONLINE_CHECK flag
      target: remove the unused SCF_CMD_PASSTHROUGH_NOALLOC flag
      target: remove the unused SCF_EMULATE_SYNC_UNMAP flag
      target: remove the unused SCF_EMULATE_SYNC_CACHE flag
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      db1620a2
    • C
    • A
      target: Updates from AGrover and HCH (round 3) · a1d8b49a
      Andy Grover 提交于
      This patch contains a squashed version of third round series cleanups,
      improvements ,and simplfications from Andy and Christoph ahead of the
      heavy lifting between round 3 -> 4 for the target core SGL conversion.
      
      This include cleanups to the main target I/O path and other miscellaneous
      updates.
      
      target: Replace custom sg<->buf functions with lib funcs
      target: Simplify sector limiting code
      target: get_cdb should never return NULL
      target: Simplify transport_memcpy_se_mem_read_contig
      target: Use assignment rather than increment for t_task_cdbs
      target: Don't pass dma_size to generic_get_mem
      target: Pass sg with type scatterlist in transport_map_sg_to_mem
      target: Move task_sg_num next to task_sg in struct se_task
      target: inline struct se_transport_task into struct se_cmd
      target: Change name & semantics of transport_get_sectors()
      target: Remove unused members of se_cmd
      target: Rename se_cmd.t_task_cdbs to t_task_list_num
      target: Fix some spelling
      target: Remove unused var from transport_generic_do_tmr
      target: map_sg_to_mem: return sg_count in return value
      target/pscsi: Use min_t for sector limits
      target/pscsi: Unused param for pscsi_get_bio()
      target: Rename get_cdb_count to allocate_tasks
      target: Make transport_generic_new_cmd() available for iscsi-target
      target: Remove fabric callback to allocate iovecs
      target: Fix transport_generic_new_cmd WRITE comment
      
      (hch: Use __GFP_ZERO usage for alloc_pages() usage)
      Signed-off-by: NAndy Grover <agrover@redhat.com>
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      a1d8b49a
    • A
      target: More core cleanups from AGrover (round 2) · 5951146d
      Andy Grover 提交于
      This patch contains the squashed version of second round of target core
      cleanups and simplifications and Andy and Co.   It also contains a handful
      of fixes to address bugs the original series and other minor cleanups.
      
      Here is the condensed shortlog:
      
      target: Remove unneeded casts to void*
      target: Rename get_lun_for_{cmd,tmr} to lookup_{cmd,tmr}_lun
      target: Make t_task a member of se_cmd, not a pointer
      target: Handle functions returning "-2"
      target: Use cmd->se_dev over cmd->se_lun->lun_se_dev
      target: Embed qr in struct se_cmd
      target: Replace embedded struct se_queue_req with a list_head
      target: Rename list_heads that are nodes in struct se_cmd to "*_node"
      target: Fold transport_device_setup_cmd() into lookup_{tmr,cmd}_lun()
      target: Make t_mem_list and t_mem_list_bidi members of t_task
      target: Add comment & cleanup transport_map_sg_to_mem()
      target: Remove unneeded checks in transport_free_pages()
      
      (Roland: Fix se_queue_req removal leftovers OOPs)
      (nab: Fix transport_lookup_tmr_lun failure case)
      (nab: Fix list_empty(&cmd->t_task.t_mem_bidi_list) inversion bugs)
      Signed-off-by: NAndy Grover <agrover@redhat.com>
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      5951146d
    • A
      target: Core cleanups from AGrover (round 1) · e3d6f909
      Andy Grover 提交于
      This patch contains the squashed version of a number of cleanups and
      minor fixes from Andy's initial series (round 1) for target core this
      past spring.  The condensed log looks like:
      
      target: use errno values instead of returning -1 for everything
      target: Rename transport_calc_sg_num to transport_init_task_sg
      target: Fix leak in error path in transport_init_task_sg
      target/pscsi: Remove pscsi_get_sh() usage
      target: Make two runtime checks into WARN_ONs
      target: Remove hba queue depth and convert to spin_lock_irq usage
      target: dev->dev_status_queue_obj is unused
      target: Make struct se_queue_req.cmd type struct se_cmd *
      target: Remove __transport_get_qr_from_queue()
      target: Rename se_dev->g_se_dev_list to se_dev_node
      target: Remove struct se_global
      target: Simplify scsi mib index table code
      target: Make dev_queue_obj a member of se_device instead of a pointer
      target: remove extraneous returns at end of void functions
      target: Ensure transport_dump_vpd_ident_type returns null-terminated str
      target: Function pointers don't need to use '&' to be assigned
      target: Fix comment in __transport_execute_tasks()
      target: Misc style cleanups
      target: rename struct pr_reservation_template to pr_reservation
      target: Remove #defines that just perform indirection
      target: Inline transport_get_task_from_execute_queue()
      target: Minor header comment fixes
      Signed-off-by: NAndy Grover <agrover@redhat.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      e3d6f909
    • N
      target: Remove unnecessary *cdb transport_get_lun_for_cmd parameter · efa4988d
      Nicholas Bellinger 提交于
      This patch removes the now unnecessary 'unsigned char *cdb' function
      parameter from transport_get_lun_for_cmd().  This also includes updating
      lio-target, tcm_loop and tcm_fc usage of transport_get_lun_for_cmd().
      Reported-by: NFubo Chen <fubo.chen@gmail.com>
      Signed-off-by: NNicholas A. Bellinger <nab@linux-iscsi.org>
      efa4988d
  4. 27 5月, 2011 2 次提交
    • N
      [SCSI] target: Convert REPORT_LUNs to use int_to_scsilun · 1078da16
      Nicholas Bellinger 提交于
      This patch converts transport_core_report_lun_response() to use
      drivers/scsi/scsi_scan.c:int_to_scsilun instead of using the
      struct target_core_fabric_ops->pack_lun() fabric provided API vector.
      
      It also removes the tfo->pack_lun check from target_fabric_tf_ops_check()
      and removes from struct target_core_fabric_ops->pack_lun() from
      target_core_fabric_ops.h, and the following mainline scsi-misc fabric
      modules:
      
      *) tcm_loop: Drop tcm_loop_pack_lun() usage
      *) tcm_fc: Drop ft_pack_lun() usage
      Reported-by: NMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: NNicholas A. Bellinger <nab@linux-iscsi.org>
      Signed-off-by: NJames Bottomley <jbottomley@parallels.com>
      1078da16
    • N
      [SCSI] target: Fix bug with task_sg chained transport_free_dev_tasks release · 42c6951e
      Nicholas Bellinger 提交于
      This patch addresses a bug in the target core release path for HW
      operation where transport_free_dev_tasks() was incorrectly being called
      from transport_lun_remove_cmd() while releasing a se_cmd reference and
      calling struct target_core_fabric_ops->queue_data_in().
      
      This would result in a OOPs with HW target mode when the release of
      se_task->task_sg[] would happen before pci_unmap_sg() can be called in
      HW target mode fabric module code.  This patch addresses the issue by
      moving transport_free_dev_tasks() from transport_lun_remove_cmd() into
      transport_generic_free_cmd(), and adding TRANSPORT_FREE_CMD_INTR and
      transport_generic_free_cmd_intr() to allow se_cmd descriptor release
      to happen fromfrom within transport_processing_thread() process context
      when release of se_cmd is not possible from HW interrupt context.
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      Cc: stable@kernel.org
      Signed-off-by: NJames Bottomley <jbottomley@parallels.com>
      42c6951e
  5. 25 5月, 2011 2 次提交
    • N
      [SCSI] target: Convert REPORT_LUNs to use int_to_scsilun · d60b7a0f
      Nicholas Bellinger 提交于
      This patch converts transport_core_report_lun_response() to use
      drivers/scsi/scsi_scan.c:int_to_scsilun instead of using the
      struct target_core_fabric_ops->pack_lun() fabric provided API vector.
      
      It also removes the tfo->pack_lun check from target_fabric_tf_ops_check()
      and removes from struct target_core_fabric_ops->pack_lun() from
      target_core_fabric_ops.h, and the following mainline scsi-misc fabric
      modules:
      
      *) tcm_loop: Drop tcm_loop_pack_lun() usage
      *) tcm_fc: Drop ft_pack_lun() usage
      Reported-by: NMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: NNicholas A. Bellinger <nab@linux-iscsi.org>
      Signed-off-by: NJames Bottomley <jbottomley@parallels.com>
      d60b7a0f
    • N
      [SCSI] target: Fix bug with task_sg chained transport_free_dev_tasks release · f4366772
      Nicholas Bellinger 提交于
      This patch addresses a bug in the target core release path for HW
      operation where transport_free_dev_tasks() was incorrectly being called
      from transport_lun_remove_cmd() while releasing a se_cmd reference and
      calling struct target_core_fabric_ops->queue_data_in().
      
      This would result in a OOPs with HW target mode when the release of
      se_task->task_sg[] would happen before pci_unmap_sg() can be called in
      HW target mode fabric module code.  This patch addresses the issue by
      moving transport_free_dev_tasks() from transport_lun_remove_cmd() into
      transport_generic_free_cmd(), and adding TRANSPORT_FREE_CMD_INTR and
      transport_generic_free_cmd_intr() to allow se_cmd descriptor release
      to happen fromfrom within transport_processing_thread() process context
      when release of se_cmd is not possible from HW interrupt context.
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      Cc: stable@kernel.org
      Signed-off-by: NJames Bottomley <jbottomley@parallels.com>
      f4366772
  6. 31 3月, 2011 1 次提交
  7. 24 3月, 2011 5 次提交
    • N
      [SCSI] target: add initial statistics · 12d23384
      Nicholas Bellinger 提交于
      This patch adds a target_core_mib.c statistics conversion for
      backend context struct se_subsystem_dev + struct se_device config_group
      based statistics in target_core_device.c using CONFIGFS_EATTR()
      based struct config_item_types from target_core_stat.c code.
      
      The conversion from backend /proc/scsi_target/mib/ context output to configfs
      default groups+attributes include scsi_dev, scsi_lu, and scsi_tgt_dev output
      from within individual:
      
      	/sys/kernel/config/target/core/$HBA/DEV/
      
      The legacy procfs output now appear as individual configfs attributes under:
      
      *) $HBA/$DEV/statistics/scsi_dev:
      
      |-- indx
      |-- inst
      |-- ports
      `-- role
      
      *) $HBA/$DEV/statistics/scsi_lu:
      
      |-- creation_time
      |-- dev
      |-- dev_type
      |-- full_stat
      |-- hs_num_cmds
      |-- indx
      |-- inst
      |-- lu_name
      |-- lun
      |-- num_cmds
      |-- prod
      |-- read_mbytes
      |-- resets
      |-- rev
      |-- state_bit
      |-- status
      |-- vend
      `-- write_mbytes
      
      *) $HBA/$DEV/statistics/scsi_tgt_dev:
      
      |-- indx
      |-- inst
      |-- non_access_lus
      |-- num_lus
      |-- resets
      `-- status
      
      The conversion from backend /proc/scsi_target/mib/ context output to configfs
      default groups+attributes include scsi_port, scsi_tgt_port and scsi_transport
      output from within individual:
      
      	/sys/kernel/config/target/fabric/$WWN/tpgt_$TPGT/lun/lun_$LUN_ID/statistics/
      
      The legacy procfs output now appear as individual configfs attributes under:
      
      *) fabric/$WWN/tpgt_$TPGT/lun/lun_$LUN_ID/statistics/scsi_port
      
      |-- busy_count
      |-- dev
      |-- indx
      |-- inst
      `-- role
      
      *) fabric/$WWN/tpgt_$TPGT/lun/lun_$LUN_ID/statistics/scsi_tgt_port
      
      |-- dev
      |-- hs_in_cmds
      |-- in_cmds
      |-- indx
      |-- inst
      |-- name
      |-- port_index
      |-- read_mbytes
      `-- write_mbytes
      
      *) fabric/$WWN/tpgt_$TPGT/lun/lun_$LUN_ID/statistics/scsi_transport
      
      |-- dev_name
      |-- device
      |-- indx
      `-- inst
      
      The conversion from backend /proc/scsi_target/mib/ context output to configfs
      default groups+attributes include scsi_att_intr_port and scsi_auth_intr output
      from within individual:
      
      	/sys/kernel/config/target/fabric/$WWN/tpgt_$TPGT/acls/$INITIATOR_WWN/lun_$LUN_ID/statistics/
      
      The legacy procfs output now appear as individual configfs attributes under:
      
      *) acls/$INITIATOR_WWN/lun_$LUN_ID/statistics/scsi_att_intr_port
      
      |-- dev
      |-- indx
      |-- inst
      |-- port
      |-- port_auth_indx
      `-- port_ident
      
      *) acls/$INITIATOR_WWN/lun_$LUN_ID/statistics/scsi_auth_intr
      
      |-- att_count
      |-- creation_time
      |-- dev
      |-- dev_or_port
      |-- hs_num_cmds
      |-- indx
      |-- inst
      |-- intr_name
      |-- map_indx
      |-- num_cmds
      |-- port
      |-- read_mbytes
      |-- row_status
      `-- write_mbytes
      
      Also, this includes adding struct target_fabric_configfs_template->
      tfc_wwn_fabric_stats_cit and ->tfc_tpg_nacl_stat_cit respectively for
      use during target_core_fabric_configfs.c:target_fabric_setup_cits()
      Signed-off-by: NNicholas A. Bellinger <nab@linux-iscsi.org>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      12d23384
    • N
    • N
      [SCSI] target: Convert TMR REQ/RSP definitions to target namespace · 5c6cd613
      Nicholas Bellinger 提交于
      This patch changes include/target/target_core_tmr.h code to use
      target specific 'TMR_*' prefixed definitions for fabric independent
      SCSI Task Management Request/Request naming in include/scsi/scsi.h
      definitions for mainline target code.
      Signed-off-by: NNicholas A. Bellinger <nab@linux-iscsi.org>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      5c6cd613
    • N
      [SCSI] target: Remove spurious double cast from structure macro accessors · 35ce9e26
      Nicholas Bellinger 提交于
      Reported-by: NFubo Chen <fubo.chen@gmail.com>
      Cc: James Bottomley <James.Bottomley@suse.de>
      Signed-off-by: NNicholas A. Bellinger <nab@linux-iscsi.org>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      35ce9e26
    • D
      [SCSI] target: Minor sparse warning fixes and annotations · 5dd7ed2e
      Dan Carpenter 提交于
      This patch addresses the majority of sparse warnings and adds
      proper locking annotations.  It also fixes the dubious one-bit signed
      bitfield, for which the signed one-bit types can be 0 or -1 which can
      cause a problem if someone ever checks if (foo->lu_gp_assoc == 1).
      The current code is fine because everyone just checks zero vs non-zero.
      But Sparse complains about it so lets change it.  The warnings look like
      this:
      
      include/target/target_core_base.h:228:26: error: dubious one-bit signed bitfield
      Signed-off-by: NDan Carpenter <error27@gmail.com>
      Signed-off-by: NFubo Chen <fubo.chen@gmail.com>
      Signed-off-by: NNicholas A. Bellinger <nab@linux-iscsi.org>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      5dd7ed2e
  8. 01 3月, 2011 1 次提交
    • N
      [SCSI] target: Fix t_transport_aborted handling in LUN_RESET + active I/O shutdown · 52208ae3
      Nicholas Bellinger 提交于
      This patch addresses two outstanding bugs related to
      T_TASK(cmd)->t_transport_aborted handling during TMR LUN_RESET and
      active I/O shutdown.
      
      This first involves adding two explict t_transport_aborted=1
      assignments in core_tmr_lun_reset() in order to signal the task has
      been aborted, and updating transport_generic_wait_for_tasks() to skip
      sleeping when t_transport_aborted=1 has been set.  This fixes an issue
      where transport_generic_wait_for_tasks() would end up sleeping
      indefinately when called from fabric module context while TMR
      LUN_RESET was happening with long outstanding backend struct se_task
      not yet being completed.
      
      The second adds a missing call to
      transport_remove_task_from_execute_queue() when
      task->task_execute_queue=1 is set in order to fix an OOPs when
      task->t_execute_list has not been dropped.  It also fixes the same
      case in transport_processing_shutdown() to prevent the issue from
      happening during active I/O struct se_device shutdown.
      Signed-off-by: NNicholas A. Bellinger <nab@linux-iscsi.org>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      52208ae3