<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/include/target, branch v3.3</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/include/target?h=v3.3</id>
<link rel='self' href='https://git.amat.us/linux/atom/include/target?h=v3.3'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-02-07T06:41:04Z</updated>
<entry>
<title>target: Change target_submit_cmd() to return void</title>
<updated>2012-02-07T06:41:04Z</updated>
<author>
<name>Andy Grover</name>
<email>agrover@redhat.com</email>
</author>
<published>2012-01-19T21:39:23Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1edcdb497ef418122cd4f98e157660cf594b345a'/>
<id>urn:sha1:1edcdb497ef418122cd4f98e157660cf594b345a</id>
<content type='text'>
Retval not very useful, and may even be harmful. Once submitted, fabrics
should expect a sense error if anything goes wrong. All fabrics checking
of this retval are useless or broken:

fc checks it just to emit more debug output.
ib_srpt trickles retval up, then it is ignored.
qla2xxx trickles it up, which then causes a bug because the abort goto
in qla_target.c thinks cmd hasn't been sent to target.

Just returning nothing is best.

Signed-off-by: Andy Grover &lt;agrover@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Allow control CDBs with data &gt; 1 page</title>
<updated>2012-01-18T08:35:58Z</updated>
<author>
<name>Andy Grover</name>
<email>agrover@redhat.com</email>
</author>
<published>2012-01-17T00:57:08Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4949314c7283ea4f9ade182ca599583b89f7edd6'/>
<id>urn:sha1:4949314c7283ea4f9ade182ca599583b89f7edd6</id>
<content type='text'>
We need to handle &gt;1 page control cdbs, so extend the code to do a vmap
if bigger than 1 page. It seems like kmap() is still preferable if just
a page, fewer TLB shootdowns(?), so keep using that when possible.

Rename function pair for their new scope.

Signed-off-by: Andy Grover &lt;agrover@redhat.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Set additional sense length field in sense data</title>
<updated>2011-12-16T06:29:04Z</updated>
<author>
<name>Roland Dreier</name>
<email>roland@purestorage.com</email>
</author>
<published>2011-12-13T22:55:33Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=895f3022523361e9b383cf48f51feb1f7d5e7e53'/>
<id>urn:sha1:895f3022523361e9b383cf48f51feb1f7d5e7e53</id>
<content type='text'>
The target code was not setting the additional sense length field in the
sense data it returned, which meant that at least the Linux stack
ignored the ASC/ASCQ fields.  For example, without this patch, on a
tcm_loop device:

    # sg_raw -v /dev/sda 2 0 0 0 0 0

gives

        cdb to send: 02 00 00 00 00 00
    SCSI Status: Check Condition

    Sense Information:
     Fixed format, current;  Sense key: Illegal Request
      Raw sense data (in hex):
            70 00 05 00 00 00 00 00

while after the patch we correctly get the following (which matches what
a regular disk returns):

        cdb to send: 02 00 00 00 00 00
    SCSI Status: Check Condition

    Sense Information:
     Fixed format, current;  Sense key: Illegal Request
     Additional sense: Invalid command operation code
     Raw sense data (in hex):
            70 00 05 00 00 00 00 0a  00 00 00 00 20 00 00 00
            00 00

Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
Cc: stable@kernel.org
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Remove extra se_device-&gt;execute_task_lock access in fast path</title>
<updated>2011-12-14T11:48:46Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2011-12-01T02:18:33Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4d2300ccffd22d1d0213b6a8e4d685eb6ca069c0'/>
<id>urn:sha1:4d2300ccffd22d1d0213b6a8e4d685eb6ca069c0</id>
<content type='text'>
This patch makes __transport_execute_tasks() perform the addition of
tasks to dev-&gt;execute_task_list via __transport_add_tasks_from_cmd()
while holding dev-&gt;execute_task_lock during normal I/O fast path
submission.

It effectively removes the unnecessary re-acquire of dev-&gt;execute_task_lock
during transport_execute_tasks() -&gt; transport_add_tasks_from_cmd() ahead
of calling  __transport_execute_tasks() to queue tasks for the passed
*se_cmd descriptor.

(v2: Re-add goto check_depth usage for multi-task submission for now..)

Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Roland Dreier &lt;roland@purestorage.com&gt;
Cc: Joern Engel &lt;joern@logfs.org&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Drop se_device TCQ queue_depth usage from I/O path</title>
<updated>2011-12-14T11:42:13Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2011-11-30T09:25:21Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=65586d51e0986be574118286c3d0007e903a2add'/>
<id>urn:sha1:65586d51e0986be574118286c3d0007e903a2add</id>
<content type='text'>
Historically, pSCSI devices have been the ones that required target-core
to enforce a per se_device-&gt;depth_left.  This patch changes target-core
to no longer (by default) enforce a per se_device-&gt;depth_left or sleep in
transport_tcq_window_closed() when we out of queue slots for all backend
export cases.

Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Roland Dreier &lt;roland@purestorage.com&gt;
Cc: Joern Engel &lt;joern@logfs.org&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Remove TFO-&gt;check_release_cmd() fabric API caller</title>
<updated>2011-12-14T11:42:11Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2011-12-14T10:50:16Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ec54cc081ead14e85736c6543e36ec59be8a7d3d'/>
<id>urn:sha1:ec54cc081ead14e85736c6543e36ec59be8a7d3d</id>
<content type='text'>
Remove the now unused target_core_fabric_ops-&gt;check_release_cmd() as
target_core handles this directly for se_cmd-&gt;cmd_kref objects now.

Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Add target_submit_cmd() for process context fabric submission</title>
<updated>2011-12-14T11:40:56Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2011-11-19T04:36:22Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a63607855224702ea17e6016ecf3f7d544e83625'/>
<id>urn:sha1:a63607855224702ea17e6016ecf3f7d544e83625</id>
<content type='text'>
This patch adds a target_submit_cmd() caller that can be used by fabrics
to submit an uninitialized se_cmd descriptor to an struct se_session +
unpacked_lun from workqueue process context.  This call will invoke the
following steps:

- transport_init_se_cmd() to setup se_cmd specific pointers
- Obtain se_cmd-&gt;cmd_kref references with target_get_sess_cmd()
- set se_cmd-&gt;t_tasks_bidi
- transport_lookup_cmd_lun() to setup struct se_cmd-&gt;se_lun from
  the passed unpacked_lun
- transport_generic_allocate_tasks() to setup the passed *cdb, and
- transport_handle_cdb_direct() handle READ dispatch or WRITE
  ready-to-transfer callback to fabric

v2 changes from hch feedback:

*) Add target_sc_flags_table for target_submit_cmd flags
*) Rename bidi parameter to flags, add TARGET_SCF_BIDI_OP
*) Convert checks to BUG_ON
*) Add out_check_cond for transport_send_check_condition_and_sense
   usage

v3 changes:

*) Add TARGET_SCF_ACK_KREF for target_submit_cmd into
   target_get_sess_cmd to determine when the fabric caller is expecting
   a second kref_put() from fabric packet acknowledgement.

Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Roland Dreier &lt;roland@purestorage.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Make target_put_sess_cmd use target_release_cmd_kref</title>
<updated>2011-12-14T11:38:29Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2011-11-12T08:32:17Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7481deb413be132a22193e8a0bce88b311ecb3c2'/>
<id>urn:sha1:7481deb413be132a22193e8a0bce88b311ecb3c2</id>
<content type='text'>
This patch moves target_put_sess_cmd() to use a se_cmd-&gt;cmd_kref
callback target_release_cmd_kref when performing driver release of
fabric-&gt;se_cmd descriptor memory.  It sets the default cmd_kref
count value to '2' within target_get_sess_cmd() setup, and
currently assumes TFO-&gt;check_stop_free() usage.

It drops se_tfo-&gt;check_release_cmd() usage in the main
transport_release_cmd codepath.

Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: remove overagressive ____cacheline_aligned annoations</title>
<updated>2011-12-14T11:28:13Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@infradead.org</email>
</author>
<published>2011-11-29T08:29:38Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e0a53e70e8d519579d92c150606ece22333645cb'/>
<id>urn:sha1:e0a53e70e8d519579d92c150606ece22333645cb</id>
<content type='text'>
If we want dynamically allocated objects to be cacheline aligned we need
to tell that to the slab allocator by using the proper flags and not
by liberally sprinkling annotations onto all structures.

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: make the se_task task_state_active a normal bool</title>
<updated>2011-12-14T11:27:02Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@infradead.org</email>
</author>
<published>2011-11-23T11:54:36Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1880807adb21d741f08b747956c90bf4a6f95fbf'/>
<id>urn:sha1:1880807adb21d741f08b747956c90bf4a6f95fbf</id>
<content type='text'>
There is no need to make task_state_active an atomic_t given that it is
always set under the execute_task_lock so we can make it a simple bool.
Also rename it to t_state_active to be closer to the list it guards,
and make sure all checks before the list addion/removal actually happen
under execute_task_lock.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
</feed>
