<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/target, branch v4.7.3</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.7.3</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.7.3'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2016-08-20T16:11:03+00:00</updated>
<entry>
<title>target: Fix ordered task CHECK_CONDITION early exception handling</title>
<updated>2016-08-20T16:11:03+00:00</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2016-06-14T05:58:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4f924930c8f899ba5c1ed64b59b55ca950768688'/>
<id>urn:sha1:4f924930c8f899ba5c1ed64b59b55ca950768688</id>
<content type='text'>
commit 410c29dfbfdf73d0d0b5d14a21868ab038eca703 upstream.

If a Simple command is sent with a failure, target_setup_cmd_from_cdb
returns with TCM_UNSUPPORTED_SCSI_OPCODE or TCM_INVALID_CDB_FIELD.

So in the cases where target_setup_cmd_from_cdb returns an error, we
never get far enough to call target_execute_cmd to increment simple_cmds.
Since simple_cmds isn't incremented, the result of the failure from
target_setup_cmd_from_cdb causes transport_generic_request_failure to
decrement simple_cmds, due to call to transport_complete_task_attr.

With this dev-&gt;simple_cmds or dev-&gt;dev_ordered_sync is now -1, not 0.
So when a subsequent command with an Ordered Task is sent, it causes
a hang, since dev-&gt;simple_cmds is at -1.

Tested-by: Bryant G. Ly &lt;bryantly@linux.vnet.ibm.com&gt;
Signed-off-by: Bryant G. Ly &lt;bryantly@linux.vnet.ibm.com&gt;
Tested-by: Michael Cyr &lt;mikecyr@linux.vnet.ibm.com&gt;
Signed-off-by: Michael Cyr &lt;mikecyr@linux.vnet.ibm.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>target: Fix max_unmap_lba_count calc overflow</title>
<updated>2016-08-20T16:11:03+00:00</updated>
<author>
<name>Mike Christie</name>
<email>mchristi@redhat.com</email>
</author>
<published>2016-06-03T01:12:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6bcdc94d697ea1ffe7497bd042feec29d3199c47'/>
<id>urn:sha1:6bcdc94d697ea1ffe7497bd042feec29d3199c47</id>
<content type='text'>
commit ea263c7fada4af8ec7fe5fcfd6e7d7705a89351b upstream.

max_discard_sectors only 32bits, and some non scsi backend
devices will set this to the max 0xffffffff, so we can end up
overflowing during the max_unmap_lba_count calculation.

This fixes a regression caused by my patch:

commit 8a9ebe717a133ba7bc90b06047f43cc6b8bcb8b3
Author: Mike Christie &lt;mchristi@redhat.com&gt;
Date:   Mon Jan 18 14:09:27 2016 -0600

    target: Fix WRITE_SAME/DISCARD conversion to linux 512b sectors

which can result in extra discards being sent to due the overflow
causing max_unmap_lba_count to be smaller than what the backing
device can actually support.

Signed-off-by: Mike Christie &lt;mchristi@redhat.com&gt;
Reviewed-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>target: Fix ordered task target_setup_cmd_from_cdb exception hang</title>
<updated>2016-08-20T16:11:02+00:00</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2016-05-18T05:19:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f5405497b4ed1c00a947b70bc4d28403e0fb7f36'/>
<id>urn:sha1:f5405497b4ed1c00a947b70bc4d28403e0fb7f36</id>
<content type='text'>
commit dff0ca9ea7dc8be2181a62df4a722c32ce68ff4a upstream.

If a command with a Simple task attribute is failed due to a Unit
Attention, then a subsequent command with an Ordered task attribute
will hang forever.  The reason for this is that the Unit Attention
status is checked for in target_setup_cmd_from_cdb, before the call
to target_execute_cmd, which calls target_handle_task_attr, which
in turn increments dev-&gt;simple_cmds.

However, transport_generic_request_failure still calls
transport_complete_task_attr, which will decrement dev-&gt;simple_cmds.
In this case, simple_cmds is now -1.  So when a command with the
Ordered task attribute is sent, target_handle_task_attr sees that
dev-&gt;simple_cmds is not 0, so it decides it can't execute the
command until all the (nonexistent) Simple commands have completed.

Reported-by: Michael Cyr &lt;mikecyr@linux.vnet.ibm.com&gt;
Tested-by: Michael Cyr &lt;mikecyr@linux.vnet.ibm.com&gt;
Reported-by: Bryant G. Ly &lt;bryantly@linux.vnet.ibm.com&gt;
Tested-by: Bryant G. Ly &lt;bryantly@linux.vnet.ibm.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending</title>
<updated>2016-05-28T19:04:17+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-05-28T19:04:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9ba55cf7cfbfd12a7e914d0d55b7581e896b3f0d'/>
<id>urn:sha1:9ba55cf7cfbfd12a7e914d0d55b7581e896b3f0d</id>
<content type='text'>
Pull SCSI target updates from Nicholas Bellinger:
 "Here are the outstanding target pending updates for v4.7-rc1.

  The highlights this round include:

   - Allow external PR/ALUA metadata path be defined at runtime via top
     level configfs attribute (Lee)
   - Fix target session shutdown bug for ib_srpt multi-channel (hch)
   - Make TFO close_session() and shutdown_session() optional (hch)
   - Drop se_sess-&gt;sess_kref + convert tcm_qla2xxx to internal kref
     (hch)
   - Add tcm_qla2xxx endpoint attribute for basic FC jammer (Laurence)
   - Refactor iscsi-target RX/TX PDU encode/decode into common code
     (Varun)
   - Extend iscsit_transport with xmit_pdu, release_cmd, get_rx_pdu,
     validate_parameters, and get_r2t_ttt for generic ISO offload
     (Varun)
   - Initial merge of cxgb iscsi-segment offload target driver (Varun)

  The bulk of the changes are Chelsio's new driver, along with a number
  of iscsi-target common code improvements made by Varun + Co along the
  way"

* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (29 commits)
  iscsi-target: Fix early sk_data_ready LOGIN_FLAGS_READY race
  cxgbit: Use type ISCSI_CXGBIT + cxgbit tpg_np attribute
  iscsi-target: Convert transport drivers to signal rdma_shutdown
  iscsi-target: Make iscsi_tpg_np driver show/store use generic code
  tcm_qla2xxx Add SCSI command jammer/discard capability
  iscsi-target: graceful disconnect on invalid mapping to iovec
  target: need_to_release is always false, remove redundant check and kfree
  target: remove sess_kref and -&gt;shutdown_session
  iscsi-target: remove usage of -&gt;shutdown_session
  tcm_qla2xxx: introduce a private sess_kref
  target: make close_session optional
  target: make -&gt;shutdown_session optional
  target: remove acl_stop
  target: consolidate and fix session shutdown
  cxgbit: add files for cxgbit.ko
  iscsi-target: export symbols
  iscsi-target: call complete on conn_logout_comp
  iscsi-target: clear tx_thread_active
  iscsi-target: add new offload transport type
  iscsi-target: use conn_transport-&gt;transport_type in text rsp
  ...
</content>
</entry>
<entry>
<title>cxgbit: Use type ISCSI_CXGBIT + cxgbit tpg_np attribute</title>
<updated>2016-05-17T05:23:59+00:00</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2016-05-15T05:28:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ff7199b04f08e1a72637ba66cd2c05842dc592d0'/>
<id>urn:sha1:ff7199b04f08e1a72637ba66cd2c05842dc592d0</id>
<content type='text'>
Instead of having cxgbit use type ISCSI_HW_OFFLOAD + 'hw_offload'
tpg_np attribute, it should be using it's own driver specific
type + attribute

Cc: Varun Prakash &lt;varun@chelsio.com&gt;
Cc: Hariprasad Shenai &lt;hariprasad@chelsio.com&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Sagi Grimberg &lt;sagi@grimberg.me&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>iscsi-target: Convert transport drivers to signal rdma_shutdown</title>
<updated>2016-05-17T05:23:33+00:00</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2016-05-15T05:23:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bd027d856d3d7260017d0dc932201ce5fd7561f9'/>
<id>urn:sha1:bd027d856d3d7260017d0dc932201ce5fd7561f9</id>
<content type='text'>
Instead of special casing the handful of callers that check for
iser-target rdma verbs specific shutdown, use a simple flag at
iscsit_transport-&gt;rdma_shutdown so each driver can signal this.

Also, update iscsi-target/tcp + cxgbit to rdma_shutdown = false.

Cc: Varun Prakash &lt;varun@chelsio.com&gt;
Cc: Hariprasad Shenai &lt;hariprasad@chelsio.com&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Sagi Grimberg &lt;sagi@grimberg.me&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: enhance and export target_alloc_sgl/target_free_sgl</title>
<updated>2016-05-13T17:37:19+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2016-05-03T16:01:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e64aa657c3d0dae84c2ccc166f6fe25b7d1d28c6'/>
<id>urn:sha1:e64aa657c3d0dae84c2ccc166f6fe25b7d1d28c6</id>
<content type='text'>
The SRP target driver will need to allocate and chain it's own SGLs soon.
For this export target_alloc_sgl, and add a new argument to it so that it
can allocate an additional chain entry that doesn't point to a page.  Also
export transport_free_sgl after renaming it to target_free_sgl to free
these SGLs again.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt;
Signed-off-by: Doug Ledford &lt;dledford@redhat.com&gt;
</content>
</entry>
<entry>
<title>target: remove sess_kref and -&gt;shutdown_session</title>
<updated>2016-05-10T08:19:49+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2016-05-02T13:45:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d94331fab6d4d48280a5cea646352db90777966d'/>
<id>urn:sha1:d94331fab6d4d48280a5cea646352db90777966d</id>
<content type='text'>
Both of them are unused now that drivers handle any delayed session
shutdown internally.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: remove acl_stop</title>
<updated>2016-05-10T08:19:11+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2016-05-02T13:45:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fba81f8831b20272a97a990e5d47c332e9b1f65d'/>
<id>urn:sha1:fba81f8831b20272a97a990e5d47c332e9b1f65d</id>
<content type='text'>
Ensure we can use list_empty on the sess_acl_list to remove the need for
this flag.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>iscsi-target: export symbols</title>
<updated>2016-05-10T06:12:28+00:00</updated>
<author>
<name>Varun Prakash</name>
<email>varun@chelsio.com</email>
</author>
<published>2016-04-19T18:30:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d2faaefb8d4c63fbc680512b04f9eb57667e2682'/>
<id>urn:sha1:d2faaefb8d4c63fbc680512b04f9eb57667e2682</id>
<content type='text'>
export symbols for ISCSI_HW_OFFLOAD
transport drivers.

Signed-off-by: Varun Prakash &lt;varun@chelsio.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
</feed>
