<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/infiniband/ulp/srp, branch linux-3.12.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.12.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.12.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2014-09-17T20:54:14Z</updated>
<entry>
<title>IB/srp: Fix deadlock between host removal and multipathd</title>
<updated>2014-09-17T20:54:14Z</updated>
<author>
<name>Bart Van Assche</name>
</author>
<published>2014-07-09T13:57:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2b84b406a9083b1f8f67d195c2e93111f9887b99'/>
<id>urn:sha1:2b84b406a9083b1f8f67d195c2e93111f9887b99</id>
<content type='text'>
commit bcc05910359183b431da92713e98eed478edf83a upstream.

If scsi_remove_host() is invoked after a SCSI device has been blocked,
if the fast_io_fail_tmo or dev_loss_tmo work gets scheduled on the
workqueue executing srp_remove_work() and if an I/O request is
scheduled after the SCSI device had been blocked by e.g. multipathd
then the following deadlock can occur:

    kworker/6:1     D ffff880831f3c460     0   195      2 0x00000000
    Call Trace:
     [&lt;ffffffff814aafd9&gt;] schedule+0x29/0x70
     [&lt;ffffffff814aa0ef&gt;] schedule_timeout+0x10f/0x2a0
     [&lt;ffffffff8105af6f&gt;] msleep+0x2f/0x40
     [&lt;ffffffff8123b0ae&gt;] __blk_drain_queue+0x4e/0x180
     [&lt;ffffffff8123d2d5&gt;] blk_cleanup_queue+0x225/0x230
     [&lt;ffffffffa0010732&gt;] __scsi_remove_device+0x62/0xe0 [scsi_mod]
     [&lt;ffffffffa000ed2f&gt;] scsi_forget_host+0x6f/0x80 [scsi_mod]
     [&lt;ffffffffa0002eba&gt;] scsi_remove_host+0x7a/0x130 [scsi_mod]
     [&lt;ffffffffa07cf5c5&gt;] srp_remove_work+0x95/0x180 [ib_srp]
     [&lt;ffffffff8106d7aa&gt;] process_one_work+0x1ea/0x6c0
     [&lt;ffffffff8106dd9b&gt;] worker_thread+0x11b/0x3a0
     [&lt;ffffffff810758bd&gt;] kthread+0xed/0x110
     [&lt;ffffffff814b972c&gt;] ret_from_fork+0x7c/0xb0
    multipathd      D ffff880096acc460     0  5340      1 0x00000000
    Call Trace:
     [&lt;ffffffff814aafd9&gt;] schedule+0x29/0x70
     [&lt;ffffffff814aa0ef&gt;] schedule_timeout+0x10f/0x2a0
     [&lt;ffffffff814ab79b&gt;] io_schedule_timeout+0x9b/0xf0
     [&lt;ffffffff814abe1c&gt;] wait_for_completion_io_timeout+0xdc/0x110
     [&lt;ffffffff81244b9b&gt;] blk_execute_rq+0x9b/0x100
     [&lt;ffffffff8124f665&gt;] sg_io+0x1a5/0x450
     [&lt;ffffffff8124fd21&gt;] scsi_cmd_ioctl+0x2a1/0x430
     [&lt;ffffffff8124fef2&gt;] scsi_cmd_blk_ioctl+0x42/0x50
     [&lt;ffffffffa00ec97e&gt;] sd_ioctl+0xbe/0x140 [sd_mod]
     [&lt;ffffffff8124bd04&gt;] blkdev_ioctl+0x234/0x840
     [&lt;ffffffff811cb491&gt;] block_ioctl+0x41/0x50
     [&lt;ffffffff811a0df0&gt;] do_vfs_ioctl+0x300/0x520
     [&lt;ffffffff811a1051&gt;] SyS_ioctl+0x41/0x80
     [&lt;ffffffff814b9962&gt;] tracesys+0xd0/0xd5

Fix this by scheduling removal work on another workqueue than the
transport layer timers.

Signed-off-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Reviewed-by: Sagi Grimberg &lt;sagig@mellanox.com&gt;
Reviewed-by: David Dillow &lt;dave@thedillows.org&gt;
Cc: Sebastian Parschauer &lt;sebastian.riemer@profitbricks.com&gt;
Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
</content>
</entry>
<entry>
<title>IB/srp: Fix a sporadic crash triggered by cable pulling</title>
<updated>2014-07-17T11:43:17Z</updated>
<author>
<name>Bart Van Assche</name>
</author>
<published>2014-05-20T13:03:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=237de203cc2ebaccc8c023fe9e2599bba967941a'/>
<id>urn:sha1:237de203cc2ebaccc8c023fe9e2599bba967941a</id>
<content type='text'>
commit 024ca90151f5e4296d30f72c13ff9a075e23c9ec upstream.

Avoid that the loops that iterate over the request ring can encounter
a pointer to a SCSI command in req-&gt;scmnd that is no longer associated
with that request. If the function srp_unmap_data() is invoked twice
for a SCSI command that is not in flight then that would cause
ib_fmr_pool_unmap() to be invoked with an invalid pointer as argument,
resulting in a kernel oops.

Reported-by: Sagi Grimberg &lt;sagig@mellanox.com&gt;
Reference: http://thread.gmane.org/gmane.linux.drivers.rdma/19068/focus=19069
Signed-off-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Reviewed-by: Sagi Grimberg &lt;sagig@mellanox.com&gt;
Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;

</content>
</entry>
<entry>
<title>IB/srp: Report receive errors correctly</title>
<updated>2013-12-04T19:05:24Z</updated>
<author>
<name>Bart Van Assche</name>
</author>
<published>2013-10-10T11:53:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cd8875d6dc847cc3c370826022fed62dc2ed3194'/>
<id>urn:sha1:cd8875d6dc847cc3c370826022fed62dc2ed3194</id>
<content type='text'>
commit cd4e38542a5c2cab94e5410fb17c1cc004a60792 upstream.

The IB spec does not guarantee that the opcode is available in error
completions.  Hence do not rely on it.  See also commit 948d1e889e5b
("IB/srp: Introduce srp_handle_qp_err()").

Signed-off-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>IB/srp: Avoid offlining operational SCSI devices</title>
<updated>2013-12-04T19:05:24Z</updated>
<author>
<name>Bart Van Assche</name>
</author>
<published>2013-10-10T11:52:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=748d2db3a5aced2d40dbb884450efbb843fd5e50'/>
<id>urn:sha1:748d2db3a5aced2d40dbb884450efbb843fd5e50</id>
<content type='text'>
commit 99b6697a50c2acbe3ca2772d359fc9a28835dc84 upstream.

If SCSI commands are submitted with a SCSI request timeout that is
lower than the the IB RC timeout, it can happen that the SCSI error
handler has already started device recovery before transport layer
error handling starts.  So it can happen that the SCSI error handler
tries to abort a SCSI command after it has been reset by
srp_rport_reconnect().

Tell the SCSI error handler that such commands have finished and that
it is not necessary to continue its recovery strategy for commands
that have been reset by srp_rport_reconnect().

Signed-off-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>IB/srp: Remove target from list before freeing Scsi_Host structure</title>
<updated>2013-12-04T19:05:24Z</updated>
<author>
<name>Vu Pham</name>
</author>
<published>2013-10-10T11:50:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a3ecf3cc3ba14a603642d60af8c8e80798d1d492'/>
<id>urn:sha1:a3ecf3cc3ba14a603642d60af8c8e80798d1d492</id>
<content type='text'>
commit 65d7dd2f3479ef5aec1d9ddd1481cb7851c11af6 upstream.

Remove an SRP target from the SRP target list before invoking the last
scsi_host_put() call.  This change is necessary because that last put
frees the memory that holds the srp_target_port structure.

This patch prevents the following kernel oops:

    RIP: 0010:[&lt;ffffffff810b00d0&gt;] __lock_acquire+0x500/0x1570
    Call Trace:
     [&lt;ffffffff810b11e4&gt;] lock_acquire+0xa4/0x120
     [&lt;ffffffff81531206&gt;] _spin_lock+0x36/0x70
     [&lt;ffffffffa01b6d8f&gt;] srp_remove_work+0xef/0x180 [ib_srp]
     [&lt;ffffffff8109125c&gt;] worker_thread+0x21c/0x3d0
     [&lt;ffffffff81096e86&gt;] kthread+0x96/0xa0
     [&lt;ffffffff8100c20a&gt;] child_rip+0xa/0x20

Signed-off-by: Vu Pham &lt;vuhuong@mellanox.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

[ bvanassche - Modified path description and CC'ed stable. ]

Signed-off-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;

</content>
</entry>
<entry>
<title>IB/srp: Let srp_abort() return FAST_IO_FAIL if TL offline</title>
<updated>2013-07-11T23:43:48Z</updated>
<author>
<name>Bart Van Assche</name>
</author>
<published>2013-07-10T15:36:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=80d5e8a235624cd3c0e24be7c070fd6f445e590d'/>
<id>urn:sha1:80d5e8a235624cd3c0e24be7c070fd6f445e590d</id>
<content type='text'>
If the transport layer is offline it is more appropriate to let
srp_abort() return FAST_IO_FAIL instead of SUCCESS.

Reported-by: Sebastian Riemer &lt;sebastian.riemer@profitbricks.com&gt;
Acked-by: David Dillow &lt;dillowda@ornl.gov&gt;
Signed-off-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
</content>
</entry>
<entry>
<title>IB/srp: Bump driver version and release date</title>
<updated>2013-07-01T17:42:02Z</updated>
<author>
<name>Vu Pham</name>
</author>
<published>2013-06-28T12:59:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e8ca413558de8ea235a1223074c4ed09616b9034'/>
<id>urn:sha1:e8ca413558de8ea235a1223074c4ed09616b9034</id>
<content type='text'>
Signed-off-by: Vu Pham &lt;vu@mellanox.com&gt;
Signed-off-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
</content>
</entry>
<entry>
<title>IB/srp: Make HCA completion vector configurable</title>
<updated>2013-07-01T17:40:55Z</updated>
<author>
<name>Bart Van Assche</name>
</author>
<published>2013-06-28T12:57:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4b5e5f41c8e114bb856347134657eb9e1cccc822'/>
<id>urn:sha1:4b5e5f41c8e114bb856347134657eb9e1cccc822</id>
<content type='text'>
Several InfiniBand HCAs allow configuring the completion vector per
CQ.  This allows spreading the workload created by IB completion
interrupts over multiple MSI-X vectors and hence over multiple CPU
cores.  In other words, configuring the completion vector properly not
only allows reducing latency on an initiator connected to multiple
SRP targets but also allows improving throughput.

Signed-off-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Acked-by: David Dillow &lt;dillowda@ornl.gov&gt;
Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
</content>
</entry>
<entry>
<title>IB/srp: Maintain a single connection per I_T nexus</title>
<updated>2013-07-01T17:40:07Z</updated>
<author>
<name>Bart Van Assche</name>
</author>
<published>2013-06-28T12:51:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=96fc248a4c6fe1e5ffac4903b39d2dd5cbe2dc9a'/>
<id>urn:sha1:96fc248a4c6fe1e5ffac4903b39d2dd5cbe2dc9a</id>
<content type='text'>
An SRP target is required to maintain a single connection between
initiator and target.  This means that if the 'add_target' attribute
is used to create a second connection to a target, the first
connection will be logged out and that the SCSI error handler will
kick in.  The SCSI error handler will cause the SRP initiator to
reconnect, which will cause I/O over the second connection to fail.
Avoid such ping-pong behavior by disabling relogins.

If reconnecting manually is necessary, that is possible by deleting
and recreating an rport via sysfs.

Signed-off-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Signed-off-by: Sebastian Riemer &lt;sebastian.riemer@profitbricks.com&gt;
Acked-by: David Dillow &lt;dillowda@ornl.gov&gt;
Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
</content>
</entry>
<entry>
<title>IB/srp: Fail I/O fast if target offline</title>
<updated>2013-07-01T17:37:13Z</updated>
<author>
<name>Bart Van Assche</name>
</author>
<published>2013-06-28T12:49:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=99e1c1398f44a056b16e78122133988c82b66d97'/>
<id>urn:sha1:99e1c1398f44a056b16e78122133988c82b66d97</id>
<content type='text'>
If reconnecting failed we know that no command completion will
be received anymore.  Hence let the SCSI error handler fail such
commands immediately.

Signed-off-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Acked-by: David Dillow &lt;dillowda@ornl.gov&gt;
Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
</content>
</entry>
</feed>
