This patch does not change any functionality but removes multiple __force
__user casts.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9197 d57e44dd-8a1f-0410-8b47-8ef2f437770f
In Linux kernel v5.9 use of the KERNEL_SOCKPTR() function is mandatory
when calling setsockopt(). Implement that function for kernels before v5.9.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9149 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Apparently the Linux kernel v4.20 iov_iter_kvec() function has been
backported to RHEL / CentOS 8.2. This patch fixes the following kernel
warning:
WARNING: CPU: 26 PID: 21141 at lib/iov_iter.c:1083 iov_iter_kvec+0x25/0x30
Call Trace:
fileio_exec_async+0x216/0x3a0 [scst_vdisk]
fileio_exec_write+0x3b9/0x450 [scst_vdisk]
vdev_do_job+0x34/0xc0 [scst_vdisk]
scst_do_real_exec+0x54/0x100 [scst]
scst_exec_check_blocking+0xbb/0x210 [scst]
scst_process_active_cmd+0x64d/0x1550 [scst]
scst_cmd_thread+0x170/0x5a0 [scst]
kthread+0x112/0x130
ret_from_fork+0x35/0x40
See also https://github.com/bvanassche/scst/issues/26.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9026 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Suppress several Coverity "tainted scalar" complaints and also two other
false positive Coverity complaints.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8761 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This patch adds support for kernel module namespaces. This patch is essential
when using SCST in combination with kernel version v5.4 or later.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8673 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Remove this debug assert because it a write residual can happen, e.g. if the
expected transfer length exceeds the Data Out buffer length. This statement
was hit by the following CDB, submitted by the libiscsi regression tests:
[14896]: scst: scst_parse_cmd:1235:Warning: expected transfer length 0 (DIF 0) for opcode WRITE(10) (handler vdisk_fileio, target iscsi) doesn't match decoded value 512
[14896]: scst_parse_cmd:1243:Suspicious CDB:
(h)___0__1__2__3__4__5__6__7__8__9__A__B__C__D__E__F
0: 2a 00 00 00 00 00 00 00 01 00 *.........
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8659 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This patch is necessary to make SCST work with Linux kernel v5.1 and
does not change any functionality. See also upstream commit 736706bee329
("get rid of legacy 'get_ds()' function").
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8057 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Since all RHEL/CentOS 5 users have upgraded to a newer version, procfs
support is no longer necessary. Hence remove procfs support. This patch
has been generated as follows:
git grep -lw CONFIG_SCST_PROC iscsi-scst qla2x00t scst scst_local srpt |\
while read f; do
echo ${f}
unifdef -U CONFIG_SCST_PROC ${f} >${f}.out
mv ${f}.out ${f}
done
followed by two small manual edits in scst/include/scst.h and also in
qla2x00t/qla2x00-target/qla2x00t.c.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7999 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Zero-copy TCP/IP support is deprecated since a while and is no longer
supported for recent kernels. Hence remove it and also all references
to zero-copy TCP/IP support.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7809 d57e44dd-8a1f-0410-8b47-8ef2f437770f
From the snprintf() man page:
If n is zero, nothing shall be written and s may be a null pointer.
This patch does not change any functionality.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7435 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Avoid that building SCST with W=1 against kernel v4.15 triggers warnings about
kernel-doc header issues.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7298 d57e44dd-8a1f-0410-8b47-8ef2f437770f
In an error path in iscsi_threads_pool_get(), when a new pool cannot be
allocated, if there is a pool on iscsi_thread_pools_list, it passes that back as
an alternative, so return zero in that case.
Signed-off-by: David Butterfield <dab21774@gmail.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7143 d57e44dd-8a1f-0410-8b47-8ef2f437770f
In scsi_cmnd_start() conn->rx_task is intended to be set only during the
call to _stage1_done, but there was no code to reset it. It doesn't
actually matter in execution, but it was a little confusing to wonder
and try to understand why it wasn't reset.
Signed-off-by: David Butterfield <dab21774@gmail.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7142 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Add "XXX" comments in a few places about potential problems seen in SCST code,
for future investigation and possible repair.
Signed-off-by: David Butterfield <dab21774@gmail.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7123 d57e44dd-8a1f-0410-8b47-8ef2f437770f
If this attrubute is set, each iSCSI session for this initiator has
dedicated, i.e. not shared with other sessions, pool of the iscsi{wr,rd}
kernel threads.
Useful to control per-session CPU affinity to improve performance.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7069 d57e44dd-8a1f-0410-8b47-8ef2f437770f
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/trunk@7009 d57e44dd-8a1f-0410-8b47-8ef2f437770f
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
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
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
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
There is no need for a detect() method - code that is present in such
a method can be moved to module_init(). Hence declare this method
obsolete. Leave the detect pointer member in the target template for
now for out-of-tree SCST drivers.
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
with some improvements
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6113 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Avoid that checkpatch reports the following warning:
WARNING: type 'long long unsigned' should be specified in 'unsigned long long' order.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5885 d57e44dd-8a1f-0410-8b47-8ef2f437770f