1. 17 10月, 2013 3 次提交
  2. 11 9月, 2013 1 次提交
  3. 08 7月, 2013 1 次提交
  4. 10 4月, 2013 1 次提交
  5. 07 11月, 2012 1 次提交
  6. 03 10月, 2012 1 次提交
  7. 18 9月, 2012 2 次提交
  8. 17 7月, 2012 2 次提交
  9. 15 4月, 2012 1 次提交
  10. 18 3月, 2012 1 次提交
    • N
      loopback: Fix transport_generic_allocate_tasks error handling · ee9b866a
      Nicholas Bellinger 提交于
      This patch addresses a tcm_loop bug with transport_generic_allocate_tasks()
      return checking in tcm_loop_submission_work() where other non zero return
      codes (including -EBUSY for reservation conflicts) are incorrectly falling
      through to transport_generic_map_mem_to_cmd() -> transport_handle_cdb_direct().
      
      This bug was introduced into target-pending/for-next-merge with the following
      for-3.4 commit:
      
      commit 16786454
      Author: Christoph Hellwig <hch@infradead.org>
      Date:   Thu Feb 2 17:04:42 2012 -0500
      
          tcm_loop: switch to using transport_handle_cdb_direct
      
      Cc: Christoph Hellwig <hch@lst.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      ee9b866a
  11. 16 3月, 2012 1 次提交
  12. 11 3月, 2012 2 次提交
  13. 26 2月, 2012 5 次提交
  14. 14 12月, 2011 3 次提交
    • C
      tcm_loop: bump max_sectors · 2e88efd3
      Christoph Hellwig 提交于
      There is not reason to artifically limit max_sectors in tcm_loop, set
      it to UINT_MAX to allow stressing the large I/O handling in the target
      core using the loopback driver.  Also remove various superflous defines
      hiding the values set in the host template.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      2e88efd3
    • 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
    • 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
  15. 06 12月, 2011 3 次提交
    • C
      target: remove the t_tasks_bidi se_cmd field · 33c3fafc
      Christoph Hellwig 提交于
      And use a SCF_BIDI flag instead.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      33c3fafc
    • N
      target: Drop config_item_name usage in fabric TFO->free_wwn() · 6297b07c
      Nicholas Bellinger 提交于
      This patch removes config_item_name() informational usage of
      TFO->free_wwn() treewide in loopback, tcm_fc, ib_srpt and
      tcm_vhost module code.
      
      Using v4 target_core_fabric_configfs.c logic, a fabric call for
      config_item_name() in TFO->drop_wwn() context returns NULL as
      target_fabric_drop_wwn() invoking config_item_put() ->
      config_group_put() will release fabric_port->port_wwn.wwn_group
      before the last config_item_put() -> TFO->drop_wwn() is
      invoked.
      Reported-by: NBart Van Assche <bvanassche@acm.org>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      6297b07c
    • 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
  16. 02 11月, 2011 1 次提交
    • N
      target: Make TFO->check_stop_free return free status · 88dd9e26
      Nicholas Bellinger 提交于
      This patch converts target_core_fabric_ops->check_stop_free() usage in
      transport_cmd_check_stop() and associated fabric module usage to
      return '1' when the passed se_cmd has been released directly within
      ->check_stop_free(), or return '0' when the passed se_cmd has not
      been released.
      
      This addresses an issue where transport_cmd_finish_abort() ->
      transport_cmd_check_stop_to_fabric() was leaking descriptors during
      LUN_RESET for modules using ->check_stop_free(), but not directly
      releasing se_cmd in all cases.
      
      Cc: stable@kernel.org
      Signed-off-by: NNicholas Bellinger <nab@risingtidesystems.com>
      88dd9e26
  17. 27 10月, 2011 1 次提交
    • N
      tcm_loop: Add explict read buffer memset for SCF_SCSI_CONTROL_SG_IO_CDB · 8cd79f24
      Nicholas Bellinger 提交于
      This patch addresses an issue with buggy userspace code sending I/O
      via scsi-generic that does not explictly clear their associated read
      buffers.  It adds an explict memset of the first SGL entry within
      tcm_loop_new_cmd_map() for SCF_SCSI_CONTROL_SG_IO_CDB payloads that
      are currently guaranteed to be a single SGL by target-core code.
      
      This issue is a side effect of the v3.1-rc1 merge to remove the
      extra memcpy between certain control CDB types using a contigious
      + cleared buffer in target-core, and performing a memcpy into the
      SGL list within tcm_loop.
      
      It was originally mainfesting itself by udev + scsi_id + scsi-generic
      not properly setting up the expected /dev/disk/by-id/ symlinks because
      the INQUIRY payload was containing extra bogus data preventing the
      proper NAA IEEE WWN from being parsed by userspace.
      
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Andy Grover <agrover@redhat.com>
      Cc: stable@kernel.org
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      8cd79f24
  18. 24 10月, 2011 3 次提交
    • N
      loopback: Prevent uninitialized use of tl_tpg in tcm_loop_queuecommand · 0a020436
      Nicholas Bellinger 提交于
      This patch fixes a bug with tcm_loop where performing a scsi_host rescan was
      causing an oops due to a received scsi_cmnd->device->id value not matching a
      previously configured tcm_loop_tpg entry in tcm_loop_hba->tl_hba_tpgs[]
      obtained from within tcm_loop_queuecommand() code.
      
      This fix adds an explict check for tcm_loop_tpg->tl_hba in order to ensure
      tcm_loop_make_naa_tpg() has already been invoked to initialize a given
      tcm_loop_tpg entry, and also adds an explict clear of tcm_loop_tpg->tl_hba
      from within the tcm_loop_drop_naa_tpg() release path.
      
      This bug was manifesting itself with the following OOPs:
      
      [176289.430909] BUG: unable to handle kernel NULL pointer dereference at 0000000000000090
      [176289.431337] IP: [<ffffffffa0395617>] transport_processing_thread+0x1e3/0x794 [target_core_mod]
      [176289.431399] PGD 22e9b067 PUD 23375067 PMD 0
      [176289.431399] Oops: 0000 [#1] SMP
      [176289.431815] CPU 1
      [176289.431815] Modules linked in: tcm_loop target_core_stgt target_core_pscsi target_core_file target_core_iblock target_core_mod crc32c ib_cm ib_sa ib_mad ib_core qla2xxx scsi_tgt configfs fcoe libfcoe libfc scsi_transport_fc ipv6 iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi sr_mod cdrom sd_mod ata_piix libata e1000 mptspi mptscsih mptbase [last unloaded: target_core_mod]
      [176289.431815]
      [176289.431815] Pid: 12339, comm: LIO_iblock Tainted: G        W   3.1.0-rc8+
      [176289.431815] RIP: 0010:[<ffffffffa0395617>]  [<ffffffffa0395617>] transport_processing_thread+0x1e3/0x794 [target_core_mod]
      [176289.431815] RSP: 0018:ffff880023bfbe10  EFLAGS: 00010283
      [176289.431815] RAX: 0000000000000000 RBX: ffff88002d600040 RCX: ffff88002d600108
      [176289.431815] RDX: ffff88000c9e50bc RSI: 0000000000000246 RDI: 0000000000000246
      [176289.431815] RBP: ffff880023bfbee0 R08: ffff88002d600108 R09: 0000000000000000
      [176289.431815] R10: ffff88002fc8cc80 R11: ffffffff81671b60 R12: ffff88002d600108
      [176289.431815] R13: ffff88000c9e4f38 R14: ffff88000c9e50b8 R15: 0000000000000000
      [176289.431815] FS:  0000000000000000(0000) GS:ffff88002fc80000(0000) knlGS:0000000000000000
      [176289.431815] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
      [176289.431815] CR2: 0000000000000090 CR3: 000000002a33f000 CR4: 00000000000006e0
      [176289.431815] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      [176289.431815] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
      [176289.431815] Process LIO_iblock (pid: 12339, threadinfo ffff880023bfa000, task ffff88002a2e0000)
      [176289.431815] Stack:
      [176289.431815]  0000000000011280 0000000000000246 ffff88002a2e0000 ffff880023a58900
      [176289.431815]  ffff880023bfbed0 ffff880023bfa000 ffff880023bfa000 ffff88000c9e50d0
      [176289.431815]  ffff88000c9e50c0 ffff88000c9e50bc ffff880023bfa000 ffff880023bfbfd8
      [176289.431815] Call Trace:
      [176289.431815]  [<ffffffff81056657>] ? wake_up_bit+0x25/0x25
      [176289.431815]  [<ffffffffa0395434>] ? transport_handle_cdb_direct+0x92/0x92 [target_core_mod]
      [176289.431815]  [<ffffffff8105619a>] kthread+0x7d/0x85
      [176289.431815]  [<ffffffff813cbcb4>] kernel_thread_helper+0x4/0x10
      [176289.431815]  [<ffffffff8105611d>] ? kthread_worker_fn+0x16d/0x16d
      [176289.431815]  [<ffffffff813cbcb0>] ? gs_change+0x13/0x13
      [176289.431815] Code: 67 05 00 00 41 8b 84 24 4c ff ff ff ff c8 83 f8 11 0f 87 f0 04 00 00 89 c0 ff 24 c5 b0 c6 39 a0 0f 0b eb fe 48 8b 83 d8 00 00 00
      [176289.431815] RIP  [<ffffffffa0395617>] transport_processing_thread+0x1e3/0x794 [target_core_mod]
      [176289.431815]  RSP <ffff880023bfbe10>
      [176289.431815] CR2: 0000000000000090
      [176295.041004] ---[ end trace 85dc6865b23b8f3e ]---
      Reported-by: NPaolo Bonzini <pbonzini@redhat.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      0a020436
    • R
      target: Have core_tmr_alloc_req() take an explicit GFP_xxx flag · dd503a5f
      Roland Dreier 提交于
      Testing in_interrupt() to know when sleeping is allowed is not really
      reliable (since eg it won't be true if the caller is holding a spinlock).
      Instead have the caller tell core_tmr_alloc_req() what GFP_xxx to use;
      every caller except tcm_qla2xxx can use GFP_KERNEL.
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      dd503a5f
    • C
      target: push session reinstatement out of transport_generic_free_cmd · 82f1c8a4
      Christoph Hellwig 提交于
      Push session reinstatement out of transport_generic_free_cmd into the only
      caller that actually needs it.  Clean up transport_generic_free_cmd a bit,
      and remove the useless comment.  I'd love to add a more useful kerneldoc
      comment for it, but as this point I'm still a bit confused in where it
      stands in the command release stack.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      82f1c8a4
  19. 22 7月, 2011 7 次提交