470 Commits

Author SHA1 Message Date
Vladislav Bolkhovitin
2b71abc416 Switch default to release mode
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.2.x@7055 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-12-16 02:51:54 +00:00
Vladislav Bolkhovitin
84c07327c4 Merged revisions 7012-7029 via svnmerge from
svn+ssh://svn.code.sf.net/p/scst/svn/trunk

........
  r7012 | vlnb | 2016-10-17 22:00:58 -0700 (Mon, 17 Oct 2016) | 3 lines
  
  iscsi-scst: HOWTO updated
........
  r7013 | bvassche | 2016-10-21 14:21:29 -0700 (Fri, 21 Oct 2016) | 2 lines
  
  scst regression tests: Unload the scst kernel module explicitly
........
  r7014 | bvassche | 2016-10-21 14:54:02 -0700 (Fri, 21 Oct 2016) | 1 line
  
  scstadmin: Avoid that specifying an attribute multiple times results in an incomprehensible error message
........
  r7015 | vlnb | 2016-10-21 19:19:03 -0700 (Fri, 21 Oct 2016) | 3 lines
  
  Docs updates
........
  r7016 | bvassche | 2016-10-25 13:49:21 -0700 (Tue, 25 Oct 2016) | 1 line
  
  scst_user: Port to Linux kernel v4.9
........
  r7017 | bvassche | 2016-10-25 13:50:15 -0700 (Tue, 25 Oct 2016) | 4 lines
  
  ib_srpt: Cache global L_Key
  
  This patch does not change any functionality.
........
  r7018 | bvassche | 2016-10-25 13:50:34 -0700 (Tue, 25 Oct 2016) | 2 lines
  
  ib_srpt: Port to Linux kernel v4.9
........
  r7019 | bvassche | 2016-10-25 15:21:46 -0700 (Tue, 25 Oct 2016) | 4 lines
  
  isert-scst: Cache L_Key
  
  This patch does not change any functionality.
........
  r7020 | bvassche | 2016-10-25 15:22:07 -0700 (Tue, 25 Oct 2016) | 2 lines
  
  isert-scst: Port to Linux kernel v4.9
........
  r7021 | bvassche | 2016-10-26 14:33:50 -0700 (Wed, 26 Oct 2016) | 1 line
  
  iscsi-scst: Port to Linux kernel versions >= v4.7
........
  r7022 | vlnb | 2016-11-16 20:33:38 -0800 (Wed, 16 Nov 2016) | 7 lines
  
  generate-kernel-patch: fix custom cross-compilation kernel case
  
  Otherwise there is non-fatal error like: No such file or directory
  
  grep: /lib/modules/<current_running_kernel>/build/.config: Permission denied
........
  r7023 | vlnb | 2016-11-16 20:44:48 -0800 (Wed, 16 Nov 2016) | 3 lines
  
  generate-kernel-patch: optimize generation of Makefile for qla2x00t
........
  r7024 | vlnb | 2016-11-16 20:55:15 -0800 (Wed, 16 Nov 2016) | 3 lines
  
  generate-kernel-patch: optimize generation of Makefile for dev_handlers
........
  r7025 | vlnb | 2016-11-16 21:06:59 -0800 (Wed, 16 Nov 2016) | 3 lines
  
  generate-kernel-patch: optimize generation of Makefile for scst
........
  r7026 | vlnb | 2016-11-16 21:12:33 -0800 (Wed, 16 Nov 2016) | 3 lines
  
  generate-kernel-patch: optimize generation of Makefile for drivers/Kconfig
........
  r7027 | vlnb | 2016-11-16 21:18:55 -0800 (Wed, 16 Nov 2016) | 3 lines
  
  generate-kernel-patch: optimize generation of Makefile.drivers patch
........
  r7028 | vlnb | 2016-11-16 21:24:07 -0800 (Wed, 16 Nov 2016) | 3 lines
  
  generate-kernel-patch: optimize generation of Makefile for scst_local
........
  r7029 | vlnb | 2016-11-22 19:45:35 -0800 (Tue, 22 Nov 2016) | 5 lines
  
  scst: fix overflows handling for tapes
  
  Reported and tested by Matthew D. Frederes <matt@bitech.biz>
........


git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.2.x@7030 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-11-23 04:31:25 +00:00
Vladislav Bolkhovitin
cb1d6bdf63 Merged revisions 6977,6979-6980,6984-6986,6990-6992,6994,6997,7006-7009 via svnmerge from
svn://svn.code.sf.net/p/scst/svn/trunk

........
  r6977 | bvassche | 2016-08-23 08:42:41 -0700 (Tue, 23 Aug 2016) | 5 lines
  
  isert-scst: More MOFED 3.3 fixes for kernel versions >= 4.6.0
  
  This is a slightly modified version of a patch from
  Israel Rukshin <israelr@mellanox.com>.
........
  r6979 | vlnb | 2016-08-23 19:02:28 -0700 (Tue, 23 Aug 2016) | 5 lines
  
  scst: cleanup
  
  Reported-By: Curtis Maloney <curtis@tinbrain.net>
........
  r6980 | vlnb | 2016-08-23 19:05:03 -0700 (Tue, 23 Aug 2016) | 5 lines
  
  iscsi: convert recently added BUG_ON() to EXTRACHECKS_BUG_ON()
  
  This check is rather debug check, so should belong to debug build only
........
  r6984 | vlnb | 2016-09-19 20:10:30 -0700 (Mon, 19 Sep 2016) | 5 lines
  
  scst_sysfs: better return value when trying to create an acg that already exists
  
  Signed-off-by: Erez Zilber <erezzi.list@gmail.com>
........
  r6985 | vlnb | 2016-09-22 20:04:16 -0700 (Thu, 22 Sep 2016) | 5 lines
  
  scst_vdisk: added parameter cluster_mode to nullio device handler
  
  Signed-off-by: Kirill Tyushev <kirill.tyushev8@gmail.com>
........
  r6986 | bvassche | 2016-10-03 15:00:52 -0700 (Mon, 03 Oct 2016) | 6 lines
  
  scst/include/backport.h: Fix RHEL/CentOS 7 build
  
  RHEL 7 and CentOS 7 provide a definition of ktime_before(). Hence
  hide the ktime_before() definition on these Linux distro's.
........
  r6990 | bvassche | 2016-10-06 12:10:00 -0700 (Thu, 06 Oct 2016) | 3 lines
  
  scst_vdisk: Rename blockio_rw_sync() into blockio_read_sync()
........
  r6991 | bvassche | 2016-10-06 12:20:57 -0700 (Thu, 06 Oct 2016) | 2 lines
  
  scst: Port to Linux kernel v4.8
........
  r6992 | bvassche | 2016-10-06 17:22:47 -0700 (Thu, 06 Oct 2016) | 1 line
  
  scstadmin: Sort group and device group names alphabetically
........
  r6994 | bvassche | 2016-10-06 17:45:18 -0700 (Thu, 06 Oct 2016) | 1 line
  
  scst_vdisk: Use op_is_write() instead of comparing with REQ_OP_WRITE
........
  r6997 | vlnb | 2016-10-07 16:34:34 -0700 (Fri, 07 Oct 2016) | 3 lines
  
  SCST README: clarification
........
  r7006 | vlnb | 2016-10-10 20:06:41 -0700 (Mon, 10 Oct 2016) | 5 lines
  
  scst: fix tapes handling with Windows initiators
  
  Reported and tested by Florian Gall <florian@enterprize.dyndns.info>
........
  r7007 | vlnb | 2016-10-10 20:30:54 -0700 (Mon, 10 Oct 2016) | 3 lines
  
  fileio_tgt: fix debug output
........
  r7008 | vlnb | 2016-10-11 18:27:42 -0700 (Tue, 11 Oct 2016) | 5 lines
  
  README.drbd: update to point to README.dlm for reservations sync
  
  Suggested-by: Curtis Maloney <curtis@tinbrain.net>
........
  r7009 | vlnb | 2016-10-13 18:30:17 -0700 (Thu, 13 Oct 2016) | 6 lines
  
  iscsi-scst: fix false positive BUG_ON()
  
  It's false positive, because responses live in the parent request's list
  until last put for the parent.
........


git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.2.x@7010 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-10-14 01:58:55 +00:00
Bart Van Assche
69200308aa ib_srpt: Merge revisions 6932, 6969, 6970, 6973, 6976, 6978 and 6981 from trunk
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.2.x@6995 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-10-07 15:22:28 +00:00
Israel Rukshin
377c61ddd0 Merged revisions 6934-6958 from trunk
------------------------------------------------------------------------
r6934 | mlx-storage | 2016-08-17 10:17:37 +0300 (Wed, 17 Aug 2016) | 4 lines

isert: make sure rdma_disconnect is called only once

------------------------------------------------------------------------
r6935 | mlx-storage | 2016-08-17 10:27:06 +0300 (Wed, 17 Aug 2016) | 8 lines

isert: fix cleaning isert_con_dev

------------------------------------------------------------------------
r6936 | mlx-storage | 2016-08-17 10:27:11 +0300 (Wed, 17 Aug 2016) | 4 lines

isert: add assertions for connection teardwon flow

------------------------------------------------------------------------
r6937 | mlx-storage | 2016-08-17 10:27:15 +0300 (Wed, 17 Aug 2016) | 8 lines

isert: fix a possible extra refcount put of isert connection

------------------------------------------------------------------------
r6938 | mlx-storage | 2016-08-17 10:27:19 +0300 (Wed, 17 Aug 2016) | 4 lines

isert: change wrong dev_conn bug on

------------------------------------------------------------------------
r6939 | mlx-storage | 2016-08-17 10:27:24 +0300 (Wed, 17 Aug 2016) | 6 lines

isert: fix fops ioctl using invalid conn

------------------------------------------------------------------------
r6940 | mlx-storage | 2016-08-17 10:27:28 +0300 (Wed, 17 Aug 2016) | 9 lines

isert: fix race between ioctl events and disconnect flow

------------------------------------------------------------------------
r6941 | mlx-storage | 2016-08-17 10:27:33 +0300 (Wed, 17 Aug 2016) | 7 lines

isert: fix isert conn refcount release at unreachable event

------------------------------------------------------------------------
r6942 | mlx-storage | 2016-08-17 10:27:38 +0300 (Wed, 17 Aug 2016) | 7 lines

isert: fix missing refcount cleanup at error flow

------------------------------------------------------------------------
r6943 | mlx-storage | 2016-08-17 10:27:43 +0300 (Wed, 17 Aug 2016) | 8 lines

isert: add assertion if send/recv was posted after post drain

------------------------------------------------------------------------
r6944 | mlx-storage | 2016-08-17 10:27:48 +0300 (Wed, 17 Aug 2016) | 4 lines

isert: replace kernel prints with scst macros

------------------------------------------------------------------------
r6945 | mlx-storage | 2016-08-17 10:27:53 +0300 (Wed, 17 Aug 2016) | 12 lines

isert: fix a race between timewait exit handler and poll cq

------------------------------------------------------------------------
r6946 | mlx-storage | 2016-08-17 10:27:57 +0300 (Wed, 17 Aug 2016) | 9 lines

isert: fix a race when drain wr is not the last flush

------------------------------------------------------------------------
r6947 | mlx-storage | 2016-08-17 10:28:02 +0300 (Wed, 17 Aug 2016) | 8 lines

isert: fix isert connection kref leak at estabished event handler

------------------------------------------------------------------------
r6948 | mlx-storage | 2016-08-17 10:28:06 +0300 (Wed, 17 Aug 2016) | 7 lines

isert: close isert connection earlier

------------------------------------------------------------------------
r6949 | mlx-storage | 2016-08-17 10:28:11 +0300 (Wed, 17 Aug 2016) | 4 lines

isert: change dev conn_lock spinlock to mutex

------------------------------------------------------------------------
r6950 | mlx-storage | 2016-08-17 10:28:16 +0300 (Wed, 17 Aug 2016) | 13 lines

isert: fix a race between calling to rdma_disconnect and connect flow

------------------------------------------------------------------------
r6951 | mlx-storage | 2016-08-17 10:28:20 +0300 (Wed, 17 Aug 2016) | 8 lines

isert: fix isert connection kref leak

------------------------------------------------------------------------
r6952 | mlx-storage | 2016-08-17 10:28:25 +0300 (Wed, 17 Aug 2016) | 9 lines

isert: faster release of isert_scst module

-----------------------------------------------------------------------
r6953 | mlx-storage | 2016-08-17 10:28:29 +0300 (Wed, 17 Aug 2016) | 9 lines

isert: fix races between conn fops read/write and disconnect flow

------------------------------------------------------------------------
r6954 | mlx-storage | 2016-08-17 10:28:34 +0300 (Wed, 17 Aug 2016) | 4 lines

isert: add missing fd put on error flow

------------------------------------------------------------------------
r6955 | mlx-storage | 2016-08-17 10:28:38 +0300 (Wed, 17 Aug 2016) | 9 lines

isert: fix working with freed conn object

------------------------------------------------------------------------
r6956 | mlx-storage | 2016-08-17 10:28:43 +0300 (Wed, 17 Aug 2016) | 8 lines

isert: fix isert conn cleanup when rdma_accept fails

------------------------------------------------------------------------
r6957 | mlx-storage | 2016-08-17 10:28:47 +0300 (Wed, 17 Aug 2016) | 7 lines

isert: add conn to portal conn list only if rdma_accept succeeded

------------------------------------------------------------------------
r6958 | mlx-storage | 2016-08-17 10:28:52 +0300 (Wed, 17 Aug 2016) | 4 lines

isert: fix redundant module put on error flow when handling connect request

------------------------------------------------------------------------

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.2.x@6966 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-21 09:36:18 +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
76b20c76b8 isert: fix race between teardown flow and connect flow
It is possible to get ESTABLISHED RDMACM event while the connection
is already started teardown flow (i.e. addr change).
At teardown the refcount is reduced to zero and we start releasing the
connection. In established event We need to check conn is not in teardown
flow by checking its ref count is not 0.

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


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6879 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-04-26 14:13:33 +00:00
Bart Van Assche
07bc4bb1af isert: clean tmo timer when freeing the connection
The tmo timer is set when allocating a new connection.
We need to release it in case it didn't execute yet.
Else timer execution will lead to a NULL dereference bug on conn.

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


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6878 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-04-26 14:13:13 +00:00
Bart Van Assche
0283a854ed isert: wait for RDMA CM event to complete before destroy resources
There is a race between RDMACM event handler and isert_conn_free.
The event handler use the connection resources and isert_conn_free
destroy them.
This commit fix multiple NULL dereference bugs.

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


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6877 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-04-26 14:12:47 +00:00
Bart Van Assche
f297ef6f38 isert: fix double free of a fake request
A nop that is sent from the scst is treated as a fake request.
When a fake request is allocated we release it immediately,
so it's wrong to release it also on a completion error (isert_pdu_err).

This commit fix a NULL dereference bug when receiving completion with
error on this nop.

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


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6876 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-04-26 14:12:17 +00:00
Bart Van Assche
3ab98d8174 iscsi-scst: Fix checkpatch complaints about whitespace
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6846 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-03-27 16:10:26 +00:00
Bart Van Assche
eff3021fb5 scst: Port to Linux kernel v4.6
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6835 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-03-24 04:08:12 +00:00
Vladislav Bolkhovitin
83d0cb0f46 iscsi-scst: fix possible recursive locking
cmnd_done() called from cmnd_put() can take cmd_list_lock, so it must
not be called under it.

Reported and tested by David Chen <david.chen@osnexus.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6821 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-03-02 04:13:42 +00:00
Vladislav Bolkhovitin
a1b613af75 iscsi-scst: clarify comment
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6811 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-02-19 03:12:53 +00:00
Bart Van Assche
2ce7057d54 isert-scst: Port to Linux kernel v4.5
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6798 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-02-16 19:35:52 +00:00
Vladislav Bolkhovitin
fa2f54ac9e Copyrights updated
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6787 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-01-22 04:04:43 +00:00
Bart Van Assche
df2a2ac1ab iscsi-scst, procfs: Fix a compiler warning
Avoid that the compiler warns that attr_info is not used in the procfs
build.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6742 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-12-16 08:44:04 +00:00
Bart Van Assche
034f8bc3f1 isert-scst: Unbreak nightly build
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6740 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-12-12 16:02:37 +00:00
Bart Van Assche
7eb874c3ba isert-scst: RHEL 7.2 build fix
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6739 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-12-11 23:44:27 +00:00
Bart Van Assche
87347442fd isert-scst: Port to Linux kernel v4.4
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6699 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-11-18 22:11:37 +00:00
Bart Van Assche
0597ac78c8 iscsi-scst: Fix IPv6 format specifications
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6670 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-11-11 22:05:05 +00:00
Bart Van Assche
4bda296d64 isert-scst: Fix an IPv6 format specification
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6669 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-11-11 22:04:42 +00:00
Bart Van Assche
9455a2b9dc isert-scst: Use kmalloc_array() instead of kmalloc() with multiply
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6636 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-11-09 20:09:14 +00:00
Bart Van Assche
469fe4a42c iscsi-scst: Remove superfluous casts
The C language does not require to use an explicit cast when assigning
a void * pointer to a pointer of another type.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6633 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-11-09 19:51:17 +00:00
Bart Van Assche
706d4cec40 isert-scst: Convert casts into container_of() where appropriate
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6632 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-11-09 19:44:58 +00:00
Bart Van Assche
8a09beb37d isert-scst: Fix isert conn tx_free_list resources leak
The get and put of resources from the tx_free commands pool was not
symmetric. Commands that are self issued by the target (e.g. nop outs)
didn't release their resources, although they acquired them earlier.

Signed-off-by: Ariel Nahum <arieln@mellanox.com>
Signed-off-by: Alex Lyakas <alex@zadarastorage.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6630 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-11-09 19:19:41 +00:00
Bart Van Assche
51acfdb0ac isert-scst: Use kcalloc() instead of kzalloc() with multiply
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6624 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-11-09 17:26:16 +00:00
Bart Van Assche
7614eafd64 iscsi-scst: Insert a blank line after declarations
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6616 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-11-07 00:00:42 +00:00
Bart Van Assche
55f1a2e398 isert-scst: Insert a blank line after declarations
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6615 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-11-07 00:00:27 +00:00
Bart Van Assche
90d901fab7 scst: Fix block comment formatting
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6607 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-11-06 18:25:59 +00:00
Bart Van Assche
5d73f89bb0 isert-scst: Remove unreachable code
Code after BUG() is unreachable both with CONFIG_BUG=y and with
CONFIG_BUG=n. Hence remove such code. Detected by smatch.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6600 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-11-06 18:03:36 +00:00
Bart Van Assche
a8ecf61074 isert: Rename a function
Signed-off-by: Ariel Nahum <arieln@mellanox.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6566 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-10-29 15:57:32 +00:00
Bart Van Assche
0a2cdd1f64 iscsi-scst/kernel/Makefile.in-kernel: Sort file names alphabetically
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6563 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-10-28 21:11:06 +00:00
Bart Van Assche
46202aa823 isert: Fix null dereference in isert_cmnd allocation code
In a state where the list isert_conn->tx_free_list is empty
(mostly under traffic), we might fail to receive a command from
the isert command pool. This will result in later null deref.

In this case, busy-wait until a command will be available (will
be freed by the receive context).

[2158233.952087] BUG: unable to handle kernel NULL pointer dereference at (null)
[2158233.956023] IP: [<ffffffffa04e14d0>] isert_pdu_send+0xc0/0x1f0 [isert_scst]
....
[2158233.956023]  [<ffffffffa04d98c8>] ? isert_cmnd_alloc+0x78/0x110 [isert_scst]
[2158233.956023]  [<ffffffffa045b5a0>] req_cmnd_release+0x50/0x130 [iscsi_scst]
[2158233.956023]  [<ffffffffa04622cb>] iscsi_send_nop_in+0x19b/0x370 [iscsi_scst]

Signed-off-by: Ariel Nahum <arieln@mellanox.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6554 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-10-28 16:55:48 +00:00
Bart Van Assche
bd6d12aa38 isert-scst: Kernel v4.3 build fix
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6521 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-09-29 00:07:48 +00:00
Bart Van Assche
0cbd279a34 isert-scst: Fix a checkpatch complaint about whitespace
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6506 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-09-16 16:31:01 +00:00
Bart Van Assche
175463ca84 isert-scst: Fix race condition between login request and scst teardown flow
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
2015-08-27 17:53:32 +00:00
Bart Van Assche
dba2b1ac6b isert: Only set WR next pointer when needed
Signed-off-by: Yan Burman <yanb@mellanox.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6482 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-08-25 21:40:41 +00:00
Bart Van Assche
4fcec5f359 isert: Only set signalled flag when needed
Do not set signalled flag and then zero it for unneeded cases.
Instead only set it when necessary
    
Signed-off-by: Yan Burman <yanb@mellanox.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6481 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-08-25 21:40:11 +00:00
Bart Van Assche
58cfc4f8b8 iscsi: Only use thread pool for TCP but not for iSER
Signed-off-by: Yan Burman <yanb@mellanox.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6480 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-08-25 21:39:39 +00:00
Vladislav Bolkhovitin
45d7f40ec1 Improve release logging
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6478 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-08-25 02:57:51 +00:00
Vladislav Bolkhovitin
20f523a1b3 Cleanup
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6477 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-08-25 02:56:08 +00:00
Bart Van Assche
7a9e1f1889 isert: Limit isert_nr_devs parameter to maximum we support
Signed-off-by: Yan Burman <yanb@mellanox.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6461 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-08-03 18:48:24 +00:00
Bart Van Assche
9105e9cf5d isert: Don't overwrite userspace if insufficient buffer is provided
Signed-off-by: Yan Burman <yanb@mellanox.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6460 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-08-03 18:46:16 +00:00
Vladislav Bolkhovitin
e5e54f312b iscsi-scst: Move old TM response dropping to preparing new response stage
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
2015-07-31 01:09:58 +00:00
Bart Van Assche
7a2d9043f6 isert: Fix use-after-free when work requests were submitted after drain_wr
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
2015-07-27 15:26:09 +00:00
Bart Van Assche
6c0a869007 isert-scst: Linux kernel v4.2 ib_create_cq() build fix
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6427 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-07-14 23:57:42 +00:00
Bart Van Assche
d05518f5bc isert-scst: Kernel v4.2 build fix
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6425 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-07-14 23:47:50 +00:00
Bart Van Assche
8eb3f31eea iscsi-scst: Fix parameter order in a debug statement
Signed-off-by: Alexey Obitotskiy <mobbitster@gmail.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6421 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-07-14 21:50:51 +00:00
Bart Van Assche
ebcfc73439 isert: Allocate sge and wr structures dynamically
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
2015-07-11 03:41:15 +00:00