Avoid that removing an acg with which a large number of sessions
has been associated triggers a stack overflow due to the following
recursive call chain:
scst_put_acg() -> scst_release_acg() -> scst_free_acg() -> scst_free_acn()
-> scst_check_reassign_sessions() -> scst_check_reassign_sess()
-> scst_put_acg().
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6500 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Avoid that the "REPORTED LUNS DATA HAS CHANGED" unit attention
condition can get cleared if a LUN is added after the response buffer
has been filled and before the response is sent to the initiator. Do
not clear the "REPORTED LUNS DATA HAS CHANGED" unit attention
condition unsupported values of the SELECT REPORT field.
See also patch "scst: Rework sess_tgt_dev_list locking" (commit ID
5af7d9277d).
Reported-by: Kurt Reddew <kurt.reddew@gmail.com>
Avoid that the tgt_dev list can be modified after the
spin_lock(&tgt_dev->tgt_dev_lock) statement and before the
spin_unlock(&tgt_dev->tgt_dev_lock) statement.
See also patch "scst: Rework sess_tgt_dev_list locking" (commit ID
5af7d9277d).
Reported-by: Kurt Reddew <kurt.reddew@gmail.com>
If cluster mode is enabled in SCST then the persistent reservation
state is shared and synchronized between multiple nodes via DLM LVB's
(lock value blocks).
The sysfs attribute cluster_mode controls whether or not persistent
reservation information is synchronized between cluster nodes.
Additionally, MODE SELECT commands are refused with cluster mode
enabled since mode pages are not yet synchronized between cluster
nodes.
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Additionally, fix the logic for determining %{krpmver} if %{kdir} points
to another kernel version than the latest kernel version.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6496 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Additionally, make the fourth component of the version number configurable.
An example: make RPM REVISION=r733
Reported-by: Consus <consus@gmx.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6491 d57e44dd-8a1f-0410-8b47-8ef2f437770f
I hit couple of issues in scst.spec.in:
1. krpmver sets to oldest available kernel rpm version (RedHat/Fedora
typically keeps 3 kernels), that causes rpm dependency on a wrong
kernel version
2. if system has a newer kernel version installed but not booted into
it yet, build goes against currently running kernel version,
disrespecting what KVER is set to.
Signed-off-by: Vitaly Mayatskih <v.mayatskih@gmail.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6490 d57e44dd-8a1f-0410-8b47-8ef2f437770f
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