<feed xmlns='http://www.w3.org/2005/Atom'>
<title>talos-op-linux/include/target/target_core_backend.h, branch v4.2.2</title>
<subtitle>Talos™ II Linux sources for OpenPOWER</subtitle>
<id>https://git.raptorcs.com/git/talos-op-linux/atom?h=v4.2.2</id>
<link rel='self' href='https://git.raptorcs.com/git/talos-op-linux/atom?h=v4.2.2'/>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/'/>
<updated>2015-06-23T07:43:46+00:00</updated>
<entry>
<title>target: implement WRITE_SAME with UNMAP bit using -&gt;execute_unmap</title>
<updated>2015-06-23T07:43:46+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2015-06-19T13:11:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=b753d643555e548163adfa2de9d75e0257e4b356'/>
<id>urn:sha1:b753d643555e548163adfa2de9d75e0257e4b356</id>
<content type='text'>
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Andy Grover &lt;agrover@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: simplify UNMAP handling</title>
<updated>2015-06-23T07:43:44+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2015-06-19T13:10:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=62e4694256dd3cbe301ebc0da799df8779b97014'/>
<id>urn:sha1:62e4694256dd3cbe301ebc0da799df8779b97014</id>
<content type='text'>
Move a little more processing into the core code, and lift the previous
do_unmap callback into the sbc_ops structure.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Andy Grover &lt;agrover@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: simplify backend attribute implementation</title>
<updated>2015-06-01T07:25:38+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2015-05-10T16:14:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=3effdb9094fd06b9c61ecef08d610ae90805fd98'/>
<id>urn:sha1:3effdb9094fd06b9c61ecef08d610ae90805fd98</id>
<content type='text'>
Consolidate the implementation of the backend attributes in a single file
and single function per attribute show/store function instead of splitting
it into multiple functions in multiple files.

Also use the proper strto* helpers for exposed data types, add macros to
implement the store methods for the most common data types and share the
show methods between the two different attribute implementations.

(Fix bogus store_pi_prot_format flag=0 return value - nab)

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: consolidate backend attribute implementations</title>
<updated>2015-06-01T07:25:36+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2015-05-10T16:14:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=5873c4d157400ade4052e9d7b6259fa592e1ddbf'/>
<id>urn:sha1:5873c4d157400ade4052e9d7b6259fa592e1ddbf</id>
<content type='text'>
Provide a common sets of dev_attrib attributes for all devices using the
generic SPC/SBC parsers, and a second one with the minimal required read-only
attributes for passthrough devices.  The later is only used by pscsi for now,
but will be wired up for the full-passthrough TCMU use case as well.

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: simplify backend driver registration</title>
<updated>2015-06-01T07:25:34+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2015-05-10T16:14:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=0a06d4309dc168dfa70cec3cf0cd9eb7fc15a2fd'/>
<id>urn:sha1:0a06d4309dc168dfa70cec3cf0cd9eb7fc15a2fd</id>
<content type='text'>
Rewrite the backend driver registration based on what we did to the fabric
drivers:  introduce a read-only struct target_bakckend_ops that the driver
registers, which is then instanciate as a struct target_backend by the
core.  This allows the ops vector to be smaller and allows us to mark it
const.  At the same time the registration function can set up the
configfs attributes, avoiding the need to add additional boilerplate code
for that to the drivers.

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: Convert se_node_acl-&gt;device_list[] to RCU hlist</title>
<updated>2015-06-01T07:23:46+00:00</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2015-03-23T03:42:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=29a05deebf6c2e3010934fb78ee65cab3d329470'/>
<id>urn:sha1:29a05deebf6c2e3010934fb78ee65cab3d329470</id>
<content type='text'>
This patch converts se_node_acl-&gt;device_list[] table for mappedluns
to modern RCU hlist_head usage in order to support an arbitrary number
of node_acl lun mappings.

It converts transport_lookup_*_lun() fast-path code to use RCU read path
primitives when looking up se_dev_entry.  It adds a new hlist_head at
se_node_acl-&gt;lun_entry_hlist for this purpose.

For transport_lookup_cmd_lun() code, it works with existing per-cpu
se_lun-&gt;lun_ref when associating se_cmd with se_lun + se_device.
Also, go ahead and update core_create_device_list_for_node() +
core_free_device_list_for_node() to use -&gt;lun_entry_hlist.

It also converts se_dev_entry-&gt;pr_ref_count access to use modern
struct kref counting, and updates core_disable_device_list_for_node()
to kref_put() and block on se_deve-&gt;pr_comp waiting for outstanding PR
special-case PR references to drop, then invoke kfree_rcu() to wait
for the RCU grace period to complete before releasing memory.

So now that se_node_acl-&gt;lun_entry_hlist fast path access uses RCU
protected pointers, go ahead and convert remaining non-fast path
RCU updater code using -&gt;lun_entry_lock to struct mutex to allow
callers to block while walking se_node_acl-&gt;lun_entry_hlist.

Finally drop the left-over core_clear_initiator_node_from_tpg() that
originally cleared lun_access during se_node_acl shutdown, as post
RCU conversion it now becomes duplicated logic.

Reviewed-by: Hannes Reinecke &lt;hare@suse.de&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Sagi Grimberg &lt;sagig@mellanox.com&gt;
Cc: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Merge sbc_verify_dif_read|write</title>
<updated>2015-05-31T05:41:41+00:00</updated>
<author>
<name>Sagi Grimberg</name>
<email>sagig@mellanox.com</email>
</author>
<published>2015-04-19T17:27:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=f75b6fae1a1d0a79dcbb9cbaed1d06bf3fe57a3c'/>
<id>urn:sha1:f75b6fae1a1d0a79dcbb9cbaed1d06bf3fe57a3c</id>
<content type='text'>
Instead of providing DIF verify routines for read/write
that are almost identical and conditionally copy protection
information, just let the caller do the right thing.

Have a single sbc_dif_verify that handles an sgl (that
does NOT copy any data) and a protection information copy
routine used by rd_mcp and fileio backend.

In the WRITE case, call sbc_dif_verify with cmd-&gt;t_prot_sg
and then do the copy from it to local sgl (assuming the verify
succeeded of course). In the READ case, call sbc_dif_verify
with the local sgl and if it succeeds, copy it to t_prot_sg (or
not if we are stripping it).

(Fix apply breakage from commit c836777 - nab)

Tested-by: Akinobu Mita &lt;akinobu.mita@gmail.com&gt;
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: Use a PASSTHROUGH flag instead of transport_types</title>
<updated>2015-05-31T02:58:11+00:00</updated>
<author>
<name>Andy Grover</name>
<email>agrover@redhat.com</email>
</author>
<published>2015-05-19T21:44:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=a3541703ebbf99d499656b15987175f6579b42ac'/>
<id>urn:sha1:a3541703ebbf99d499656b15987175f6579b42ac</id>
<content type='text'>
It seems like we only care if a transport is passthrough or not. Convert
transport_type to a flags field and replace TRANSPORT_PLUGIN_* with a
flag, TRANSPORT_FLAG_PASSTHROUGH.

Signed-off-by: Andy Grover &lt;agrover@redhat.com&gt;
Reviewed-by: Ilias Tsitsimpis &lt;iliastsi@arrikto.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Move passthrough CDB parsing into a common function</title>
<updated>2015-05-31T02:57:59+00:00</updated>
<author>
<name>Andy Grover</name>
<email>agrover@redhat.com</email>
</author>
<published>2015-05-19T21:44:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=7bfea53b5c936d706d0bf60ec218fa72cde77121'/>
<id>urn:sha1:7bfea53b5c936d706d0bf60ec218fa72cde77121</id>
<content type='text'>
Aside from whether they handle BIDI ops or not, parsing of the CDB by
kernel and user SCSI passthrough modules should be identical. Move this
into a new passthrough_parse_cdb() and call it from tcm-pscsi and tcm-user.

Reported-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Ilias Tsitsimpis &lt;iliastsi@arrikto.com&gt;
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: do not reject FUA CDBs when write cache is enabled but emulate_write_cache is 0</title>
<updated>2015-03-20T06:26:46+00:00</updated>
<author>
<name>Christophe Vu-Brugier</name>
<email>cvubrugier@fastmail.fm</email>
</author>
<published>2015-03-19T13:30:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.raptorcs.com/git/talos-op-linux/commit/?id=9bc6548f372d8c829235095d91de99d8df79db6e'/>
<id>urn:sha1:9bc6548f372d8c829235095d91de99d8df79db6e</id>
<content type='text'>
A check that rejects a CDB with FUA bit set if no write cache is
emulated was added by the following commit:

  fde9f50 target: Add sanity checks for DPO/FUA bit usage

The condition is as follows:

  if (!dev-&gt;dev_attrib.emulate_fua_write ||
      !dev-&gt;dev_attrib.emulate_write_cache)

However, this check is wrong if the backend device supports WCE but
"emulate_write_cache" is disabled.

This patch uses se_dev_check_wce() (previously named
spc_check_dev_wce) to invoke transport-&gt;get_write_cache() if the
device has a write cache or check the "emulate_write_cache" attribute
otherwise.

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