1. 25 2月, 2014 1 次提交
  2. 24 1月, 2014 1 次提交
    • K
      percpu_ida: Make percpu_ida_alloc + callers accept task state bitmask · 6f6b5d1e
      Kent Overstreet 提交于
      This patch changes percpu_ida_alloc() + callers to accept task state
      bitmask for prepare_to_wait() for code like target/iscsi that needs
      it for interruptible sleep, that is provided in a subsequent patch.
      
      It now expects TASK_UNINTERRUPTIBLE when the caller is able to sleep
      waiting for a new tag, or TASK_RUNNING when the caller cannot sleep,
      and is forced to return a negative value when no tags are available.
      
      v2 changes:
        - Include blk-mq + tcm_fc + vhost/scsi + target/iscsi changes
        - Drop signal_pending_state() call
      v3 changes:
        - Only call prepare_to_wait() + finish_wait() when != TASK_RUNNING
          (PeterZ)
      Reported-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Jens Axboe <axboe@kernel.dk>
      Signed-off-by: NKent Overstreet <kmo@daterainc.com>
      Cc: <stable@vger.kernel.org> #3.12+
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      6f6b5d1e
  3. 18 1月, 2014 1 次提交
    • N
      target: Add protection SGLs to target_submit_cmd_map_sgls · def2b339
      Nicholas Bellinger 提交于
      This patch adds support to target_submit_cmd_map_sgls() for
      accepting 'sgl_prot' + 'sgl_prot_count' parameters for
      DIF protection information.
      
      Note the passed parameters are stored at se_cmd->t_prot_sg
      and se_cmd->t_prot_nents respectively.
      
      Also, update tcm_loop and vhost-scsi fabrics usage of
      target_submit_cmd_map_sgls() to take into account the
      new parameters.
      
      Cc: Martin K. Petersen <martin.petersen@oracle.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Hannes Reinecke <hare@suse.de>
      Cc: Sagi Grimberg <sagig@mellanox.com>
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      def2b339
  4. 07 12月, 2013 1 次提交
  5. 26 10月, 2013 1 次提交
    • N
      vhost/scsi: Fix incorrect usage of get_user_pages_fast write parameter · 60a01f55
      Nicholas Bellinger 提交于
      This patch addresses a long-standing bug where the get_user_pages_fast()
      write parameter used for setting the underlying page table entry permission
      bits was incorrectly set to write=1 for data_direction=DMA_TO_DEVICE, and
      passed into get_user_pages_fast() via vhost_scsi_map_iov_to_sgl().
      
      However, this parameter is intended to signal WRITEs to pinned userspace
      PTEs for the virtio-scsi DMA_FROM_DEVICE -> READ payload case, and *not*
      for the virtio-scsi DMA_TO_DEVICE -> WRITE payload case.
      
      This bug would manifest itself as random process segmentation faults on
      KVM host after repeated vhost starts + stops and/or with lots of vhost
      endpoints + LUNs.
      
      Cc: Stefan Hajnoczi <stefanha@redhat.com>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Cc: Asias He <asias@redhat.com>
      Cc: <stable@vger.kernel.org> # 3.6+
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      60a01f55
  6. 17 10月, 2013 1 次提交
  7. 02 10月, 2013 1 次提交
  8. 18 9月, 2013 2 次提交
  9. 11 9月, 2013 1 次提交
  10. 10 9月, 2013 2 次提交
  11. 11 7月, 2013 2 次提交
  12. 08 7月, 2013 1 次提交
  13. 07 7月, 2013 7 次提交
  14. 21 6月, 2013 2 次提交
    • N
      vhost/scsi: Convert to se_cmd->cmd_kref TARGET_SCF_ACK_KREF usage · 084ed45b
      Nicholas Bellinger 提交于
      This patch coverts vhost/scsi to se_cmd->cmd_kref TARGET_SCF_ACK_KREF
      usage, instead of assuming that vhost_scsi_free_cmd() is always called
      before TCM processing is completed in the response fast path.
      
      This includes adding vhost_scsi_check_stop_free() -> target_put_sess_cmd()
      to perform the second se_cmd->cmd_kref put, and moving vhost_scsi_free_cmd()
      resource release into tcm_vhost_release_cmd() that is invoked once the last
      se_cmd->cmd_kref put occurs.
      
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Roland Dreier <roland@kernel.org>
      Cc: Kent Overstreet <koverstreet@google.com>
      Cc: Asias He <asias@redhat.com>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Cc: Moussa Ba <moussaba@micron.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      084ed45b
    • N
      vhost/scsi: Drop unnecessary wait_for_tasks=true usage with transport_generic_free_cmd · 6c131d0c
      Nicholas Bellinger 提交于
      This patch changes vhost_scsi_free_cmd() to call transport_generic_free_cmd()
      with wait_for_tasks=false in order to avoid the extra se_cmd->t_state_lock
      access for the wait_for_tasks=true case.
      
      This is unnecessary because vhost_scsi_free_cmd() is only ever called by
      vhost_scsi_complete_cmd_work() after TCM completion handoff, and by
      vhost_scsi_handle_vq() exception code before TCM submission handoff, so
      there is never a case where se_cmd is still active from TCM's perspective
      when transport_generic_free_cmd() is called.
      
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Roland Dreier <roland@kernel.org>
      Cc: Kent Overstreet <koverstreet@google.com>
      Cc: Asias He <asias@redhat.com>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Cc: Or Gerlitz <ogerlitz@mellanox.com>
      Cc: Moussa Ba <moussaba@micron.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      6c131d0c
  15. 07 5月, 2013 1 次提交
  16. 02 5月, 2013 3 次提交
  17. 01 5月, 2013 4 次提交
  18. 25 4月, 2013 4 次提交
  19. 11 4月, 2013 4 次提交