<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/target, branch v3.11</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/target?h=v3.11</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/target?h=v3.11'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-07-11T19:57:19Z</updated>
<entry>
<title>Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending</title>
<updated>2013-07-11T19:57:19Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2013-07-11T19:57:19Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6d2fa9e141ea56a571ec842fd4f3a86bea44a203'/>
<id>urn:sha1:6d2fa9e141ea56a571ec842fd4f3a86bea44a203</id>
<content type='text'>
Pull SCSI target updates from Nicholas Bellinger:
 "Lots of activity this round on performance improvements in target-core
  while benchmarking the prototype scsi-mq initiator code with
  vhost-scsi fabric ports, along with a number of iscsi/iser-target
  improvements and hardening fixes for exception path cases post v3.10
  merge.

  The highlights include:

   - Make persistent reservations APTPL buffer allocated on-demand, and
     drop per t10_reservation buffer.  (grover)
   - Make virtual LUN=0 a NULLIO device, and skip allocation of NULLIO
     device pages (grover)
   - Add transport_cmd_check_stop write_pending bit to avoid extra
     access of -&gt;t_state_lock is WRITE I/O submission fast-path.  (nab)
   - Drop unnecessary CMD_T_DEV_ACTIVE check from
     transport_lun_remove_cmd to avoid extra access of -&gt;t_state_lock in
     release fast-path.  (nab)
   - Avoid extra t_state_lock access in __target_execute_cmd fast-path
     (nab)
   - Drop unnecessary vhost-scsi wait_for_tasks=true usage +
     -&gt;t_state_lock access in release fast-path.  (nab)
   - Convert vhost-scsi to use modern se_cmd-&gt;cmd_kref
     TARGET_SCF_ACK_KREF usage (nab)
   - Add tracepoints for SCSI commands being processed (roland)
   - Refactoring of iscsi-target handling of ISCSI_OP_NOOP +
     ISCSI_OP_TEXT to be transport independent (nab)
   - Add iscsi-target SendTargets=$IQN support for in-band discovery
     (nab)
   - Add iser-target support for in-band discovery (nab + Or)
   - Add iscsi-target demo-mode TPG authentication context support (nab)
   - Fix isert_put_reject payload buffer post (nab)
   - Fix iscsit_add_reject* usage for iser (nab)
   - Fix iscsit_sequence_cmd reject handling for iser (nab)
   - Fix ISCSI_OP_SCSI_TMFUNC handling for iser (nab)
   - Fix session reset bug with RDMA_CM_EVENT_DISCONNECTED (nab)

  The last five iscsi/iser-target items are CC'ed to stable, as they do
  address issues present in v3.10 code.  They are certainly larger than
  I'd like for stable patch set, but are important to ensure proper
  REJECT exception handling in iser-target for 3.10.y"

* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (51 commits)
  iser-target: Ignore non TEXT + LOGOUT opcodes for discovery
  target: make queue_tm_rsp() return void
  target: remove unused codes from enum tcm_tmrsp_table
  iscsi-target: kstrtou* configfs attribute parameter cleanups
  iscsi-target: Fix tfc_tpg_auth_cit configfs length overflow
  iscsi-target: Fix tfc_tpg_nacl_auth_cit configfs length overflow
  iser-target: Add support for ISCSI_OP_TEXT opcode + payload handling
  iser-target: Rename sense_buf_[dma,len] to pdu_[dma,len]
  iser-target: Add vendor_err debug output
  target: Add (obsolete) checking for PMI/LBA fields in READ CAPACITY(10)
  target: Return correct sense data for IO past the end of a device
  target: Add tracepoints for SCSI commands being processed
  iser-target: Fix session reset bug with RDMA_CM_EVENT_DISCONNECTED
  iscsi-target: Fix ISCSI_OP_SCSI_TMFUNC handling for iser
  iscsi-target: Fix iscsit_sequence_cmd reject handling for iser
  iscsi-target: Fix iscsit_add_reject* usage for iser
  iser-target: Fix isert_put_reject payload buffer post
  iscsi-target: missing kfree() on error path
  iscsi-target: Drop left-over iscsi_conn-&gt;bad_hdr
  target: Make core_scsi3_update_and_write_aptpl return sense_reason_t
  ...
</content>
</entry>
<entry>
<title>target: make queue_tm_rsp() return void</title>
<updated>2013-07-08T01:36:53Z</updated>
<author>
<name>Joern Engel</name>
<email>joern@logfs.org</email>
</author>
<published>2013-07-03T15:22:17Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b79fafac70fc9bbe640b8193ed772eb850efdfe6'/>
<id>urn:sha1:b79fafac70fc9bbe640b8193ed772eb850efdfe6</id>
<content type='text'>
The return value wasn't checked by any of the callers.  Assuming this is
correct behaviour, we can simplify some code by not bothering to
generate it.

nab: Add srpt_queue_data_in() + srpt_queue_tm_rsp() nops around
     srpt_queue_response() void return

Signed-off-by: Joern Engel &lt;joern@logfs.org&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: remove unused codes from enum tcm_tmrsp_table</title>
<updated>2013-07-08T01:36:52Z</updated>
<author>
<name>Joern Engel</name>
<email>joern@logfs.org</email>
</author>
<published>2013-07-03T15:22:16Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=11fee8a751670cf6d60b1912e2e9cb1c7e392842'/>
<id>urn:sha1:11fee8a751670cf6d60b1912e2e9cb1c7e392842</id>
<content type='text'>
Three have been checked for but were never set.  Remove the dead code.
Also renumbers the remaining ones to a) get rid of the holes after the
removal and b) avoid a collision between TMR_FUNCTION_COMPLETE==0 and
the uninitialized case.  If we failed to set a code, we should rather
fall into the default case then return success.

Signed-off-by: Joern Engel &lt;joern@logfs.org&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>iscsi-target: kstrtou* configfs attribute parameter cleanups</title>
<updated>2013-07-08T01:36:51Z</updated>
<author>
<name>Jörn Engel</name>
<email>joern@logfs.org</email>
</author>
<published>2013-07-03T15:35:11Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ad7babd23726b442b0b5fd92d8bd0611af5e5d6a'/>
<id>urn:sha1:ad7babd23726b442b0b5fd92d8bd0611af5e5d6a</id>
<content type='text'>
This patch includes the conversion of iscsi-target configfs
attributes for NetworkPortal, NodeACL, TPG, IQN and Discovery
groups to use kstrtou*() instead of simple_strtou*().

It also cleans up new-line usage during iscsi_tpg_param_store_##name
to use isspace().

Signed-off-by: Joern Engel &lt;joern@logfs.org&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>iscsi-target: Fix tfc_tpg_auth_cit configfs length overflow</title>
<updated>2013-07-08T01:36:50Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2013-07-06T23:48:55Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=37b32c6faf0e0e40c65c1014df7527ececdd3f9a'/>
<id>urn:sha1:37b32c6faf0e0e40c65c1014df7527ececdd3f9a</id>
<content type='text'>
This patch fixes another potential buffer overflow while processing
iscsi_node_auth input for configfs attributes in v3.11 for-next
TPG tfc_tpg_auth_cit context.

Reported-by: Joern Engel &lt;joern@logfs.org&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>iscsi-target: Fix tfc_tpg_nacl_auth_cit configfs length overflow</title>
<updated>2013-07-08T01:36:49Z</updated>
<author>
<name>Jörn Engel</name>
<email>joern@logfs.org</email>
</author>
<published>2013-07-03T15:35:11Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0fbfc46fb0b2f543a8b539e94c6c293ebc0b05a6'/>
<id>urn:sha1:0fbfc46fb0b2f543a8b539e94c6c293ebc0b05a6</id>
<content type='text'>
This patch fixes a potential buffer overflow while processing
iscsi_node_auth input for configfs attributes within NodeACL
tfc_tpg_nacl_auth_cit context.

Signed-off-by: Joern Engel &lt;joern@logfs.org&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Add (obsolete) checking for PMI/LBA fields in READ CAPACITY(10)</title>
<updated>2013-07-08T01:36:45Z</updated>
<author>
<name>Roland Dreier</name>
<email>roland@purestorage.com</email>
</author>
<published>2013-06-27T00:36:19Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8dc8632aa7bf1de7a56daea56a7011cbfff76678'/>
<id>urn:sha1:8dc8632aa7bf1de7a56daea56a7011cbfff76678</id>
<content type='text'>
The SBC-2 specification of READ CAPACITY(10) has PMI and LOGICAL BLOCK
ADDRESS fields in the CDB; in SBC-3 these fields are simply listed as
obsolete.  However, SBC-2 also has the language

    If the PMI bit is set to zero and the LOGICAL BLOCK ADDRESS field
    is not set to zero, the device server shall terminate the command
    with CHECK CONDITION status with the sense key set to ILLEGAL
    REQUEST and the additional sense code set to INVALID FIELD IN CDB.

and in fact at least the Windows SCSI compliance test checks this
behavior.  Since no one following SBC-3 is going to set these fields,
we might as well include the check from SBC-2 and pass this test.

Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Return correct sense data for IO past the end of a device</title>
<updated>2013-07-08T01:36:45Z</updated>
<author>
<name>Roland Dreier</name>
<email>roland@purestorage.com</email>
</author>
<published>2013-06-27T00:36:18Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=09ceadc70383a4105c0372f9e83da2c0cb0a8017'/>
<id>urn:sha1:09ceadc70383a4105c0372f9e83da2c0cb0a8017</id>
<content type='text'>
We should use TCM_ADDRESS_OUT_OF_RANGE (-&gt; sense data LOGICAL BLOCK
ADDRESS OUT OF RANGE) for IOs past the end of a device instead of
INVALID FIELD IN CDB.

Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Add tracepoints for SCSI commands being processed</title>
<updated>2013-07-08T01:36:44Z</updated>
<author>
<name>Roland Dreier</name>
<email>roland@purestorage.com</email>
</author>
<published>2013-06-27T00:36:17Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e5c0d6ad557b32f431a70a4efba820430f6ff88b'/>
<id>urn:sha1:e5c0d6ad557b32f431a70a4efba820430f6ff88b</id>
<content type='text'>
This patch adds tracepoints to the target code for commands being
received and being completed, which is quite useful for debugging
interactions with initiators. For example, one can do something like the
following to watch commands that are completing unsuccessfully:

    # echo 'scsi_status!=0' &gt; /sys/kernel/debug/tracing/events/target/target_cmd_complete/filter
    # echo 1 &gt; /sys/kernel/debug/tracing/events/target/target_cmd_complete/enable

        &lt;run command that fails&gt;

    # cat /sys/kernel/debug/tracing/trace
         iscsi_trx-0-1902  [003] ...1 990185.810385: target_cmd_complete: iqn.1993-08.org.debian:01:e51ede6aacfd &lt;- LUN 001 status CHECK CONDITION (sense len 18 / 70 00 05 00 00 00 00 0a 00 00 00 00 20 00 00 00 00 00)  0x95 data_length    512  CDB 95 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  (TA:SIMPLE C:00)

(v2: Drop undefined COMPARE_AND_WRITE)

Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>iser-target: Fix session reset bug with RDMA_CM_EVENT_DISCONNECTED</title>
<updated>2013-07-08T01:35:56Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2013-07-03T10:05:37Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b2cb96494d83b894a43ba8b9023eead8ff50684b'/>
<id>urn:sha1:b2cb96494d83b894a43ba8b9023eead8ff50684b</id>
<content type='text'>
This patch addresses a bug where RDMA_CM_EVENT_DISCONNECTED may occur
before the connection shutdown has been completed by rx/tx threads,
that causes isert_free_conn() to wait indefinately on -&gt;conn_wait.

This patch allows isert_disconnect_work code to invoke rdma_disconnect
when isert_disconnect_work() process context is started by client
session reset before isert_free_conn() code has been reached.

It also adds isert_conn-&gt;conn_mutex protection for -&gt;state within
isert_disconnect_work(), isert_cq_comp_err() and isert_free_conn()
code, along with isert_check_state() for wait_event usage.

(v2: Add explicit iscsit_cause_connection_reinstatement call
     during isert_disconnect_work() to force conn reset)

Cc: stable@vger.kernel.org  # 3.10+
Cc: Or Gerlitz &lt;ogerlitz@mellanox.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
</feed>
