1. 27 10月, 2011 6 次提交
    • J
      target: Minor cleanups to core_tmr_drain_tmr_list · abc1fd4f
      Joern Engel 提交于
      This patch adds a handful minor cleanups to core_tmr_drain_tmr_list() that
      remove an unnecessary NULL check, use list_for_each_entry_safe() instead of
      list_entry(), and makes the drain_tmr_list walk use *tmr_p instead of
      directly referencing the passed *tmr function parameter.
      Signed-off-by: NJoern Engel <joern@logfs.org>
      Cc: Joern Engel <joern@logfs.org>
      Reviewed-by: NRoland Dreier <roland@purestorage.com>
      Cc: Roland Dreier <roland@purestorage.com>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      abc1fd4f
    • J
      target: Fix wrong se_tmr being added to drain_tmr_list · 6eb40b2a
      Joern Engel 提交于
      This patch fixes another bug from LUN_RESET re-org fallout in
      core_tmr_drain_tmr_list() that was adding the wrong se_tmr_req
      into the local drain_tmr_list to be walked + released.
      Signed-off-by: NJoern Engel <joern@logfs.org>
      Cc: Joern Engel <joern@logfs.org>
      Reviewed-by: NRoland Dreier <roland@purestorage.com>
      Cc: Roland Dreier <roland@purestorage.com>
      Cc: stable@kernel.org
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      6eb40b2a
    • J
      target: Fix incorrect se_cmd assignment in core_tmr_drain_tmr_list · 80ccbc8e
      Joern Engel 提交于
      This patch fixes a bug in core_tmr_drain_tmr_list() where drain_tmr_list
      was using the wrong se_tmr_req for cmd assignment due to a typo during the
      LUN_RESET re-org.  This was resulting in general protection faults while
      using the leftover bogus *tmr_p pointer from list_for_each_entry_safe().
      Signed-off-by: NJoern Engel <joern@logfs.org>
      Cc: Joern Engel <joern@logfs.org>
      Cc: stable@kernel.org
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      80ccbc8e
    • N
      target: Check -ENOMEM to signal QUEUE_FULL from fabric callbacks · f147abb4
      Nicholas Bellinger 提交于
      This patch changes target core to also check for -ENOMEM from fabric callbacks
      to signal QUEUE_FULL status, instead of just -EAGAIN in order to catch a
      larger set of fabric failure cases that want to trigger QUEUE_FULL logic.
      This includes the callbacks for ->write_pending(), ->queue_data_in() and
      ->queue_status().
      
      It also makes transport_generic_write_pending() return zero upon QUEUE_FULL,
      and removes two unnecessary -EAGAIN checks to catch write pending QUEUE_FULL
      cases from transport_generic_new_cmd() failures in transport_handle_cdb_direct()
      and transport_processing_thread():TRANSPORT_NEW_CMD_MAP state.
      Reported-by: NBart Van Assche <bvanassche@acm.org>
      Cc: Bart Van Assche <bvanassche@acm.org>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Roland Dreier <roland@purestorage.com>
      Signed-off-by: NNicholas A. Bellinger <nab@linux-iscsi.org>
      f147abb4
    • 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
    • N
      target: Fix compile warning w/ missing module.h include · c9abb9bb
      Nicholas Bellinger 提交于
      This patch fixes the following compile warning in target_core_cdb.c in
      recent linux-next code due to the new use of EXPORT_SYMBOL() for
      target_get_task_cdb().
      
      drivers/target/target_core_cdb.c:1316: warning: data definition has no type or storage class
      drivers/target/target_core_cdb.c:1316: warning: type defaults to ‘int’ in declaration of ‘EXPORT_SYMBOL’
      drivers/target/target_core_cdb.c:1316: warning: parameter names (without types) in function declaration
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      c9abb9bb
  2. 24 10月, 2011 34 次提交