<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/target, branch v3.14</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/target?h=v3.14</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/target?h=v3.14'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2014-03-07T04:52:11Z</updated>
<entry>
<title>Target/sbc: Fix sbc_copy_prot for offset scatters</title>
<updated>2014-03-07T04:52:11Z</updated>
<author>
<name>Sagi Grimberg</name>
<email>sagig@mellanox.com</email>
</author>
<published>2014-03-05T12:05:09Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=16c0ae028989df40bdab46b7f241d331ddc97c59'/>
<id>urn:sha1:16c0ae028989df40bdab46b7f241d331ddc97c59</id>
<content type='text'>
When copying between device and command protection scatters
we must take into account that device scatters might be offset
and we might copy outside scatter range. Thus for each cmd prot
scatter we must take the min between cmd prot scatter, dev prot
scatter, and whats left (and loop in case we havn't copied enough
from/to cmd prot scatter).

Example (single t_prot_sg of len 2048):
kernel: sbc_dif_copy_prot: se_cmd=ffff880380aaf970, left=2048, len=2048, dev_prot_sg_offset=3072, dev_prot_sg_len=4096
kernel: isert: se_cmd=ffff880380aaf970 PI error found type 0 at sector 0x2600 expected 0x0 vs actual 0x725f, lba=2580

Instead of copying 2048 from offset 3072 (copying junk outside sg
limit 4096), we must to copy 1024 and continue to next sg until
we complete cmd prot scatter.

This issue was found using iSER T10-PI offload over rd_mcp (wasn't
discovered with fileio since file_dev prot sglists are never offset).

Changes from v1:
- Fix sbc_copy_prot copy length miss-calculation

Changes from v0:
- Removed psg-&gt;offset consideration for psg_len computation
- Removed sg-&gt;offset consideration for offset condition
- Added copied consideraiton for len computation
- Added copied offset to paddr when doing memcpy

Signed-off-by: Sagi Grimberg &lt;sagig@mellanox.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>iscsi/iser-target: Fix isert_conn-&gt;state hung shutdown issues</title>
<updated>2014-03-05T01:54:09Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2014-02-03T20:54:39Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=defd884845297fd5690594bfe89656b01f16d87e'/>
<id>urn:sha1:defd884845297fd5690594bfe89656b01f16d87e</id>
<content type='text'>
This patch addresses a couple of different hug shutdown issues
related to wait_event() + isert_conn-&gt;state.  First, it changes
isert_conn-&gt;conn_wait + isert_conn-&gt;conn_wait_comp_err from
waitqueues to completions, and sets ISER_CONN_TERMINATING from
within isert_disconnect_work().

Second, it splits isert_free_conn() into isert_wait_conn() that
is called earlier in iscsit_close_connection() to ensure that
all outstanding commands have completed before continuing.

Finally, it breaks isert_cq_comp_err() into seperate TX / RX
related code, and adds logic in isert_cq_rx_comp_err() to wait
for outstanding commands to complete before setting ISER_CONN_DOWN
and calling complete(&amp;isert_conn-&gt;conn_wait_comp_err).

Acked-by: Sagi Grimberg &lt;sagig@mellanox.com&gt;
Cc: Or Gerlitz &lt;ogerlitz@mellanox.com&gt;
Cc: &lt;stable@vger.kernel.org&gt; #3.10+
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>iscsi/iser-target: Use list_del_init for -&gt;i_conn_node</title>
<updated>2014-03-05T01:54:09Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2014-02-03T20:53:51Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5159d763f60af693a3fcec45dce2021f66e528a4'/>
<id>urn:sha1:5159d763f60af693a3fcec45dce2021f66e528a4</id>
<content type='text'>
There are a handful of uses of list_empty() for cmd-&gt;i_conn_node
within iser-target code that expect to return false once a cmd
has been removed from the per connect list.

This patch changes all uses of list_del -&gt; list_del_init in order
to ensure that list_empty() returns false as expected.

Acked-by: Sagi Grimberg &lt;sagig@mellanox.com&gt;
Cc: Or Gerlitz &lt;ogerlitz@mellanox.com&gt;
Cc: &lt;stable@vger.kernel.org&gt; #3.10+
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>iscsi-target: Fix iscsit_get_tpg_from_np tpg_state bug</title>
<updated>2014-03-05T01:54:09Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2014-02-26T11:09:41Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a2a99cea5ec7c1e47825559f0e75a4efbcf8aee3'/>
<id>urn:sha1:a2a99cea5ec7c1e47825559f0e75a4efbcf8aee3</id>
<content type='text'>
This patch fixes a bug in iscsit_get_tpg_from_np() where the
tpg-&gt;tpg_state sanity check was looking for TPG_STATE_FREE,
instead of != TPG_STATE_ACTIVE.

The latter is expected during a normal TPG shutdown once the
tpg_state goes into TPG_STATE_INACTIVE in order to reject any
new incoming login attempts.

Cc: &lt;stable@vger.kernel.org&gt; #3.10+
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>Target/sbc: Don't use sg as iterator in sbc_verify_read</title>
<updated>2014-02-24T00:35:32Z</updated>
<author>
<name>Sagi Grimberg</name>
<email>sagig@mellanox.com</email>
</author>
<published>2014-02-23T12:20:08Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=fc272ec7a2dfe002b823c78f8ef0eb88042e2762'/>
<id>urn:sha1:fc272ec7a2dfe002b823c78f8ef0eb88042e2762</id>
<content type='text'>
Because then this sg is passed to sbc_copy_prot which will
hit a protection fault in cases we have more than a single sg.

Signed-off-by: Sagi Grimberg &lt;sagig@mellanox.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Add DIF sense codes in transport_generic_request_failure</title>
<updated>2014-02-24T00:31:24Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2014-02-23T14:04:09Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=94387aa7cec8c5386b405b852cf3e5be38456fc7'/>
<id>urn:sha1:94387aa7cec8c5386b405b852cf3e5be38456fc7</id>
<content type='text'>
This patch adds the three missing DIF related sense codes within
transport_generic_request_failure(), which are required to ensure
that the correct ASC/ASQC is generated by the subsequent call to
transport_send_check_condition_and_sense().

Cc: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Hannes Reinecke &lt;hare@suse.de&gt;
Cc: Sagi Grimberg &lt;sagig@mellanox.com&gt;
Cc: Or Gerlitz &lt;ogerlitz@mellanox.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target/sbc: Fix sbc_dif_copy_prot addr offset bug</title>
<updated>2014-02-24T00:19:23Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2014-02-23T12:52:44Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=10762e80489e73e2d52bf78e0869f253f42821bd'/>
<id>urn:sha1:10762e80489e73e2d52bf78e0869f253f42821bd</id>
<content type='text'>
This patch fixes a bug in sbc_dif_copy_prot() where the updated addr
offset did not take into account the case where the associated
scatterlist had not been incremented.

This addresses the case where incoming protection scatterlists may
contain a length smaller than PAGE_SIZE across multiple entires,
when the target protection scatterlists are always being explicitly
filled up to PAGE_SIZE before adding another entry.

Cc: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Hannes Reinecke &lt;hare@suse.de&gt;
Cc: Sagi Grimberg &lt;sagig@mellanox.com&gt;
Cc: Or Gerlitz &lt;ogerlitz@mellanox.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>Target/sbc: Fix protection copy routine</title>
<updated>2014-02-12T23:14:45Z</updated>
<author>
<name>Sagi Grimberg</name>
<email>sagig@mellanox.com</email>
</author>
<published>2014-02-12T09:40:25Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d6a65fdc8903e632aa7bf86ee0f61a73969371f6'/>
<id>urn:sha1:d6a65fdc8903e632aa7bf86ee0f61a73969371f6</id>
<content type='text'>
Need to take into account that protection sg_list
(copy-buffer) may consist of multiple entries.

Changes from v0:
- Changed commit description

Signed-off-by: Sagi Grimberg &lt;sagig@mellanox.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Simplify command completion by removing CMD_T_FAILED flag</title>
<updated>2014-02-12T23:14:30Z</updated>
<author>
<name>Roland Dreier</name>
<email>roland@purestorage.com</email>
</author>
<published>2014-02-03T22:08:26Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3dca1471993f9b89f3184468f8bbab2b1e024451'/>
<id>urn:sha1:3dca1471993f9b89f3184468f8bbab2b1e024451</id>
<content type='text'>
The CMD_T_FAILED flag is set used in one place to record the result of a
trivial test, and it is only tested once, few lines later.  We might as
well make the code simpler and easier to read by directly doing the test
of "success" where we want to use it.

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>iscsi-target: Fix SNACK Type 1 + BegRun=0 handling</title>
<updated>2014-02-12T23:11:17Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2014-02-03T20:55:42Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=752d86805b18e58c56c6f3c7004c2dffd4430c17'/>
<id>urn:sha1:752d86805b18e58c56c6f3c7004c2dffd4430c17</id>
<content type='text'>
This patch fixes Status SNACK handling of BegRun=0 to allow
for all unacknowledged respones to be resent, instead of
always assuming that BegRun would be an explicit value less
than the current ExpStatSN.

Reported-by: santosh kulkarni &lt;santosh.kulkarni@calsoftinc.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
</feed>
