<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/target/tcm_fc, branch v4.9</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>target/tcm_fc: use CPU affinity for responses</title>
<updated>2016-10-21T08:19:44+00:00</updated>
<author>
<name>Hannes Reinecke</name>
<email>hare@suse.de</email>
</author>
<published>2016-08-22T08:54:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=1ba0158fa66b5b2c597a748f87be1650c9960ccc'/>
<id>1ba0158fa66b5b2c597a748f87be1650c9960ccc</id>
<content type='text'>
The libfc stack assigns exchange IDs based on the CPU the request
was received on, so we need to send the responses via the same CPU.
Otherwise the send logic gets confuses and responses will be delayed,
causing exchange timeouts on the initiator side.

Signed-off-by: Hannes Reinecke &lt;hare@suse.com&gt;
Cc: stable@vger.kernel.org # 4.5+
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The libfc stack assigns exchange IDs based on the CPU the request
was received on, so we need to send the responses via the same CPU.
Otherwise the send logic gets confuses and responses will be delayed,
causing exchange timeouts on the initiator side.

Signed-off-by: Hannes Reinecke &lt;hare@suse.com&gt;
Cc: stable@vger.kernel.org # 4.5+
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>target/tcm_fc: Update debugging statements to match libfc usage</title>
<updated>2016-10-21T08:19:43+00:00</updated>
<author>
<name>Hannes Reinecke</name>
<email>hare@suse.de</email>
</author>
<published>2016-08-22T08:54:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=8962a4d29bcb3d12164c02d207c8ff1ab8b04558'/>
<id>8962a4d29bcb3d12164c02d207c8ff1ab8b04558</id>
<content type='text'>
Update the debug statements to match those from libfc.

Signed-off-by: Hannes Reinecke &lt;hare@suse.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Update the debug statements to match those from libfc.

Signed-off-by: Hannes Reinecke &lt;hare@suse.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>target/tcm_fc: return detailed error in ft_sess_create()</title>
<updated>2016-10-21T08:19:42+00:00</updated>
<author>
<name>Hannes Reinecke</name>
<email>hare@suse.de</email>
</author>
<published>2016-08-22T08:54:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=91b385b4909e040450389b11961a8ba8f8e9a35e'/>
<id>91b385b4909e040450389b11961a8ba8f8e9a35e</id>
<content type='text'>
Not every failure is due to out-of-memory; the ACLs might not be
set, too. So return a detailed error code in ft_sess_create()
instead of just a NULL pointer.

Signed-off-by: Hannes Reinecke &lt;hare@suse.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Not every failure is due to out-of-memory; the ACLs might not be
set, too. So return a detailed error code in ft_sess_create()
instead of just a NULL pointer.

Signed-off-by: Hannes Reinecke &lt;hare@suse.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>target/tcm_fc: print command pointer in debug message</title>
<updated>2016-10-21T08:19:42+00:00</updated>
<author>
<name>Hannes Reinecke</name>
<email>hare@suse.de</email>
</author>
<published>2016-08-22T08:54:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=b04bf5833e8a0d6ae4e3f7b35b30c4ab6ff7ea1b'/>
<id>b04bf5833e8a0d6ae4e3f7b35b30c4ab6ff7ea1b</id>
<content type='text'>
When allocating a new command we should add the pointer to the
debug statements; that allows us to match this with other debug
statements for handling data.

Signed-off-by: Hannes Reinecke &lt;hare@suse.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When allocating a new command we should add the pointer to the
debug statements; that allows us to match this with other debug
statements for handling data.

Signed-off-by: Hannes Reinecke &lt;hare@suse.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tcm_fc: set and unset FCP_SPPF_TARG_FCN</title>
<updated>2016-07-20T20:27:05+00:00</updated>
<author>
<name>Hannes Reinecke</name>
<email>hare@suse.de</email>
</author>
<published>2016-07-19T13:01:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=107818e2dad943ec357f6fdfa70377317a142d9d'/>
<id>107818e2dad943ec357f6fdfa70377317a142d9d</id>
<content type='text'>
When registering and unregistering as an target port we should
be setting the FC-4 service params correctly.

Signed-off-by: Hannes Reinecke &lt;hare@suse.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When registering and unregistering as an target port we should
be setting the FC-4 service params correctly.

Signed-off-by: Hannes Reinecke &lt;hare@suse.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>target: make -&gt;shutdown_session optional</title>
<updated>2016-05-10T08:19:18+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2016-05-02T13:45:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=22d11759a4e7018f8cd7914e4e706ca2c96d6c01'/>
<id>22d11759a4e7018f8cd7914e4e706ca2c96d6c01</id>
<content type='text'>
Turns out the template and thus many drivers got the return value wrong:
0 means the fabrics driver needs to put a session reference, which no
driver except for the iSCSI target drivers did.  Fortunately none of these
drivers supports explicit Node ACLs, so the bug was harmless.

Even without that only qla2xxx and iscsi every did real work in
shutdown_session, so get rid of the boilerplate code in all other
drivers.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Turns out the template and thus many drivers got the return value wrong:
0 means the fabrics driver needs to put a session reference, which no
driver except for the iSCSI target drivers did.  Fortunately none of these
drivers supports explicit Node ACLs, so the bug was harmless.

Even without that only qla2xxx and iscsi every did real work in
shutdown_session, so get rid of the boilerplate code in all other
drivers.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tcm_fc: Convert to TARGET_SCF_ACK_KREF I/O + TMR krefs</title>
<updated>2016-03-11T05:48:23+00:00</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2016-01-30T06:08:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=91973cd60e2db7536228ce2732ffea4e50d03ca9'/>
<id>91973cd60e2db7536228ce2732ffea4e50d03ca9</id>
<content type='text'>
This patch converts tcm_fc to modern TARGET_SCF_ACK_KREF
usage for ft_queue_status(), and fixes ft_check_stop_free()
to return transport_generic_free_cmd() for -&gt;cmd_kref.

It also converts TM request -&gt; ft_send_tm() to use ACK_KREF,
and update ft_queue_tm_resp() to drop the outstanding kref
after queueing TM response into fabric code.

Cc: Vasu Dev &lt;vasu.dev@linux.intel.com&gt;
Cc: Mark Rustad &lt;mark.d.rustad@intel.com&gt;
Cc: Robert Love &lt;robert.w.love@intel.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch converts tcm_fc to modern TARGET_SCF_ACK_KREF
usage for ft_queue_status(), and fixes ft_check_stop_free()
to return transport_generic_free_cmd() for -&gt;cmd_kref.

It also converts TM request -&gt; ft_send_tm() to use ACK_KREF,
and update ft_queue_tm_resp() to drop the outstanding kref
after queueing TM response into fabric code.

Cc: Vasu Dev &lt;vasu.dev@linux.intel.com&gt;
Cc: Mark Rustad &lt;mark.d.rustad@intel.com&gt;
Cc: Robert Love &lt;robert.w.love@intel.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tcm_fc: Convert to target_alloc_session usage</title>
<updated>2016-03-11T05:47:58+00:00</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2016-01-10T04:12:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=9ed5965588603840100fb31e579c2996d81aaea9'/>
<id>9ed5965588603840100fb31e579c2996d81aaea9</id>
<content type='text'>
This patch converts tcm_fc target mode addition of tf_sess-&gt;hash to
port_id hlist_head using the new alloc_session callback().

Cc: Vasu Dev &lt;vasu.dev@linux.intel.com&gt;
Cc: Mark Rustad &lt;mark.d.rustad@intel.com&gt;
Cc: Robert Love &lt;robert.w.love@intel.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch converts tcm_fc target mode addition of tf_sess-&gt;hash to
port_id hlist_head using the new alloc_session callback().

Cc: Vasu Dev &lt;vasu.dev@linux.intel.com&gt;
Cc: Mark Rustad &lt;mark.d.rustad@intel.com&gt;
Cc: Robert Love &lt;robert.w.love@intel.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tcm_fc: Convert acl lookup to modern get_initiator_node_acl usage</title>
<updated>2016-01-13T07:17:51+00:00</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2016-01-08T06:17:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=7fbef3d0c2f6063ed12e7f3d74ba2a49111154f9'/>
<id>7fbef3d0c2f6063ed12e7f3d74ba2a49111154f9</id>
<content type='text'>
This patch does a simple conversion of tcm_fc code to use
proper modern core_tpg_get_initiator_node_acl() lookup using
se_node_acl-&gt;acl_kref, and drops the legacy list walk from
ft_acl_get().

Note the original lookup also took node_name into account,
but since ft_init_nodeacl() only ever sets port_name for
se_node_acl-&gt;acl_group within configfs, this is purely
a mechanical change.

As per HCH, go ahead and fold ft_acl_get() into original
caller.

Cc: Vasu Dev &lt;vasu.dev@linux.intel.com&gt;
Cc: Sagi Grimberg &lt;sagig@mellanox.com&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Hannes Reinecke &lt;hare@suse.de&gt;
Cc: Andy Grover &lt;agrover@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch does a simple conversion of tcm_fc code to use
proper modern core_tpg_get_initiator_node_acl() lookup using
se_node_acl-&gt;acl_kref, and drops the legacy list walk from
ft_acl_get().

Note the original lookup also took node_name into account,
but since ft_init_nodeacl() only ever sets port_name for
se_node_acl-&gt;acl_group within configfs, this is purely
a mechanical change.

As per HCH, go ahead and fold ft_acl_get() into original
caller.

Cc: Vasu Dev &lt;vasu.dev@linux.intel.com&gt;
Cc: Sagi Grimberg &lt;sagig@mellanox.com&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Hannes Reinecke &lt;hare@suse.de&gt;
Cc: Andy Grover &lt;agrover@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tcm_fc: Wait for command completion before freeing a session</title>
<updated>2016-01-07T21:57:55+00:00</updated>
<author>
<name>Bart Van Assche</name>
<email>bart.vanassche@sandisk.com</email>
</author>
<published>2016-01-05T13:47:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=de7ee9a20c7f617cbc5091e84855afcdeb19ba60'/>
<id>de7ee9a20c7f617cbc5091e84855afcdeb19ba60</id>
<content type='text'>
This patch avoids that the following kernel crash can occur with
later patches in this patch series:

general protection fault: 0000 [#1] SMP
CPU: 0 PID: 6 Comm: kworker/u8:0 Not tainted 4.3.0-rc1-debug+ #1
Workqueue: tmr-fileio target_tmr_work [target_core_mod]
Call Trace:
 [&lt;ffffffff810a6915&gt;] lock_acquire+0x65/0x90
 [&lt;ffffffff815e740b&gt;] _raw_spin_lock_irqsave+0x4b/0x60
 [&lt;ffffffffa03bc7ca&gt;] target_release_cmd_kref+0x2a/0xa0 [target_core_mod]
 [&lt;ffffffffa03bd418&gt;] target_put_sess_cmd+0x28/0x50 [target_core_mod]
 [&lt;ffffffffa03bad50&gt;] core_tmr_lun_reset+0x390/0x640 [target_core_mod]
 [&lt;ffffffffa03bce50&gt;] target_tmr_work+0x80/0xd0 [target_core_mod]
 [&lt;ffffffff81070e6d&gt;] process_one_work+0x19d/0x430
 [&lt;ffffffff8107120f&gt;] worker_thread+0x10f/0x460
 [&lt;ffffffff810772ba&gt;] kthread+0xea/0x100
 [&lt;ffffffff815e7a2f&gt;] ret_from_fork+0x3f/0x70

Signed-off-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Andy Grover &lt;agrover@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch avoids that the following kernel crash can occur with
later patches in this patch series:

general protection fault: 0000 [#1] SMP
CPU: 0 PID: 6 Comm: kworker/u8:0 Not tainted 4.3.0-rc1-debug+ #1
Workqueue: tmr-fileio target_tmr_work [target_core_mod]
Call Trace:
 [&lt;ffffffff810a6915&gt;] lock_acquire+0x65/0x90
 [&lt;ffffffff815e740b&gt;] _raw_spin_lock_irqsave+0x4b/0x60
 [&lt;ffffffffa03bc7ca&gt;] target_release_cmd_kref+0x2a/0xa0 [target_core_mod]
 [&lt;ffffffffa03bd418&gt;] target_put_sess_cmd+0x28/0x50 [target_core_mod]
 [&lt;ffffffffa03bad50&gt;] core_tmr_lun_reset+0x390/0x640 [target_core_mod]
 [&lt;ffffffffa03bce50&gt;] target_tmr_work+0x80/0xd0 [target_core_mod]
 [&lt;ffffffff81070e6d&gt;] process_one_work+0x19d/0x430
 [&lt;ffffffff8107120f&gt;] worker_thread+0x10f/0x460
 [&lt;ffffffff810772ba&gt;] kthread+0xea/0x100
 [&lt;ffffffff815e7a2f&gt;] ret_from_fork+0x3f/0x70

Signed-off-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Andy Grover &lt;agrover@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
