1. 28 11月, 2012 3 次提交
  2. 16 11月, 2012 1 次提交
    • N
      target/iblock: Add WRITE_SAME w/ UNMAP=0 emulation support · f6970ad3
      Nicholas Bellinger 提交于
      This patch adds support for emulation of WRITE_SAME w/ UNMAP=0 within
      iblock_execute_write_same() backend code.
      
      The emulation uses a bio_add_page() call for each sector, and by default
      enforces a limit of max_write_same_len=0xFFFF (65536) sectors following
      what scsi_debug reports per default for MAXIMUM WRITE SAME LENGTH.
      
      It also sets max_write_same_len to the operational default at setup ->
      iblock_configure_device() time.
      
      (hch: Move unmap logic into iblock_execute_write_same_unmap + add
            check for single sector SGLs in iblock_execute_write_same)
      (mkp: Update comment for 0xFFFF magic constant)
      (nab: drop left-over max_write_same_len check in iblock_execute_write_same)
      
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Martin K. Petersen <martin.petersen@oracle.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      f6970ad3
  3. 07 11月, 2012 5 次提交
  4. 18 9月, 2012 3 次提交
  5. 09 9月, 2012 1 次提交
  6. 08 9月, 2012 1 次提交
  7. 17 7月, 2012 10 次提交
  8. 07 5月, 2012 4 次提交
  9. 26 2月, 2012 2 次提交
    • C
      target: increase iblock task sizes · d5b4a21b
      Christoph Hellwig 提交于
      There is no real limit for task sizes in the iblock driver given that we
      can chain bios.  Increase the maximum size to UINT_MAX, and change the
      code to submit bios in a smaller batch size to avoid deadlocks when
      having more bios in flight than the pool supports.  Also increase the
      pool size to always allow multiple tasks to be in flight.
      
      I also had to change the task refcounting to include one reference for
      the submission task, which is a standard practice in this kind of code
      in Linux (e.g. XFS I/O submission).  This was wrong before, but couldn't
      be hit easily.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      d5b4a21b
    • C
      target: remove the unused struct iblock_hba · 6e315a06
      Christoph Hellwig 提交于
      There is no reason to allocate a struct just to store the host number for
      a debug printk in the detach path.  I've simply removed the verbose
      debugging given that the calling code thinks the number passed in is
      something different from a host ID anyway.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      6e315a06
  10. 07 2月, 2012 2 次提交
  11. 18 1月, 2012 1 次提交
  12. 14 12月, 2011 3 次提交
    • J
      target: remove useless casts · 8359cf43
      Jörn Engel 提交于
      A reader should spend an extra moment whenever noticing a cast,
      because either something special is going on that deserves extra
      attention or, as is all too often the case, the code is wrong.
      
      These casts, afaics, have all been useless.  They cast a foo* to a
      foo*, cast a void* to the assigned type, cast a foo* to void*, before
      assigning it to a void* variable, etc.
      
      In a few cases I also removed an additional &...[0], which is equally
      useless.
      
      Lastly I added three FIXMEs where, to the best of my judgement, the
      code appears to have a bug.  It would be good if someone could check
      these.
      Signed-off-by: NJoern Engel <joern@logfs.org>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      8359cf43
    • S
      target: use \n as a separator for configuration · 90c161b6
      Sebastian Andrzej Siewior 提交于
      The command
      | echo rd_pages=32768 > ramdisk/control
      
      Does not work because it writes "rd_pages=32768\n" and the parser which
      matches for "rd_pages=%d" does not recognize it due to the \n. One way
      of fixing this would be using "echo -n" instead.
      This patch adds \n to the list of separators so we don't have to use the
      -n argument which I find is more convinient.
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      90c161b6
    • C
      target: header reshuffle, part2 · c4795fb2
      Christoph Hellwig 提交于
      This reorganized the headers under include/target into:
      
       - target_core_base.h stays as is with all target-wide data stuctures and defines
       - target_core_backend.h contains the whole interface to I/O backends
       - target_core_fabric.h contains the whole interface to fabric modules
      
      Except for those only the various configfs macro headers stay around.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      c4795fb2
  13. 06 12月, 2011 2 次提交
    • C
      target: remove the t_tasks_fua se_cmd field · 2d3a4b51
      Christoph Hellwig 提交于
      And use a SCF_FUA flag instead.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      2d3a4b51
    • 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
  14. 01 11月, 2011 1 次提交
  15. 24 10月, 2011 1 次提交