1. 22 Aug, 2011 20 commits
    • Roland Dreier's avatar
      target: Convert acl_node_lock to be IRQ-disabling · 28638887
      Roland Dreier authored
      With qla2xxx, acl_node_lock is taken inside qla2xxx's hardware_lock,
      which is taken in hardirq context.  This means acl_node_lock must become
      an IRQ-disabling lock; in particular this fixes lockdep warnings along
      the lines of
          [ INFO: HARDIRQ-safe -> HARDIRQ-unsafe lock order detected ]
           (&(&se_tpg->acl_node_lock)->rlock){+.....}, at: [<ffffffffa026f872>] transport_deregister_session+0x92/0x140 [target_core_mod]
          and this task is already holding:
           (&(&ha->hardware_lock)->rlock){-.-...}, at: [<ffffffffa017c5e7>] qla_tgt_stop_phase1+0x57/0x2c0 [qla2xxx]
          which would create a new lock dependency:
           (&(&ha->hardware_lock)->rlock){-.-...} -> (&(&se_tpg->acl_node_lock)->rlock){+.....}
          but this new dependency connects a HARDIRQ-irq-safe lock:
          to a HARDIRQ-irq-unsafe lock:
      Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
    • Roland Dreier's avatar
      target: Make locking in transport_deregister_session() IRQ safe · e63a8e19
      Roland Dreier authored
      At least the tcm_qla2xxx fabric driver calls into transport_deregister_session()
      while holding an IRQ-disabled spinlock, so the inner locking needs to
      use spin_lock_irqsave() instead of spin_lock_bh().
      This fixes warnings seen with tcm_qla2xxx like:
          WARNING: at kernel/softirq.c:159 local_bh_enable_ip+0x98/0xb0()
          Call Trace:
           [<ffffffff8104e65f>] warn_slowpath_common+0x7f/0xc0
           [<ffffffff8104e6ba>] warn_slowpath_null+0x1a/0x20
           [<ffffffff81055368>] local_bh_enable_ip+0x98/0xb0
           [<ffffffff814d5284>] _raw_spin_unlock_bh+0x14/0x20
           [<ffffffffa027b7f6>] transport_deregister_session+0x96/0x180 [target_core_mod]
           [<ffffffffa00f7731>] tcm_qla2xxx_free_session+0xd1/0x170 [tcm_qla2xxx]
           [<ffffffffa01b9173>] qla_tgt_sess_put+0xc3/0x140 [qla2xxx]
           [<ffffffffa01bf40f>] qla_tgt_stop_phase1+0x8f/0x2c0 [qla2xxx]
           [<ffffffffa00f735e>] tcm_qla2xxx_tpg_store_enable+0x6e/0xd0 [tcm_qla2xxx]
           [<ffffffffa026ca29>] target_fabric_tpg_attr_store+0x39/0x40 [target_core_mod]
           [<ffffffffa00a575d>] configfs_write_file+0xbd/0x120 [configfs]
           [<ffffffff811464a6>] vfs_write+0xc6/0x180
           [<ffffffff811467c1>] sys_write+0x51/0x90
           [<ffffffff814dd382>] system_call_fastpath+0x16/0x1b
      Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
    • Roland Dreier's avatar
      tcm_fc: init/exit functions should not be protected by "#ifdef MODULE" · 4e0f0529
      Roland Dreier authored
      There's no need for the #ifdef protection when building into the kernel,
      and in fact we need the module_init() for the initialization function to
      be called.
      Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
    • Roland Dreier's avatar
      target: Print subpage too for unhandled MODE SENSE pages · f15ea578
      Roland Dreier authored
      Make a log message more useful by printing both the page and subpage
      that an initiator is requesting.
      Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
    • Dan Carpenter's avatar
      iscsi-target: Fix iscsit_allocate_se_cmd_for_tmr failure path bugs · ba773669
      Dan Carpenter authored
      This patch fixes two bugs in allocation failure handling in
      This first reported by DanC is a free-after call to transport_free_se_cmd(), this
      patch drops the transport_free_se_cmd() call all together, as iscsit_release_cmd()
      will release existing allocations as expected.
      The second is a bug where iscsi_cmd_t was being leaked on a cmd->tmr_req allocation
      failure, so make this jump to iscsit_release_cmd() as well.
      Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
    • Chris Boot's avatar
      iscsi-target: Implement iSCSI target IPv6 address printing. · 6626a057
      Chris Boot authored
      The iSCSI target configfs code to print out an initiator's IPv6 address
      is not fully implemented. This patch uses snprintf() with the "%pI6c"
      format string to format the IPv6 address for display purposes.
      Signed-off-by: default avatarChris Boot <bootc@bootc.net>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
    • Nicholas Bellinger's avatar
      target: Fix task SGL chaining breakage with transport_allocate_data_tasks · c3c74c7a
      Nicholas Bellinger authored
      This patch fixes two bugs associated with transport_do_task_sg_chain()
      operation where transport_allocate_data_tasks() was incorrectly setting
      task_padded_sg for all tasks, and causing bogus task->task_sg_nents
      assignments + OOPsen with fabrics depending upon this code.  The first bit
      here adds a task_sg_nents_padded check in transport_allocate_data_tasks()
      to include an extra SGL vector when necessary for tasks that expect to
      be linked using sg_chain().
      The second change involves making transport_do_task_sg_chain() properly
      account for the extra SGL vector when task->task_padded_sg is set for
      the non trailing ->task_sg or single ->task_sg allocations.  Note this
      patch also removes the BUG_ON(!task->task_padded_sg) check within
      transport_do_task_sg_chain() as we expect this to happen normally
      with the updated logic in transport_allocate_data_tasks(), along with
      being bogus for CONTROL_SG_IO_CDB type payloads.
      So far this bugfix has been tested with tcm_qla2xxx and iblock backends
      in (task_count > 1)( and (task_count == 1) operation.
      Reported-by: default avatarKiran Patil <kiran.patil@intel.com>
      Cc: Kiran Patil <kiran.patil@intel.com>
      Cc: Andy Grover <agrover@redhat.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
    • Nicholas Bellinger's avatar
      target: Fix task count > 1 handling breakage and use max_sector page alignment · 525a48a2
      Nicholas Bellinger authored
      This patch addresses recent breakage with multiple se_task (task_count > 1)
      operation following backend dev->se_sub_dev->se_dev_attrib.max_sectors in new
      transport_allocate_data_tasks() code.  The initial bug here was a bogus
      task->task_sg_nents assignment in transport_allocate_data_tasks() based on
      the passed parameter, which now uses DIV_ROUND_UP(task_size, PAGE_SIZE) to
      determine the proper number of per task SGL entries for the (task_count > 1)
      This also means we now need to enforce a PAGE_SIZE aligned max_sector count
      value for this to work as expected without bringing back the pre v3.1
      transport_map_mem_to_sg() logic to handle SGL offsets across multiple tasks.
      So this patch adds se_dev_align_max_sectors() to round down max_sectors as
      necessary to ensure this alignment via se_dev_set_default_attribs() and
      se_dev_align_max_sectors() and keeps it simple for (task_count > 1)
      So far this bugfix has been tested with (task_count > 1) operation
      using iscsi-target and iblock backends.
      Reported-by: default avatarChris Boot <bootc@bootc.net>
      Cc: Kiran Patil <kiran.patil@intel.com>
      Cc: Andy Grover <agrover@redhat.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
    • Nicholas Bellinger's avatar
      target: Add missing DATA_SG_IO transport_cmd_get_valid_sectors check · 01cde4d5
      Nicholas Bellinger authored
      This patch adds the missing transport_cmd_get_valid_sectors() check for
      SCF_SCSI_DATA_SG_IO_CDB type payloads to ensure that a received LBA + range
      does not exeed past the end of associated backend struct se_device.
      This patch also fixes a bug in the failure path of transport_new_cmd_obj()
      where this check can fail, so change to use a signed 'rc' and return '-EINVAL'
      to signal proper transport_generic_request_failure() handling.
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
    • Nicholas Bellinger's avatar
      target: Fix SYNCHRONIZE_CACHE zero LBA + range breakage · 7abbe7f3
      Nicholas Bellinger authored
      This patch fixes a SYNCHRONIZE_CACHE CDB handling bug with IBLOCK/FILEIO
      backends where transport_cmd_get_valid_sectors() was incorrectly rejecting
      a zero LBA + range CDB from being processed, and returning CHECK_CONDITION.
      This includes changing transport_cmd_get_valid_sectors() to return '0' on
      success and '-EINVAL' on failure (this makes more sense than sectors),
      and to only check transport_cmd_get_valid_sectors() when a non zero LBA +
      range SYNCHRONIZE_CACHE operation has been receieved for the non passthrough
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
    • Nicholas Bellinger's avatar
      target: Remove duplicate task completions in transport_emulate_control_cdb · 72f4ba1e
      Nicholas Bellinger authored
      This patch removes a duplicate set of transport_complete_task() calls in
      target_emulate_unmap() and target_emulate_write_same() as the completion
      call is already done within transport_emulate_control_cdb()
      This patch also adds a check in transport_emulate_control_cdb() for the
      existing SCF_EMULATE_CDB_ASYNC flag currently used by SYNCHRONIZE_CACHE
      in order to handle IMMEDIATE processing.
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
    • Nicholas Bellinger's avatar
      target: Fix WRITE_SAME usage with transport_get_size · 12850626
      Nicholas Bellinger authored
      For all flavours of WRITE_SAME, we only expect to handle a single block
      of data-out buffer payload, regardless of the number of logical blocks
      presented in the CDB.  This patch changes all flavours of WRITE_SAME in
      transport_generic_cmd_sequencer() to pass '1' into transport_get_size()
      instead of the extracted 'sectors' to properly handle the default usage
      of sg_write_same without the --xferlen parameter.
      Reported-by: default avatarEric Seppanen <eric@purestorage.com>
      Signed-off-by: default avatarNicholas Bellinger <nab@risingtidesystems.com>
    • Nicholas Bellinger's avatar
      target: Add WRITE_SAME (10) parsing and refactor passthrough checks · 706d5860
      Nicholas Bellinger authored
      This patch adds initial WRITE_SAME (10) w/ UNMAP=1 support following updates in
      sbcr26 to allow UNMAP=1 for the non 16 + 32 byte CDB case.  It also refactors
      current pSCSI passthrough passthrough checks into target_check_write_same_discard()
      ahead of UNMAP=0 w/ write payload support into target_core_iblock.c.
      This includes the support for handling WRITE_SAME in transport_emulate_control_cdb(),
      and converts target_emulate_write_same to accept num_blocks directly for
      Reported-by: default avatarEric Seppanen <eric@purestorage.com>
      Cc: Roland Dreier <roland@purestorage.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarNicholas Bellinger <nab@risingtidesystems.com>
    • Nicholas Bellinger's avatar
      target: Fix write payload exception handling with ->new_cmd_map · 16ab8e60
      Nicholas Bellinger authored
      This patch fixes a bug for fabrics using tfo->new_cmd_map() that
      are expect transport_generic_request_failure() to be calling
      transport_send_check_condition_and_sense() for both READ and WRITE,
      instead of only for READ exceptions.
      This was originally observed with a failed WRITE_SAME_16 w/ unmap=0
      using tcm_loop.
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
    • Dan Carpenter's avatar
      iscsi-target: forever loop bug in iscsit_attach_ooo_cmdsn() · 387e96c0
      Dan Carpenter authored
      This patch fixes a forever loop bug in iscsit_attach_ooo_cmdsn()
      while walking sess->sess_ooo_cmdsn_list when the received
      CmdSN is less than the tail of the list.
      Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
    • Dan Carpenter's avatar
      iscsi-target: remove duplicate return · c2337c70
      Dan Carpenter authored
      We returned on the line before already.
      Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
    • Julia Lawall's avatar
      target: Convert target_core_rd.c to use use BUG_ON · 6fc61488
      Julia Lawall authored
      Use BUG_ON(x) rather than if(x) BUG();
      The semantic patch that fixes this problem is as follows:
      // <smpl>
      @@ identifier x; @@
      -if (x) BUG();
      @@ identifier x; @@
      -if (!x) BUG();
      // </smpl>
      Signed-off-by: default avatarJulia Lawall <julia@diku.dk>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
    • Jesper Juhl's avatar
      iscsi-target: Fix leak on failure in iscsi_copy_param_list() · 9be08c58
      Jesper Juhl authored
      We leak memory if the allocations for 'new_param->name' or
      'new_param->value' fail in iscsi_target_parameters.c::iscsi_copy_param_list()
      We also do a lot of variable assignments that are completely pointless
      if the allocations fail.
      So, let's move the allocations before the assignments and also make
      sure that we free whatever was allocated to one if the allocation fail.
      There's also some small CodingStyle fixups in there (curly braces on
      both branches of if statement, only one variable per line) since I was
      in the area anyway. And finally, error messages in the function are
      put on a single line for easy grep'abillity.
      Signed-off-by: default avatarJesper Juhl <jj@chaosbits.net>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
    • Thomas Meyer's avatar
      target: Use ERR_CAST inlined function · e1750ba2
      Thomas Meyer authored
      Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...))
      The semantic patch that makes this output is available
      in scripts/coccinelle/api/err_cast.cocci.
      More information about semantic patching is available at
      http://coccinelle.lip6.fr/Signed-off-by: default avatarThomas Meyer <thomas@m3y3r.de>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
    • Nicholas Bellinger's avatar
      target: Make standard INQUIRY return 'not connected' for tpg_virt_lun0 · 052605c6
      Nicholas Bellinger authored
      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: default avatarRoland Dreier <roland@purestorage.com>
      Cc: Andrew Vasquez <andrew.vasquez@qlogic.com>
      Signed-off-by: default avatarNicholas Bellinger <nab@risingtidesystems.com>
  2. 16 Aug, 2011 1 commit
  3. 03 Aug, 2011 1 commit
    • Kiran Patil's avatar
      tcm_fc: Handle DDP/SW fc_frame_payload_get failures in ft_recv_write_data · dcd998cc
      Kiran Patil authored
      Problem: HW DDP context was not invalidated in case of ABORTS, etc...
      This leads to the problem where memory pages which are used for DDP
      as user descriptor could get reused for some other purpose (such as to
      satisfy new memory allocation request either by kernel or user mode threads)
      and since HW DDP context was not invalidated, HW continue to write to
      those pages, hence causing memory corruption.
      Fix: Either on incoming ABORTS or due to exchange time out, allowed the
      target to cleanup HW DDP context if it was setup for respective ft_cmd.
      Added new function to perform this cleanup, furthur it can be enhanced
      for other cleanup activity.  Fix ft_recv_write_data() to properly handle
      fc_frame_payload_get to return pointer to payload if it exist. If there is
      no payload which is most common case (+ve case in case if DDP is working
      as expected, it will return NULL. Yes, scope of buf is limited to printk.
      Invalidation of HW context (which is done inside ft_invl_hw_context() is
      necessary in SUCCESS and FAILURE case of DDP. Hence invalidation is DONE
      as long as there was DDP setup (whether it worked correctly or not,
      NOTE: For some reason, if there is any error w.r.t DDP such as out of
      order packet reception, HW simply post the full packet in rx queue.
      Signed-off-by: default avatarKiran Patil <kiran.patil@intel.com>
      Cc: Robert W Love <robert.w.love@intel.com>
      Signed-off-by: default avatarNicholas A. Bellinger <nab@linux-iscsi.org>
  4. 30 Jul, 2011 1 commit
    • Nicholas Bellinger's avatar
      target: Fix bug for transport_generic_wait_for_tasks with direct operation · dd8ae59d
      Nicholas Bellinger authored
      This patch fixes a bug in transport_handle_cdb_direct() usage with target_core
      where transport_generic_wait_for_tasks() was bypassing active I/O + usage of
      cmd->t_transport_stop_comp because cmd->t_transport_active=1 was not being set
      before dispatching with transport_generic_new_cmd().  The fix follows existing
      usage in transport_generic_handle_cdb*() -> transport_add_cmd_to_queue() and
      set these directly, as well as handle transport_generic_new_cmd() exceptions
      for QUEUE_FULL and CHECK_CONDITION instead of propigating up to RX context
      fabric code.
      The bug was manifesting itself with the following SLUB poison overwritten
      warnings with iscsi-target v4.1 LUNs using the new process context direct
      operation during session reinstatement with active I/O exception handling:
      [885410.498267] =============================================================================
      [885410.621622] BUG lio_cmd_cache: Poison overwritten
      [885410.621791] -----------------------------------------------------------------------------
      [885410.623420] INFO: 0xffff880000cf3750-0xffff880000cf378d. First byte 0x6a instead of 0x6b
      [885410.626332] INFO: Allocated in iscsit_allocate_cmd+0x1c/0xd4 [iscsi_target_mod] age=345 cpu=1 pid=22554
      [885411.855189] INFO: Freed in iscsit_release_cmd+0x208/0x217 [iscsi_target_mod] age=1410 cpu=1 pid=22554
      [885411.856048] INFO: Slab 0xffffea000002d480 objects=22 used=0 fp=0xffff880000cf7300 flags=0x4080
      [885411.856368] INFO: Object 0xffff880000cf33c0 @offset=13248 fp=0xffff880000cf6780
      [885411.955678] Pid: 22554, comm: iscsi_trx Not tainted 3.0.0-rc7+ #30
      [885411.956040] Call Trace:
      [885411.957029]  [<ffffffff810e5cf9>] print_trailer+0x12e/0x137
      [885412.752879]  [<ffffffff810e61d9>] check_bytes_and_report+0xb9/0xfd
      [885412.754933]  [<ffffffff810e62d2>] check_object+0xb5/0x192
      [885412.755099]  [<ffffffff810e6445>] __free_slab+0x96/0x13a
      [885412.757008]  [<ffffffff810e652a>] discard_slab+0x41/0x43
      [885412.758171]  [<ffffffff810e7a4c>] __slab_free+0xf3/0xfe
      [885412.761027]  [<ffffffffa030a536>] ? iscsit_release_cmd+0x208/0x217 [iscsi_target_mod]
      [885412.761354]  [<ffffffff810e7e95>] kmem_cache_free+0x6f/0xac
      [885412.761536]  [<ffffffffa030a536>] iscsit_release_cmd+0x208/0x217 [iscsi_target_mod]
      [885412.762056]  [<ffffffffa020e467>] ? iblock_free_task+0x34/0x39 [target_core_iblock]
      [885412.762368]  [<ffffffffa0314131>] lio_release_cmd+0x10/0x12 [iscsi_target_mod]
      [885412.764129]  [<ffffffffa02c2254>] transport_release_cmd+0x2f/0x33 [target_core_mod]
      [885412.805024]  [<ffffffffa02c230e>] transport_generic_remove+0xb6/0xc3 [target_core_mod]
      [885412.806424]  [<ffffffff81035b5f>] ? try_to_wake_up+0x1bd/0x1bd
      [885412.809033]  [<ffffffffa02c241f>] transport_generic_free_cmd+0x75/0x7d [target_core_mod]
      [885412.810066]  [<ffffffffa02c2643>] transport_generic_wait_for_tasks+0x21c/0x22b [target_core_mod]
      [885412.811056]  [<ffffffff8139f0b1>] ? mutex_lock+0x11/0x32
      [885412.813059]  [<ffffffff8139f0b1>] ? mutex_lock+0x11/0x32
      [885412.813200]  [<ffffffffa030b81d>] iscsit_close_connection+0x1d5/0x63a [iscsi_target_mod]
      [885412.813517]  [<ffffffffa0300a82>] iscsit_take_action_for_connection_exit+0xdb/0xe0 [iscsi_target_mod]
      [885412.813851]  [<ffffffffa03111e9>] iscsi_target_rx_thread+0x11f6/0x1221 [iscsi_target_mod]
      [885412.829024]  [<ffffffff81033e8d>] ? pick_next_task_fair+0xbe/0x10e
      [885412.831010]  [<ffffffffa030fff3>] ? iscsit_handle_scsi_cmd+0x91d/0x91d [iscsi_target_mod]
      [885412.833011]  [<ffffffffa030fff3>] ? iscsit_handle_scsi_cmd+0x91d/0x91d [iscsi_target_mod]
      [885412.835010]  [<ffffffff8105388a>] kthread+0x7d/0x85
      [885412.837022]  [<ffffffff813a7124>] kernel_thread_helper+0x4/0x10
      [885412.838008]  [<ffffffff8105380d>] ? kthread_worker_fn+0x145/0x145
      [885412.840047]  [<ffffffff813a7120>] ? gs_change+0x13/0x13
      [885412.842007] FIX lio_cmd_cache: Restoring 0xffff880000cf3750-0xffff880000cf378d=0x6
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Andy Grover <agrover@redhat.com>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
  5. 28 Jul, 2011 2 commits
    • Randy Dunlap's avatar
      target: iscsi_target depends on NET · d52a10d0
      Randy Dunlap authored
      iscsi target code uses lots on network interface functions, so it
      should depend on NET.  Fixes many build errors when NET is not enabled:
      ERROR: "kernel_sendmsg" [drivers/target/iscsi/iscsi_target_mod.ko] undefined!
      ERROR: "in_aton" [drivers/target/iscsi/iscsi_target_mod.ko] undefined!
      ERROR: "sock_release" [drivers/target/iscsi/iscsi_target_mod.ko] undefined!
      ERROR: "kernel_listen" [drivers/target/iscsi/iscsi_target_mod.ko] undefined!
      ERROR: "kernel_setsockopt" [drivers/target/iscsi/iscsi_target_mod.ko] undefined!
      ERROR: "kernel_recvmsg" [drivers/target/iscsi/iscsi_target_mod.ko] undefined!
      ERROR: "kernel_accept" [drivers/target/iscsi/iscsi_target_mod.ko] undefined!
      ERROR: "sock_create" [drivers/target/iscsi/iscsi_target_mod.ko] undefined!
      ERROR: "kernel_bind" [drivers/target/iscsi/iscsi_target_mod.ko] undefined!
      ERROR: "in6_pton" [drivers/target/iscsi/iscsi_target_mod.ko] undefined!
      Signed-off-by: default avatarRandy Dunlap <rdunlap@xenotime.net>
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
    • Nicholas Bellinger's avatar
      target: Fix WRITE_SAME_16 lba assignment breakage · 5db0753b
      Nicholas Bellinger authored
      This patch fixes a bug in WRITE_SAME_16 LBA assignment where get_unaligned_be16()
      is incorrectly being used instead of get_unaligned_be64() for a 64-bit LBA.
      This was introduced with:
      commit a1d8b49a
      Author: Andy Grover <agrover@redhat.com>
      Date:   Mon May 2 17:12:10 2011 -0700
          target: Updates from AGrover and HCH (round 3)
          (target: inline struct se_transport_task into struct se_cmd)
      Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
  6. 27 Jul, 2011 5 commits
  7. 26 Jul, 2011 2 commits
    • Nicholas Bellinger's avatar
      target: Convert to DIV_ROUND_UP_SECTOR_T usage for sectors / dev_max_sectors · 277c5f27
      Nicholas Bellinger authored
      This patch adds the new macro usage of include/linux/kernel.h:DIV_ROUND_UP_SECTOR_T
      for the new DIV_ROUND_UP_ULL() usage for 32-bit architectures with unsigned long long
      sector_t division in transport_allocate_data_tasks() usage for target_core_mod v4.1
      Reported-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarNicholas A. Bellinger <nab@linux-iscsi.org>
    • Nicholas Bellinger's avatar
      iscsi-target: Add iSCSI fabric support for target v4.1 · e48354ce
      Nicholas Bellinger authored
      The Linux-iSCSI.org target module is a full featured in-kernel
      software implementation of iSCSI target mode (RFC-3720) for the
      current WIP mainline target v4.1 infrastructure code for the v3.1
      kernel.  More information can be found here:
      This includes support for:
         * RFC-3720 defined request / response state machines and support for
           all defined iSCSI operation codes from Section using libiscsi
           include/scsi/iscsi_proto.h PDU definitions
         * Target v4.1 compatible control plane using the generic layout in
           target_core_fabric_configfs.c and fabric dependent attributes
           within /sys/kernel/config/target/iscsi/ subdirectories.
         * Target v4.1 compatible iSCSI statistics based on RFC-4544 (iSCSI MIBS)
         * Support for IPv6 and IPv4 network portals in M:N mapping to TPGs
         * iSCSI Error Recovery Hierarchy support
         * Per iSCSI connection RX/TX thread pair scheduling affinity
         * crc32c + crc32c_intel SSEv4 instruction offload support using libcrypto
         * CHAP Authentication support using libcrypto
         * Conversion to use internal SGl allocation with iscsit_alloc_buffs() ->
      (nab: Fix iscsi_proto.h struct scsi_lun usage from linux-next in commit:
            iscsi: Use struct scsi_lun in iscsi structs instead of u8[8])
      (nab: Fix 32-bit compile warnings)
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Reviewed-by: default avatarAndy Grover <agrover@redhat.com>
      Acked-by: default avatarRoland Dreier <roland@kernel.org>
      Signed-off-by: default avatarNicholas A. Bellinger <nab@linux-iscsi.org>
  8. 22 Jul, 2011 8 commits