1. 13 8月, 2013 1 次提交
  2. 31 5月, 2013 1 次提交
  3. 04 5月, 2013 1 次提交
  4. 25 4月, 2013 5 次提交
  5. 28 2月, 2013 1 次提交
  6. 24 2月, 2013 1 次提交
  7. 23 2月, 2013 1 次提交
  8. 21 2月, 2013 1 次提交
    • N
      target/file: Add WRITE_SAME w/ UNMAP=0 emulation support · 7b745c84
      Nicholas Bellinger 提交于
      This patch adds support for emulation of WRITE_SAME w/ UNMAP=0 within
      fd_execute_write_same() backend code.
      
      The emulation uses vfs_writev() to submit a locally populated buffer
      from the received WRITE_SAME scatterlist block for duplication, and by
      default enforces a limit of max_write_same_len=0x1000 (8192) sectors up
      to the limit of 1024 iovec entries for the single call to vfs_writev().
      
      It also sets max_write_same_len to the operational default at setup ->
      fd_configure_device() time.
      
      Tested with 512, 1k, 2k, and 4k block_sizes.
      
      (asias: convert to vzalloc)
      
      Cc: Martin K. Petersen <martin.petersen@oracle.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Asias He <asias@redhat.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      7b745c84
  9. 06 12月, 2012 2 次提交
  10. 28 11月, 2012 1 次提交
  11. 07 11月, 2012 5 次提交
  12. 03 10月, 2012 1 次提交
    • N
      target/file: Re-enable optional fd_buffered_io=1 operation · b32f4c7e
      Nicholas Bellinger 提交于
      This patch re-adds the ability to optionally run in buffered FILEIO mode
      (eg: w/o O_DSYNC) for device backends in order to once again use the
      Linux buffered cache as a write-back storage mechanism.
      
      This logic was originally dropped with mainline v3.5-rc commit:
      
      commit a4dff304
      Author: Nicholas Bellinger <nab@linux-iscsi.org>
      Date:   Wed May 30 16:25:41 2012 -0700
      
          target/file: Use O_DSYNC by default for FILEIO backends
      
      This difference with this patch is that fd_create_virtdevice() now
      forces the explicit setting of emulate_write_cache=1 when buffered FILEIO
      operation has been enabled.
      
      (v2: Switch to FDBD_HAS_BUFFERED_IO_WCE + add more detailed
           comment as requested by hch)
      Reported-by: NFerry <iscsitmp@bananateam.nl>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      b32f4c7e
  13. 18 9月, 2012 1 次提交
  14. 01 8月, 2012 1 次提交
    • A
      delousing target_core_file a bit · dbc6e022
      Al Viro 提交于
      * set_fs(KERNEL_DS) + getname() is probably the weirdest implementation
      of strdup() I've seen.  Especially since they don't to copy it at all...
      * filp_open() never returns NULL; it's ERR_PTR(-E...) on failure.
      * file->f_dentry is never going to be NULL, TYVM.
      * match_strdup() + snprintf() + kfree() is a bloody weird way to spell
      match_strlcpy().
      
      Pox on cargo-cult programmers...
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      dbc6e022
  15. 17 7月, 2012 3 次提交
  16. 03 6月, 2012 1 次提交
    • N
      target/file: Use O_DSYNC by default for FILEIO backends · a4dff304
      Nicholas Bellinger 提交于
      Convert to use O_DSYNC for all cases at FILEIO backend creation time to
      avoid the extra syncing of pure timestamp updates with legacy O_SYNC during
      default operation as recommended by hch.  Continue to do this independently of
      Write Cache Enable (WCE) bit, as WCE=0 is currently the default for all backend
      devices and enabled by user on per device basis via attrib/emulate_write_cache.
      
      This patch drops the now unnecessary fd_buffered_io= token usage that was
      originally signalling when to explictly disable O_SYNC at backend creation
      time for buffered I/O operation.  This can end up being dangerous for a number
      of reasons during physical node failure, so go ahead and drop this option
      for now when O_DSYNC is used as the default.
      
      Also allow explict FUA WRITEs -> vfs_fsync_range() call to function in
      fd_execute_cmd() independently of WCE bit setting.
      Reported-by: NChristoph Hellwig <hch@lst.de>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      a4dff304
  17. 18 5月, 2012 1 次提交
  18. 07 5月, 2012 4 次提交
  19. 15 4月, 2012 1 次提交
  20. 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
  21. 06 12月, 2011 3 次提交
    • S
      target/file: walk properly over sg list · 9649fa1b
      Sebastian Andrzej Siewior 提交于
      This patch changes fileio to use for_each_sg() when walking se_task->task_sg
      memory passed into from loopback LLD struct scsi_cmnd scatterlist memory.
      
      This addresses an issue where FILEIO backends with loopback where hitting the
      following OOPs with mkfs.ext2:
      
      |kernel BUG at include/linux/scatterlist.h:97!
      |invalid opcode: 0000 [#1] PREEMPT SMP
      |Modules linked in: sd_mod tcm_loop target_core_stgt scsi_tgt target_core_pscsi target_core_file target_core_iblock target_core_mod configfs scsi_mod
      |
      |Pid: 671, comm: LIO_fileio Not tainted 3.1.0-rc10+ #139 Bochs Bochs
      |EIP: 0060:[<e0afd746>] EFLAGS: 00010202 CPU: 0
      |EIP is at fd_do_task+0x396/0x420 [target_core_file]
      | [<e0aa7884>] __transport_execute_tasks+0xd4/0x190 [target_core_mod]
      | [<e0aa797c>] transport_execute_tasks+0x3c/0xf0 [target_core_mod]
      |EIP: [<e0afd746>] fd_do_task+0x396/0x420 [target_core_file] SS:ESP 0068:dea47e90
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: stable@kernel.org
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      9649fa1b
    • 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
  22. 01 11月, 2011 1 次提交