On scst teardown we call rdma_disconnect() on all connections.
this moves the qps to error state and flushes all the wc, including
the drain wc which will results in kref_put of the connection.
In a race condition with the connection request, we might be only in
the init stage of the ref, and calling kref_put will result in refcount
0 and freeing the connection while establishing it.
Call the first kref_get before rdma_accept() to prevent this race.
Signed-off-by: Ariel Nahum <arieln@mellanox.com>
Signed-off-by: Yan Burman <yanb@mellanox.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6486 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Avoid that sparse complains about casts that remove the address space
of an expression. This patch does not change any functionality.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6484 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Better to see in the logs in (S)IRQs wrong thread ID, than no thread ID under IRQ locks
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6479 d57e44dd-8a1f-0410-8b47-8ef2f437770f
The second TM request can come while the old one, response for which is
going to be delayed, is still being processed, hence no response
prepared yet, so the delayed response should be dropped on the stage of
the new response preparing. Otherwise in this place the old delayed
response will trigger BUG_ON().
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6456 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Avoid that the following error message is printed when stopping
or starting SCST if iscsi-scstd has not been installed:
# /sbin/service scst restart
which: no iscsi-scstd in
(/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin)
Restarting SCST
Signed-off-by: Hiroyuki Sato <hiroysato@gmail.com>
[bvanassche: Eliminated ISCSI_DAEMON variable]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6436 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Commit r6420 broke scst unloading, since isert_scst must be
unloaded before iscsi_scst.
Additionally, fix another possible cause of failing to unload
isert_scst. With iSER (RDMA CM to be exact) it may take up to
about 50 seconds to receive disconnected event if the remote end
is for some reason unreachable, e.g. becauase of a cable problem
or power loss/forced reboot on initiator side. This is due to MAD
send timeout.
Signed-off-by: Yan Burman <yanb@mellanox.com>
[bvanassche: modified this patch such that it uses unload_kmod()]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6432 d57e44dd-8a1f-0410-8b47-8ef2f437770f
We were submitting work requests sometimes after the drain_wr,
so we would try to process flushes on something that is already
destroyed. This can be seen with very high login/logout load.
Signed-off-by: Yan Burman <yanb@mellanox.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6428 d57e44dd-8a1f-0410-8b47-8ef2f437770f
In order to be able to support large block sizes (larger than 512K),
we allocate required structured in a lazy fashion. This way we both support
large block sizes (over 512K and even over 1M). We also lower memory footprint
when smaller block sizes are used.
Signed-off-by: Yan Burman <yanb@mellanox.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6418 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Move the get_unaligned_*() functions up such that these occur
before the T10-PI functions. Backport the definition of
VARIABLE_LENGTH_CMD. Make scst_dif_crc_fn() build on RHEL 5
systems.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6415 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Avoid that the compiler reports warnings about strict aliasing when
building iscsi-scst on RHEL 6. This patch does not change any
functionality.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6414 d57e44dd-8a1f-0410-8b47-8ef2f437770f