Commit Graph

6988 Commits

Author SHA1 Message Date
Bart Van Assche
a673470ce3 scst, iscsi-scst: Use struct kvec instead of struct iovec for kernel data
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
2020-11-27 03:45:16 +00:00
Bart Van Assche
02f350c8a7 scst_vdisk: Rename vdisk_alloc_iv() into vdisk_alloc_sync_kvec()
This patch does not change any functionality.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9196 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-11-27 03:26:50 +00:00
Bart Van Assche
e3e4c954b2 scst_vdisk: Rename vdisk_alloc_kvec() into vdisk_alloc_async_kvec()
This patch does not change any functionality.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9195 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-11-27 03:24:50 +00:00
Bart Van Assche
f3fc455a04 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9194 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-11-25 03:43:37 +00:00
Bart Van Assche
54545b43e5 scst: Rename the old version of scst_vfs_unlink_and_put()
See also commit c5e725f33b73 ("Move struct path into its own header"; v2.6.25).


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9193 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-11-23 16:08:41 +00:00
Bart Van Assche
e9299277fd scst: Use kern_path() from kernel version v2.6.28 on
See also commit d181146572c4 ("[PATCH] new helper - kern_path()"; v2.6.28).


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9192 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-11-23 16:07:50 +00:00
Bart Van Assche
a7214ad3d1 scst: Port scst_readv() and scst_writev() to Linux kernel v5.10
Additionally, prevent that these functions trigger memory allocation if
vlen > 8.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9191 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-11-23 16:07:09 +00:00
Bart Van Assche
e93e3cd2fb scst/include/backport.h: Port READ_REF_COUNT() to Linux kernel v5.10
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9190 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-11-23 15:59:23 +00:00
Bart Van Assche
fd5b318880 iscsi-scst: Port to Linux kernel v5.10
mm_segment_t, get_fs() and set_fs() have been removed from Linux kernel
v5.10. Instead of adding more #ifdef / #endif directives, provide backports
for this typedef and these functions in iscsi_scst.h.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9189 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-11-23 15:58:00 +00:00
Bart Van Assche
9ac77f979d scst: Simplify the kernel_write() backport
Instead of duplicating some of the scst_writev() implementation, always call
scst_writev().


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9188 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-11-23 15:56:18 +00:00
Bart Van Assche
2f58d0e48d scst: Remove superfluous get_fs() and set_fs() calls
Calling set_fs(KERNEL_DS) before calling path_lookup() or kern_path() is
not necessary since the arguments of these functions point at kernel data.
Hence remove the get_fs() / set_fs() calls from around these function calls.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9187 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-11-23 15:54:35 +00:00
Bart Van Assche
efca492e93 fcst: Revert r9181
This change is necessary for kernel v5.11 instead of v5.10 so revert it
for now.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9186 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-11-22 03:08:08 +00:00
Bart Van Assche
39b6e87935 scst: Unbreak the build for kernel 4.1.12-124.45.2.el7uek.x86_64
Apparently this kernel has kvmalloc_node(), kvmalloc() and kvzalloc()
backports but no kvmalloc_array() backport.

See also the following commits:
* c027b9de7e ("scst: Port to UEK 4")
* 23a2753a9c ("scst/include/backport.h: Add backports for additional kernel functions, constants and data structures")

Reported-by: Gilbert Standen <gilstanden@hotmail.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9185 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-11-21 03:04:57 +00:00
Bart Van Assche
a952a3584b scst: Unbreak the build for kernel versions 3.0..4.16
Reported-by: Gilbert Standen <gilstanden@hotmail.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9184 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-11-19 03:47:09 +00:00
Bart Van Assche
af0b6a2895 scripts/specialize-patch: Handle _COMPAT_LINUX_MM_H correctly
Fixes: 5930b4db71 ("scst: Fix the MOFED build")


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9183 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-11-19 03:46:04 +00:00
Bart Van Assche
ca9d681fd0 scst: Fix the kobj_ns_grab_current() and kobj_ns_drop() backports
Reported-by: Gilbert Standen <gilstanden@hotmail.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9182 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-11-18 01:30:33 +00:00
Bart Van Assche
1686029f60 fcst: Port to Linux kernel v5.10
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9181 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-11-16 04:34:24 +00:00
Bart Van Assche
ac6485df69 ib_srpt: Port to Linux kernel v5.10
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9180 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-11-16 03:54:37 +00:00
Bart Van Assche
aaf96673e6 scst: Unbreak the UEK 4 build
UEK 4 RPMs like kernel-uek-4.14.35-2025.402.2.1.el7uek.x86_64 include a
backport of cpu_to_be32_array() and kvcalloc(). Hence disable the SCST
backports for these functions when building against UEK 4.

Reported-by: Gilbert Standen <gilstanden@hotmail.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9179 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-11-14 17:20:30 +00:00
Bart Van Assche
143e9c9684 ib_srpt: Use a workqueue for processing RDMA completions
Use a workqueue for processing RDMA completions instead of creating one
kernel thread per RDMA channel. This change improves performance if the
number of RDMA channels is large by reducing the number of context
switches between kernel threads while processing RDMA completions. An
additional change is that srpt_set_ch_state() no longer wakes up the
RDMA completion context but that srpt_cm_rtu_recv() wakes up the RDMA
completion context instead.
    
See also https://github.com/bvanassche/scst/issues/33 .


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9178 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-11-03 04:56:01 +00:00
Bart Van Assche
0ab62f9527 Fix more issues detected by checkpatch
Leave a blank line between declarations and definitions. Remove duplicate
words from comments.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9177 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-11-02 02:07:17 +00:00
Bart Van Assche
98285d10fd Various fixes for issues detected by checkpatch
- Return EOPNOTSUPP instead of ENOTSUPP to user space.
- Do not terminate macro definitions with a trailing semicolon.
- Do not initialize static variables to zero.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9176 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-11-02 02:06:04 +00:00
Bart Van Assche
ed163b4241 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9175 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-11-01 22:54:47 +00:00
Bart Van Assche
20e0fe94f5 scst: Fix allocation of memory for latency statistics for the GFP_ATOMIC case
See also https://sourceforge.net/p/scst/tickets/43/.

Reported-by: Steven Siwinski <steve-atto@users.sourceforge.net>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9174 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-10-29 03:23:04 +00:00
Bart Van Assche
70fd08dde6 scst: Also install the build_mode.h header file
Reported-by: Steven Siwinski <steve-atto@users.sourceforge.net>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9173 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-10-21 03:37:50 +00:00
Bart Van Assche
2fb10fb2ff scstadmin: Restore support for replacing LUNs that are inside a group
Fixes: a3266ca8f2 ("scstadmin: Remove support for the "new" sysfs interface")
Reported-by: Pavel Klevtsov


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9172 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-10-14 03:31:59 +00:00
Bart Van Assche
a4ea5c02e1 iscsi-scst: Fix SHA-1 algorithm number
According to
https://www.iana.org/assignments/ppp-numbers/ppp-numbers.xml#ppp-numbers-9
the value of the SHA-1 algorithm is 6 and not 7, as it is now in
iscsi-scst/usr/chap.c. If on a client side node.session.auth.chap_algs is
SHA1, login fails.

Signed-off-by: Lev Vainblat <lev@zadarastorage.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9171 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-10-14 02:15:33 +00:00
Bart Van Assche
1b2bdd56b5 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9170 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-10-02 02:35:39 +00:00
Vladislav Bolkhovitin
de7a490d4a Minor web fix
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9169 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-09-23 19:38:11 +00:00
Bart Van Assche
59f38038ab iscsi-scst: Remove an obsolete comment
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9168 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-09-19 17:01:31 +00:00
Bart Van Assche
741d1d38dc scst: Partially revert r9166
Apparently the RHEL 8.2 gcc compiler reports an error if
__attribute__((fallthrough)) is used outside a switch statement. Hence this
patch that converts some of these annotations back into comments.

Reported-by: Rob Turk <robtu@rtist.nl>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9167 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-09-19 00:28:44 +00:00
Bart Van Assche
186798cec4 Use the fallthrough macro instead of a comment
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9166 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-09-16 14:28:36 +00:00
Bart Van Assche
570a36ffd2 scripts/checkpatch: Only analyze kernel source code
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9165 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-09-16 14:27:44 +00:00
Bart Van Assche
5969e85967 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9164 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-09-16 03:02:36 +00:00
Bart Van Assche
4933f27d8d scst: Make scst/include/backport.h again compatible with MOFED
Fix the following build failure on RHEL 7 + MOFED 5.0:

In file included from <command-line>:0:0:
/usr/src/ofa_kernel/default/include/linux/compat-2.6.h:40:29: warning: "__GCC4_has_attribute___fallthrough__" is not defined [-Wundef]
 # define __has_attribute(x) __GCC4_has_attribute_##x
                             ^
/usr/src/packages/BUILD/scst-3.5.0.7946/iscsi-scst/kernel/isert-scst/../../../scst/include/backport.h:250:5: note: in expansion of macro '__has_attribute'
 #if __has_attribute(__fallthrough__)

Reported-by: Chesnokov Gleb <Chesnokov.G@raidix.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9163 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-09-16 02:59:28 +00:00
Bart Van Assche
443c7ec5d9 scstadmin: Make argument checking more systematic
Additionally, suppress warning messages about 'length(undefined)' on RHEL 6.x.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9162 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-09-15 03:47:40 +00:00
Bart Van Assche
9d9ae0f153 scst: Restore compatibility with gcc 4.x (RHEL 7.x)
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9161 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-09-15 03:44:03 +00:00
Bart Van Assche
85fed6fa4a scst: Restore compatibility with RHEL 6.x
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9160 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-09-15 03:43:05 +00:00
Bart Van Assche
4023bdadbd scstadmin: Fix a Perl warning
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9159 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-09-14 18:00:55 +00:00
Bart Van Assche
6d60231631 scstadmin: Support passing an empty string to set*Attribute()
Validate the $value argument of set functions with defined() instead of
length(). Append a newline to the end of $value before writing it into
a sysfs attribute to make sure something gets written if $value eq "".


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9158 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-09-14 01:56:26 +00:00
Bart Van Assche
7e3fe7a80e scstadmin: Fix the readOnly() subroutine
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9157 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-09-14 01:54:26 +00:00
Bart Van Assche
c121a6ded8 scstadmin: Adjust source code formatting
Remove a single space that follows a unary negation operator.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9156 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-09-14 01:53:27 +00:00
Bart Van Assche
7e012f4a80 scstadmin: Improve error reporting
Report "Failed to set a SCST attribute" instead of "SCST attribute specified
is static" if modifying of an attribute fails.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9155 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-09-13 23:29:44 +00:00
Bart Van Assche
3825bf2093 scstadmin Makefile: Show diff if a regression test fails
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9154 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-09-13 22:42:19 +00:00
Bart Van Assche
95993cd9fd scstadmin/scstadmin.sysfs/scst-1.0.0/t/07-scstadmin-args.t: Filter out ib_srpt
The scstadmin output for the ib_srpt driver depends on whether or not an
RDMA HCA is present and also on the port GUIDs. Hence filter out the
ib_srpt data.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9153 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-09-13 22:16:05 +00:00
Bart Van Assche
8d3c1cf3a2 scstadmin: Use length($var) to test whether an argument has been specified
This patch fixes a bug by making it again possible to use "0" as e.g. the
name of an SCST device group. See also commit 858f50e4d3 ("scstadmin:
Improve robustness").

Reported-by: Pavel Klevtsov


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9152 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-09-13 03:20:47 +00:00
Bart Van Assche
a3266ca8f2 scstadmin: Remove support for the "new" sysfs interface
Around 2011 a sysfs-tree-changes branch was created in the SourceForge
repository because Greg KH asked to rework the SCST sysfs interface. That
interface is called the "new" sysfs interface. The current and only used
API is called the "old" sysfs interface. Since the "new" sysfs interface
never had any users other than myself, remove support for that interface.

See also commit a66cbc4115 ("scstadmin: Add support for the sysfs
interface provided by the code on the sysfs-tree-changes branch").


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9151 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-09-13 03:12:26 +00:00
Bart Van Assche
ad546b1e68 scst: Add support for wildcard matching to the copy manager
Reported-by: L <514005989@qq.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9150 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-09-05 04:21:56 +00:00
Bart Van Assche
bd3aa5d4a5 iscsi-scst: Port to Linux kernel v5.9
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
2020-08-29 21:16:47 +00:00
Bart Van Assche
10ede52dd9 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9148 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-08-29 16:11:39 +00:00