<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/include/target, branch v3.7</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v3.7</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.7'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2012-10-02T21:16:08Z</updated>
<entry>
<title>target: Add target_submit_cmd_map_sgls for SGL fabric memory passthrough</title>
<updated>2012-10-02T21:16:08Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2012-10-02T00:23:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a026757ff56365b4aa3875c14f1bd5733e0e8bb2'/>
<id>urn:sha1:a026757ff56365b4aa3875c14f1bd5733e0e8bb2</id>
<content type='text'>
This patch adds a new target_submit_cmd_map_sgls() to pass pre-allocated
SGL memory using transport_generic_map_mem_to_cmd() logic into the generic
target submit I/O codepath.

It also adds a target_submit_cmd() wrapper around target_submit_cmd_map_sgls()
for existing fabric code that already assumes internal target-core SGL memory
allocation.

(v2: Rename to target_submit_cmd_map_sgls + drop TARGET_SCF_MAP_MEM flag
     in favor of non zero sgl_count check)

Reported-by: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Drop se_subsystem_api-&gt;[write_cache,fua_write]_emulated flags</title>
<updated>2012-09-18T00:13:34Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2012-08-26T20:35:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fd30e9310253235e88a4eaa38fa92439b56c220e'/>
<id>urn:sha1:fd30e9310253235e88a4eaa38fa92439b56c220e</id>
<content type='text'>
This patch drops se_subsystem_api-&gt;[write_cache,fua_write]_emulated flags
set by viritual FILEIO/IBLOCK/RD_MCP backend drivers in favor of explict
TRANSPORT_PLUGIN_PHBA_PDEV checks to know when to fail if userspace is
attempting to set virtual emulation bits for an pSCSI (passthrough)
backend device.

Reported-by: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Simplify fabric sense data length handling</title>
<updated>2012-09-18T00:12:58Z</updated>
<author>
<name>Roland Dreier</name>
<email>roland@purestorage.com</email>
</author>
<published>2012-08-15T21:35:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9c58b7ddd70dd7bfaac4ca87131f36d10aaba441'/>
<id>urn:sha1:9c58b7ddd70dd7bfaac4ca87131f36d10aaba441</id>
<content type='text'>
Every fabric driver has to supply a se_tfo-&gt;set_fabric_sense_len()
method, just so iSCSI can return an offset of 2.  However, every fabric
driver is already allocating a sense buffer and passing it into the
target core, either via transport_init_se_cmd() or target_submit_cmd().

So instead of having iSCSI pass the start of its sense buffer into the
core and then later tell the core to skip the first 2 bytes, it seems
easier for iSCSI just to do the offset of 2 when it passes the sense
buffer into the core.  Then we can drop the se_tfo-&gt;set_fabric_sense_len()
everywhere, and just add a couple of lines of code to iSCSI to set the
sense data length to the beginning of the buffer right before it sends
it over the network.

(nab: Remove .set_fabric_sense_len usage from tcm_qla2xxx_npiv_ops +
      change transport_get_sense_buffer to follow v3.6-rc6 code w/o
      -&gt;set_fabric_sense_len usage)

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>target: Remove unused target_core_fabric_ops.get_fabric_sense_len method</title>
<updated>2012-09-17T23:15:47Z</updated>
<author>
<name>Roland Dreier</name>
<email>roland@purestorage.com</email>
</author>
<published>2012-08-15T21:35:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2ed772b7b9df0f459308b3cbececc0136076d09e'/>
<id>urn:sha1:2ed772b7b9df0f459308b3cbececc0136076d09e</id>
<content type='text'>
There are no callers of se_tfo-&gt;get_fabric_sense_len(), so we should
stop having every fabric driver implement 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>target: support zero allocation length in REQUEST SENSE</title>
<updated>2012-09-07T18:14:21Z</updated>
<author>
<name>Paolo Bonzini</name>
<email>pbonzini@redhat.com</email>
</author>
<published>2012-09-07T15:30:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=32a8811ff164f882712c17946e58e52444f464a7'/>
<id>urn:sha1:32a8811ff164f882712c17946e58e52444f464a7</id>
<content type='text'>
Similar to INQUIRY and MODE SENSE, construct the sense data in a
buffer and later copy it to the scatterlist.  Do not do anything,
but still clear a pending unit attention condition, if the allocation
length is zero.

However, SPC tells us that "If a REQUEST SENSE command is terminated with
CHECK CONDITION status [and] the REQUEST SENSE command was received on
an I_T nexus with a pending unit attention condition (i.e., before the
device server reports CHECK CONDITION status), then the device server
shall not clear the pending unit attention condition."  Do the
transport_kmap_data_sg early to detect this case.

It also tells us "Device servers shall not adjust the additional sense
length to reflect truncation if the allocation length is less than the
sense data available", so do not do that!  Note that the err variable
is write-only.

Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: fix use-after-free with PSCSI sense data</title>
<updated>2012-09-06T00:20:28Z</updated>
<author>
<name>Paolo Bonzini</name>
<email>pbonzini@redhat.com</email>
</author>
<published>2012-09-05T15:09:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d5829eac5f7cfff89c6d1cf11717eee97cf030d0'/>
<id>urn:sha1:d5829eac5f7cfff89c6d1cf11717eee97cf030d0</id>
<content type='text'>
The pointer to the sense buffer is fetched by transport_get_sense_data,
but this is called by target_complete_ok_work long after pscsi_req_done
has freed the struct that contains it.

Pass instead the fabric's sense buffer to transport_complete,
and copy the data to it directly in transport_complete.  Setting
SCF_TRANSPORT_TASK_SENSE also becomes a duty of transport_complete.

Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Remove unused se_cmd.cmd_spdtl</title>
<updated>2012-08-21T21:27:35Z</updated>
<author>
<name>Roland Dreier</name>
<email>roland@purestorage.com</email>
</author>
<published>2012-08-16T04:24:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=af74115eed22698f771fec1287a864975c9a6671'/>
<id>urn:sha1:af74115eed22698f771fec1287a864975c9a6671</id>
<content type='text'>
This was originally for helping fabrics to determine overflow/underflow
status, and has been superceeded by SCF_OVERFLOW_BIT + SCF_UNDERFLOW_BIT.

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>target: Allow for target_submit_cmd() returning errors</title>
<updated>2012-07-18T00:05:05Z</updated>
<author>
<name>Roland Dreier</name>
<email>roland@purestorage.com</email>
</author>
<published>2012-07-16T18:04:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d6dfc868bcf329392abd1ecfa7357eb51ebf8c30'/>
<id>urn:sha1:d6dfc868bcf329392abd1ecfa7357eb51ebf8c30</id>
<content type='text'>
We want it to be possible for target_submit_cmd() to return errors up
to its fabric module callers.  For now just update the prototype to
return an int, and update all callers to handle non-zero return values
as an error.

This is immediately useful for tcm_qla2xxx to fix a long-standing active
I/O session shutdown race, but tcm_fc, usb-gadget, and sbp-target the
fabric maintainers need to check + ACK that handling a target_submit_cmd()
failure due to session shutdown does not introduce regressions

(nab: Respin against for-next after initial NACK + update docbook comment +
      fix double se_cmd init in exception path for usb-gadget)

Cc: Chad Dupuis &lt;chad.dupuis@qlogic.com&gt;
Cc: Arun Easi &lt;arun.easi@qlogic.com&gt;
Cc: Chris Boot &lt;bootc@bootc.net&gt;
Cc: Stefan Richter &lt;stefanr@s5r6.in-berlin.de&gt;
Cc: Mark Rustad &lt;mark.d.rustad@intel.com&gt;
Cc: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Cc: Felipe Balbi &lt;balbi@ti.com&gt;
Cc: Andy Grover &lt;agrover@redhat.com&gt;
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>target: Add generation of LOGICAL BLOCK ADDRESS OUT OF RANGE</title>
<updated>2012-07-17T00:35:35Z</updated>
<author>
<name>Roland Dreier</name>
<email>roland@purestorage.com</email>
</author>
<published>2012-07-16T22:34:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e2397c704429025bc6b331a970f699e52f34283e'/>
<id>urn:sha1:e2397c704429025bc6b331a970f699e52f34283e</id>
<content type='text'>
Many SCSI commands are defined to return a CHECK CONDITION / ILLEGAL
REQUEST with ASC set to LOGICAL BLOCK ADDRESS OUT OF RANGE if the
initiator sends a command that accesses a too-big LBA.  Add an enum
value and case entries so that target code can return this status.

Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Remove se_session.sess_wait_list</title>
<updated>2012-07-17T00:35:27Z</updated>
<author>
<name>Roland Dreier</name>
<email>roland@purestorage.com</email>
</author>
<published>2012-07-16T18:04:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1c7b13fe65269960f63082eafccede547191ab02'/>
<id>urn:sha1:1c7b13fe65269960f63082eafccede547191ab02</id>
<content type='text'>
Since we set se_session.sess_tearing_down and stop new commands from
being added to se_session.sess_cmd_list before we wait for commands to
finish when freeing a session, there's no need for a separate
sess_wait_list -- if we let new commands be added to sess_cmd_list
after setting sess_tearing_down, that would be a bug that breaks the
logic of waiting in-flight commands.

Also rename target_splice_sess_cmd_list() to
target_sess_cmd_list_set_waiting(), since we are no longer splicing
onto a separate list.

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