<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/target/target_core_backend.h, branch v3.18.136</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v3.18.136</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v3.18.136'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2014-06-11T19:15:30+00:00</updated>
<entry>
<title>target: Report correct response length for some commands</title>
<updated>2014-06-11T19:15:30+00:00</updated>
<author>
<name>Roland Dreier</name>
<email>roland@purestorage.com</email>
</author>
<published>2014-06-10T18:07:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2426bd456a61407388b6e61fc5f98dbcbebc50e2'/>
<id>urn:sha1:2426bd456a61407388b6e61fc5f98dbcbebc50e2</id>
<content type='text'>
When an initiator sends an allocation length bigger than what its
command consumes, the target should only return the actual response data
and set the residual length to the unused part of the allocation length.

Add a helper function that command handlers (INQUIRY, READ CAPACITY,
etc) can use to do this correctly, and use this code to get the correct
residual for commands that don't use the full initiator allocation in the
handlers for READ CAPACITY, READ CAPACITY(16), INQUIRY, MODE SENSE and
REPORT LUNS.

This addresses a handful of failures as reported by Christophe with
the Windows Certification Kit:

  http://permalink.gmane.org/gmane.linux.scsi.target.devel/6515

Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
Tested-by: Christophe Vu-Brugier &lt;cvubrugier@yahoo.fr&gt;
Cc: stable@vger.kernel.org # 3.10+
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target/sbc: Add sbc_dif_read_strip software emulation</title>
<updated>2014-04-07T08:48:57+00:00</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2014-04-02T21:34:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=395ccb2531021974d309f26e5fb08a8240ac5f84'/>
<id>urn:sha1:395ccb2531021974d309f26e5fb08a8240ac5f84</id>
<content type='text'>
Split up __sbc_dif_verify_read() so that VERIFY READ emulation can
perform target-core specific READ_STRIP, seperate from the existing
FILEIO/RAMDISK backend emulation code.

Also add sbc_dif_read_strip() in order to determine number of sectors
using cmd-&gt;prot_length, and skip the extra sbc_dif_copy_prot().

Reviewed-by: Sagi Grimberg &lt;sagig@mellanox.com&gt;
Cc: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Cc: Or Gerlitz &lt;ogerlitz@mellanox.com&gt;
Cc: Quinn Tran &lt;quinn.tran@qlogic.com&gt;
Cc: Giridhar Malavali &lt;giridhar.malavali@qlogic.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target/sbc: Add sbc_dif_generate software emulation</title>
<updated>2014-04-07T08:48:56+00:00</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2014-04-02T21:19:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=66a3d5bc47d2973820816226e957db9e85285455'/>
<id>urn:sha1:66a3d5bc47d2973820816226e957db9e85285455</id>
<content type='text'>
This patch adds WRITE_INSERT emulation within target-core
using TYPE1 / TYPE3 PI modes in sbc_dif_generate() code.

This is useful in order for existing legacy fabrics that do not
support protection offloads to interact with backend devices that
currently have T10 PI enabled.

v2 changes:
   - Rename to sbc_dif_generate() (Sagi)

Cc: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Cc: Sagi Grimberg &lt;sagig@mellanox.com&gt;
Cc: Or Gerlitz &lt;ogerlitz@mellanox.com&gt;
Cc: Quinn Tran &lt;quinn.tran@qlogic.com&gt;
Cc: Giridhar Malavali &lt;giridhar.malavali@qlogic.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target/sbc: Add DIF TYPE1+TYPE3 read/write verify emulation</title>
<updated>2014-01-18T09:53:12+00:00</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2014-01-07T22:44:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=41861fa831afd4b5006f0042e1f701360330351e'/>
<id>urn:sha1:41861fa831afd4b5006f0042e1f701360330351e</id>
<content type='text'>
This patch adds support for DIF read/write verify emulation
for TARGET_DIF_TYPE1_PROT + TARGET_DIF_TYPE3_PROT operation.

This includes sbc_dif_verify_write() + sbc_dif_verify_read()
calls accessable by backend drivers to perform DIF verify
for SGL based data and protection information.

Also included is sbc_dif_copy_prot() logic to copy protection
information to/from backend provided protection SGLs.

Based on scsi_debug.c DIF TYPE1+TYPE3 emulation.

v2 changes:
  - Select CRC_T10DIF for TARGET_CORE in Kconfig (Fengguang)
  - Drop IP checksum logic from sbc_dif_v1_verify (MKP)
  - Fix offset on app_tag = 0xffff in sbc_dif_verify_read()

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: Add DIF related base definitions</title>
<updated>2014-01-18T09:52:34+00:00</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2013-12-23T20:28:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ce65e5b97b19446ff91e9ee0bbcd9f8b8e87ae5a'/>
<id>urn:sha1:ce65e5b97b19446ff91e9ee0bbcd9f8b8e87ae5a</id>
<content type='text'>
This patch adds DIF related definitions to target_core_base.h
that includes enums for target_prot_op + target_prot_type +
target_prot_version + target_guard_type + target_pi_error.

Also included is struct se_dif_v1_tuple, along with changes
to struct se_cmd, struct se_dev_attrib, and struct se_device.

Also, add new se_subsystem_api-&gt;[init,format,free]_prot() callers
used by target core code to setup backend specific protection
information after the device has been configured.

Enums taken from Sagi Grimberg's original patch.

v2 changes:
  - Drop guard_type related definitions
  - Update target_prot_op + target_prot_ho definitions (Sagi)
  - Drop SCF_PROT + pi_prot_version flag
  - Add se_subsystem_api-&gt;format_prot() (Sagi)
  - Add hw_pi_prot_type device attribute

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: Pass through I/O topology for block backstores</title>
<updated>2013-11-12T21:44:54+00:00</updated>
<author>
<name>Andy Grover</name>
<email>agrover@redhat.com</email>
</author>
<published>2013-11-11T16:59:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7f7caf6aa74a4f4ad21ebe08bf23b594fce45ca7'/>
<id>urn:sha1:7f7caf6aa74a4f4ad21ebe08bf23b594fce45ca7</id>
<content type='text'>
In addition to block size (already implemented), passing through
alignment offset, logical-to-phys block exponent, I/O granularity and
optimal I/O length will allow initiators to properly handle layout on
LUNs with 4K block sizes.

Tested with various weird values via scsi_debug module.

One thing to look at with this patch is the new block limits values --
instead of granularity 1 optimal 8192, Lio will now be returning whatever
the block device says, which may affect performance.

Signed-off-by: Andy Grover &lt;agrover@redhat.com&gt;
Acked-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Make helpers non static for EXTENDED_COPY command setup</title>
<updated>2013-09-10T23:48:39+00:00</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@daterainc.com</email>
</author>
<published>2013-08-22T18:58:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c5ff8d6bc3ebc363d77d71791080fefb07ae9017'/>
<id>urn:sha1:c5ff8d6bc3ebc363d77d71791080fefb07ae9017</id>
<content type='text'>
Both target_alloc_sgl() and transport_generic_map_mem_to_cmd() are
required by EXTENDED_COPY logic when setting up internally dispatched
command descriptors, so go ahead and make both of these non static.

Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Hannes Reinecke &lt;hare@suse.de&gt;
Cc: Martin Petersen &lt;martin.petersen@oracle.com&gt;
Cc: Chris Mason &lt;chris.mason@fusionio.com&gt;
Cc: Roland Dreier &lt;roland@purestorage.com&gt;
Cc: Zach Brown &lt;zab@redhat.com&gt;
Cc: James Bottomley &lt;JBottomley@Parallels.com&gt;
Cc: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@daterainc.com&gt;
</content>
</entry>
<entry>
<title>target: Allow sbc_ops-&gt;execute_rw() to accept SGLs + data_direction</title>
<updated>2013-09-09T21:29:28+00:00</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@daterainc.com</email>
</author>
<published>2013-08-20T06:57:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a82a9538dd30471e6428a2d55e91e986c439866b'/>
<id>urn:sha1:a82a9538dd30471e6428a2d55e91e986c439866b</id>
<content type='text'>
COMPARE_AND_WRITE expects to be able to send down a DMA_FROM_DEVICE
to obtain the necessary READ payload for comparision against the
first half of the WRITE payload containing the verify user data.

Currently virtual backends expect to internally reference SGLs,
SGL nents, and data_direction, so change IBLOCK, FILEIO and RD
sbc_ops-&gt;execute_rw() to accept this values as function parameters.

Also add default sbc_execute_rw() handler for the typical case for
cmd-&gt;execute_rw() submission using cmd-&gt;t_data_sg, cmd-&gt;t_data_nents,
and cmd-&gt;data_direction).

v2 Changes:
  - Add SCF_COMPARE_AND_WRITE command flag
  - Use sbc_execute_rw() for normal cmd-&gt;execute_rw() submission
    with expected se_cmd members.

Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Hannes Reinecke &lt;hare@suse.de&gt;
Cc: Martin Petersen &lt;martin.petersen@oracle.com&gt;
Cc: Chris Mason &lt;chris.mason@fusionio.com&gt;
Cc: James Bottomley &lt;JBottomley@Parallels.com&gt;
Cc: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@daterainc.com&gt;
</content>
</entry>
<entry>
<title>target: Add sbc_execute_unmap() helper</title>
<updated>2013-04-25T08:05:24+00:00</updated>
<author>
<name>Asias He</name>
<email>asias@redhat.com</email>
</author>
<published>2013-02-25T06:03:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=86d7182985d25900929adce14fffd729cc8c6fb8'/>
<id>urn:sha1:86d7182985d25900929adce14fffd729cc8c6fb8</id>
<content type='text'>
iblock_execute_unmap() and fd_execute_unmap share a lot of code.
Add sbc_execute_unmap() helper to remove duplicated code for
iblock_execute_unmap() and fd_execute_unmap().

Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Cc: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Asias He &lt;asias@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Rename spc_get_write_same_sectors -&gt; sbc_get_write_same_sectors</title>
<updated>2013-02-23T20:46:14+00:00</updated>
<author>
<name>Roland Dreier</name>
<email>roland@purestorage.com</email>
</author>
<published>2013-02-22T17:52:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=972b29c8f86093f44e1d781588bd5c5faae3d8e3'/>
<id>urn:sha1:972b29c8f86093f44e1d781588bd5c5faae3d8e3</id>
<content type='text'>
Trivial, but WRITE SAME is an SBC command so it seems strange for a
related function (defined in target_core_sbc.c) to be in the spc_
namespace.

Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
</feed>
