Commit Graph

456 Commits

Author SHA1 Message Date
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
Bart Van Assche
993f290908 isert-scst: Port this driver to RHEL 5
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6416 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-07-10 22:27:37 +00:00
Vladislav Bolkhovitin
1656efe689 iscsi-scst: small post-r6315 cleanup
Avoid that rd_task declared when it is not used



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6408 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-07-03 04:21:52 +00:00
Bart Van Assche
75369451a5 isert-scst/Kconfig: Add InfiniBand dependency
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6402 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-06-25 14:12:54 +00:00
Bart Van Assche
79c8bf1f7c iscsi-scst, isert-scst: One trace flags variable per kernel module
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6397 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-06-23 15:01:17 +00:00
Bart Van Assche
f0e98ee4b2 isert-scst: Build fix for older kernel versions (< 2.6.29)
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6395 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-06-19 14:06:05 +00:00
Bart Van Assche
46915ef3e5 iscsi-scst: Fix a syntax error
Preprocessor directives are not allowed in argument lists of a macro.
This patch reverts r6317.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6393 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-06-17 05:00:20 +00:00
Bart Van Assche
40a90a705d isert-scst: Add address length check in isert_listen_ioctl()
Detected by Coverity.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6365 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-06-17 00:19:27 +00:00
Bart Van Assche
26cda0eb38 iscsi-scst: Annotate fall-through cases for Coverity
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6364 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-06-17 00:18:23 +00:00
Bart Van Assche
63cb4a9d40 iscsi-scst: Fix indentation
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6363 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-06-17 00:09:23 +00:00
Bart Van Assche
612fac9874 isert: Declare a local function static
Detected by checkpatch.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6354 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-06-16 23:55:52 +00:00
Bart Van Assche
eb10fe3f7d iscsi-scst: Surround complex values with parentheses
Detected by checkpatch.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6353 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-06-16 23:55:22 +00:00
Bart Van Assche
f272064c12 iscsi-scst: Suppress put_page_callback patch warnings
The put_page_callback patch only improves performance on single
socket systems but not on systems with multiple CPU sockets.
Since this message is confusing to SCST users, do not print a
warning if the put_page_callback patch has not been applied.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6340 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-06-16 23:10:28 +00:00
Bart Van Assche
6b3f45696a RHEL 7.1: Add put_page_callback patch
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6336 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-06-16 20:17:52 +00:00
Bart Van Assche
807c4eacf0 isert: Use break in default case
Detected by checkpatch.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6328 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-06-16 18:51:47 +00:00