Commit Graph

5155 Commits

Author SHA1 Message Date
Bart Van Assche
12a8edb9d4 scst_vdisk: Comment out a local variable that is not used
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6971 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-21 23:16:56 +00:00
Bart Van Assche
f221a515e2 ib_srpt: Address a checkpatch complaint about a missing space
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6970 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-21 22:59:16 +00:00
Bart Van Assche
89e278e2d6 ib_srpt: Remove trailing whitespace
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6969 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-21 22:58:45 +00:00
Bart Van Assche
25d4ff90eb scst_vdisk: Use tabs instead of spaces for indentation
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6968 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-21 22:58:24 +00:00
Bart Van Assche
7f9c69ae21 isert-scst: Address checkpatch coding style complaints
This patch does not change any functionality.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6967 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-21 22:57:51 +00:00
Bart Van Assche
0fa4ce9230 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6965 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-20 04:00:46 +00:00
Vladislav Bolkhovitin
610325e5c2 scst README: add section about VMware and Ceph RBD space reclaim
Reported-by: Alex Gorbachev <ag@iss-integration.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6961 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-20 01:33:47 +00:00
Vladislav Bolkhovitin
68fc4a14b1 scst: fix compilation on older kernels
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6960 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-20 01:24:03 +00:00
Israel Rukshin
40fd212bdf isert: fix redundant module put on error flow when handling connect request
Signed-off-by: Israel Rukshin <israelr@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6958 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-17 07:28:52 +00:00
Israel Rukshin
0498de2100 isert: add conn to portal conn list only if rdma_accept succeeded
If rdma_accept() failed then we shouldn't call rdma_disconnect() on that QP
as the result is unexpected.

Signed-off-by: Israel Rukshin <israelr@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6957 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-17 07:28:47 +00:00
Israel Rukshin
183ef82731 isert: fix isert conn cleanup when rdma_accept fails
If rdma_accept fails the state of the qp is modified to error and all
posted recieve buffers will be flushed and because of the flush
the isert conn teardown flow will start.

Signed-off-by: Israel Rukshin <israelr@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6956 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-17 07:28:43 +00:00
Israel Rukshin
73b50bce1b isert: fix working with freed conn object
isert_delete_conn_dev function checks if it needs to close the connection
by checking that dev conn is not NULL.
We were missing set conn to null when freeing it and that caused working
with memory that was already freed.

Signed-off-by: Israel Rukshin <israelr@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6955 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-17 07:28:38 +00:00
Israel Rukshin
b292383396 isert: add missing fd put on error flow
Signed-off-by: Israel Rukshin <israelr@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6954 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-17 07:28:34 +00:00
Israel Rukshin
09d719a009 isert: fix races between conn fops read/write and disconnect flow
read/write events may arive after the isert connection has
started the teardown flow.
This scenario may occur on login logout stress.
It may lead to NULL derefrence bugs.

Signed-off-by: Israel Rukshin <israelr@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6953 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-17 07:28:29 +00:00
Israel Rukshin
9dee83d555 isert: faster release of isert_scst module
If there is a dead connection we don't want to wait 60 seconds for
the connection timeout error.
So when closing the portal we close now all the connections
immediately without waiting for events to arrive.

Signed-off-by: Israel Rukshin <israelr@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6952 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-17 07:28:25 +00:00
Israel Rukshin
45256dd888 isert: fix isert connection kref leak
To avoid rare cases when checking ISERT_CONNECTION_EST bit
may lead to kref leak, we now take the third refcount earlier
before calling to rdma_accept.

Signed-off-by: Israel Rukshin <israelr@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6951 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-17 07:28:20 +00:00
Israel Rukshin
87902c8722 isert: fix a race between calling to rdma_disconnect and connect flow
1) The race can happen after unreachable event handler close isert connection
and calling to rdma_disconnect from another thread on illegal cm_id.
For example call rdma_disconnect from isert_portal_release function.

2) It is also possible to get ESTABLISHED RDMACM event while rdma_disconnect
is called from another thread.
In established event we need to check conn is not in
teardown flow by checking the connection state with a mutex.

Signed-off-by: Israel Rukshin <israelr@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6950 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-17 07:28:16 +00:00
Israel Rukshin
79949e9b4c isert: change dev conn_lock spinlock to mutex
Signed-off-by: Israel Rukshin <israelr@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6949 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-17 07:28:11 +00:00
Israel Rukshin
dbf6975a3b isert: close isert connection earlier
We want to close the connection not only when timewait
exit event arrive, but also on some other events.

Signed-off-by: Israel Rukshin <israelr@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6948 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-17 07:28:06 +00:00
Israel Rukshin
9c891f321e isert: fix isert connection kref leak at estabished event handler
Fix a missing kref put when isert_conn_established return an error.
By removing set bit ISERT_CONNECTION_ABORTED the connection teardown
will start when recieving the flush WRs.

Signed-off-by: Israel Rukshin <israelr@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6947 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-17 07:28:02 +00:00
Israel Rukshin
3ce0f6604d isert: fix a race when drain wr is not the last flush
We must wait for both the send and recv cqs to flush all pending work
requests.
To make sure that the drain will be the last flush we post a second
drain work request on the recv queue.

Signed-off-by: Israel Rukshin <israelr@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6946 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-17 07:27:57 +00:00
Israel Rukshin
807ae45a76 isert: fix a race between timewait exit handler and poll cq
Timewait exit event handler start to close iscsi conn
before poll cq finish to handle all the good completions.
This may lead to NULL deref at poll cq context or post recv
after post drain.
This commit close iscsi conn only when start getting flush.
Flush is guaranteed if iscsi conn was created because when allocating
iscsi conn we call post recv.

Signed-off-by: Israel Rukshin <israelr@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6945 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-17 07:27:53 +00:00
Israel Rukshin
1c3de9fa71 isert: replace kernel prints with scst macros
Signed-off-by: Israel Rukshin <israelr@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6944 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-17 07:27:48 +00:00
Israel Rukshin
854a7a060d isert: add assertion if send/recv was posted after post drain
After post drain we are not allowed to call post_recv or post_send,
because the drain must be the last flush to let us know that we may
close the conection safely.

Signed-off-by: Israel Rukshin <israelr@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6943 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-17 07:27:43 +00:00
Israel Rukshin
b235efb8d2 isert: fix missing refcount cleanup at error flow
Before calling to rdma_accept isert kref is 2, so on failure
we must decrease it twice.

Signed-off-by: Israel Rukshin <israelr@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6942 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-17 07:27:38 +00:00
Israel Rukshin
2e4544e351 isert: fix isert conn refcount release at unreachable event
On unreachable event the isert conn kref is always 2.
The refcount becomes 2 after successful connect event.

Signed-off-by: Israel Rukshin <israelr@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6941 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-17 07:27:33 +00:00
Israel Rukshin
8587672dc4 isert: fix race between ioctl events and disconnect flow
The ioctl events may arive after the isert connection has
started the teardown flow.
This scenario may occur on login logout stress.
It may lead to NULL derefrence bugs.

Signed-off-by: Israel Rukshin <israelr@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6940 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-17 07:27:28 +00:00
Israel Rukshin
e3f77ba979 isert: fix fops ioctl using invalid conn
On teardown flow we need to set dev conn state to disconnected.

Signed-off-by: Israel Rukshin <israelr@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6939 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-17 07:27:24 +00:00
Israel Rukshin
a67322d288 isert: change wrong dev_conn bug on
Signed-off-by: Israel Rukshin <israelr@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6938 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-17 07:27:19 +00:00
Israel Rukshin
32ca0a7846 isert: fix a possible extra refcount put of isert connection
On login logout stress we can start a teardown flow before connection is
fully established.
In this case we have one less refcount on isert connection.

Signed-off-by: Israel Rukshin <israelr@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6937 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-17 07:27:15 +00:00
Israel Rukshin
a3b45f61bf isert: add assertions for connection teardwon flow
Signed-off-by: Israel Rukshin <israelr@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6936 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-17 07:27:11 +00:00
Israel Rukshin
c3827a6f54 isert: fix cleaning isert_con_dev
Clean pointers not to point to invalid memory.
- While conn is released set conn_dev->conn to null as conn is invalid now.
- While conn_dev is released set priv(conn) to null as conn_dev is invalid now.

Signed-off-by: Israel Rukshin <israelr@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6935 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-17 07:27:06 +00:00
Israel Rukshin
583f452957 isert: make sure rdma_disconnect is called only once
Signed-off-by: Israel Rukshin <israelr@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6934 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-17 07:17:37 +00:00
Bart Van Assche
3c66e5bf82 scst/README.dlm: Correct instructions for waiting for logout
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6933 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-11 18:36:48 +00:00
Bart Van Assche
6dd5fbfa27 srpt/Testing.txt: Leave out --norandommap
--verify and --norandommap are mutually exclusive. Hence leave out
--norandommap.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6932 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-09 20:18:03 +00:00
Bart Van Assche
4f776f42bb scst/README.dlm: Update startup sequence information
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6931 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-08 20:52:00 +00:00
Vladislav Bolkhovitin
ce52affcdf scst_vdisk: don't report unmap alignment, if it is equal to unmap granularity
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6930 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-03 02:49:31 +00:00
Vladislav Bolkhovitin
830fe47378 Update SVN_TAGS
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6928 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-03 02:33:56 +00:00
Vladislav Bolkhovitin
69863eb497 Increase version to 3.3
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6927 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-03 02:32:17 +00:00
Vladislav Bolkhovitin
f125a4e9bf scst: Update README.dlm
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6921 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-03 01:43:24 +00:00
Bart Van Assche
a5f67cd1f2 scst_dlm: Instantiate lockspace as soon as cluster mode is enabled
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6920 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-02 16:31:00 +00:00
Bart Van Assche
d41a3a3cc9 /etc/init.d/scst: Make this script work on recent versions of Ubuntu Linux
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6919 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-07-26 17:26:17 +00:00
Vladislav Bolkhovitin
cde21c669a scst: small post-r6913 cleanup
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6918 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-07-26 02:04:34 +00:00
Vladislav Bolkhovitin
244271120e iscsi-scst: increase past CmdSN window to 2048
On modern storage there might be more, than 128, commands queued, so
previous CmdSN window might be too small and on unstable networks lead
to infinite retries. For more infor see thread
https://sourceforge.net/p/scst/mailman/message/35238904.

Reported-By: Lev Vainblat <lev@zadarastorage.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6917 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-07-26 01:42:26 +00:00
Bart Van Assche
1a24483678 scst.h: Move more code to <scst/backport.h>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6916 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-07-25 21:16:49 +00:00
Bart Van Assche
0a3d69c31b scst_vdisk: Fix spelling of "reopening"
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6915 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-07-25 17:03:06 +00:00
Bart Van Assche
18ccf50b87 scst_pres: Save APTPL PR info on both nodes
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6914 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-07-22 16:51:07 +00:00
Bart Van Assche
e2b03a7836 scst_pres: Modify scst_pr_sync_device_file() function prototype
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6913 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-07-22 16:50:31 +00:00
Bart Van Assche
17f49dbede scst_dlm: Initialize reg->dlm_idx for PR information loaded from disk
This patch avoids that the following kernel warning appears while
starting SCST after having loaded APTPL PR information:

WARNING: scst/src/scst_dlm.c:461 scst_copy_to_dlm()

Reported-by: <consus@gmx.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6912 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-07-22 16:48:38 +00:00
Vladislav Bolkhovitin
ff3b499a4c scst: fix perf build
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6911 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-07-15 01:23:38 +00:00