Commit Graph

5684 Commits

Author SHA1 Message Date
Bart Van Assche
ad5bfbe4e2 scst: Annotate scst_cmd user space copying correctly
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7790 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-11-04 20:21:42 +00:00
Bart Van Assche
04ad78071b scripts/update-version: Also update usr/include/version.h
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7788 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-11-04 20:08:59 +00:00
Bart Van Assche
13ca37d6a9 scst: Use 'make modules_install' instead of 'install' for installing kernel modules
This patch ensures that the proper SELinux label is applied to all SCST
kernel modules. This was reported by Rob Turk.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7779 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-11-04 17:52:01 +00:00
Bart Van Assche
a009f41028 scstadmin.spec: Add /usr/bin/killall to the requirements list
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7603 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-11-03 23:52:32 +00:00
Bart Van Assche
7e5a0ba300 scst.spec: Avoid that rpm complains about expanding a variable in a comment
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7602 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-11-03 23:50:54 +00:00
Bart Van Assche
4ceb343966 scst, scst_user: Add support for usercopy hardening
Avoid that with CONFIG_HARDENED_USERCOPY enabled warnings appear about
kernel memory exposure attempts when using scst_user.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7601 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-11-03 17:06:01 +00:00
Bart Van Assche
133b012f82 scst: Introduce a backport of kmem_cache_create_usercopy()
This patch does not change any functionality.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7600 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-11-03 17:03:41 +00:00
Bart Van Assche
ca180efeec cst_vdisk: Avoid that vdisk_usn_vpd() can trigger a buffer overflow
Additionally, this patch avoids that the following compiler warning
is reported on Fedora 29:

In function 'strncpy',
    inlined from 'vdisk_usn_vpd.isra.24' at /home/bart/software/scst.git/scst/src/dev_handlers/scst_vdisk.c:3866:3:
./include/linux/string.h:246:9: warning: '__builtin_strncpy' output truncated before terminating nul copying as many bytes from a string as its length [-Wstringop-truncation]
  return __builtin_strncpy(p, q, size);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/bart/software/scst.git/scst/src/dev_handlers/scst_vdisk.c: In function 'vdisk_usn_vpd.isra.24':
./include/linux/string.h:267:10: note: length computed here
   return __builtin_strlen(p);
          ^~~~~~~~~~~~~~~~~~~


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7599 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-11-03 17:02:38 +00:00
Bart Van Assche
63ed4b4f9a ib_srpt: Fix build against MLNX_OFED-4.5
This patch fixes the following error during srpt compilation:
  CC [M]  /.autodirect/mtrswgwork/sergeygo/scst-trunk/srpt/src/ib_srpt.o
In file included from /usr/src/ofa_kernel/default/include/rdma/ib_verbs.h:76:0,
                 from /usr/src/ofa_kernel/default/include/rdma/ib_cache.h:38,
                 from /.autodirect/mtrswgwork/sergeygo/scst-trunk/srpt/src/ib_srpt.c:61:
/usr/src/ofa_kernel/default/include/uapi/rdma/rdma_user_ioctl.h:45:10: fatal error: rdma/rdma_user_ioctl_cmds.h: No such file or directory
 #include <rdma/rdma_user_ioctl_cmds.h>
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The same problem has already been fixed for iscsi in [r7215] "iscsi-scst/Makefile: Add include/uapi directory to the include path".

From: Sergey Gorenko <sergeygo@mellanox.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7597 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-11-01 05:28:18 +00:00
Bart Van Assche
69fde133e9 Revert r7524
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7525 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-31 14:25:52 +00:00
Bart Van Assche
91b99af914 scst, srpt, iscsi-scst, qla2x00t, fcst: Bump version number to 3.4.0
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7524 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-31 14:24:20 +00:00
Bart Van Assche
90e883d76b scripts/update-version: Left-align the *_REV revision numbers in scst_vdisk.c
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7523 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-31 14:23:26 +00:00
Bart Van Assche
78a0407d0e scst, iscsi-scst: Simplify the code that uses kstrto*l()
This patch does not change any functionality.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7522 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-14 22:05:33 +00:00
Bart Van Assche
0f0ab73758 ibmvstgt: Port to Linux kernel v4.18
Untested.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7521 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-14 22:04:12 +00:00
Bart Van Assche
c55eaa7d5e iscsi-scstd: Change the gcc-specific __FUNCTION__ into __func__
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7520 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-14 22:02:24 +00:00
Bart Van Assche
969a36a235 scripts/checkpatch: Suppress more warning categories
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7519 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-14 22:00:46 +00:00
Bart Van Assche
93d7c0da08 Expand Kconfig help texts
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7518 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-14 21:59:08 +00:00
Bart Van Assche
c59b0a2303 iscsi-scst: Insert spaces after comma's where required according to the coding style
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7517 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-14 21:58:38 +00:00
Bart Van Assche
73dca5af22 Remove trailing whitespace from documentation files
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7516 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-14 21:57:13 +00:00
Bart Van Assche
8631584f47 scst_local: Fix a build regression for older kernels in the scsi-mq support code
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7515 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-14 21:53:22 +00:00
Bart Van Assche
d84fc0783d vdisk_fileio: Add support for asynchronous I/O processing
Using asynchronous has the advantage that SCSI commands can be processed
concurrently even if only one SCST command thread has been configured.
Asynchronous direct I/O has the additional advantage that the page cache
is bypassed and hence that the command processing overhead is reduced.

Asynchronous I/O is not used when DIF is enabled because it is
nontrivial to ensure that a DIF read received after a DIF write
returns the data that has just been written.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7514 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-14 04:10:59 +00:00
Bart Van Assche
50e31529c4 scst_vdisk: Introduce a union in struct vdisk_cmd_params
This patch does not change any functionality but makes a later patch
easier to read.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7513 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-14 04:07:53 +00:00
Bart Van Assche
19c9aec2f7 vdisk_fileio: Remove the page cache based zero-copy implementation
A new zero-copy implementation will be added in a later patch.
This patch reverts most of r4213.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7512 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-14 04:07:04 +00:00
Bart Van Assche
9e740aa986 scst_vdisk: Fix spelling in a source code comment
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7511 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-14 04:06:21 +00:00
Bart Van Assche
79aa0e4b31 scst/README_in-tree: Remove this file
Instead of keeping scst/README and scst/README_in-tree in sync, remove
the latter. This file can always be restored if necessary.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7510 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-14 04:04:52 +00:00
Bart Van Assche
ec73c01358 scst_local: Use all CPUs for command processing
This patch modifies scst_local such that on kernel version 3.19 and
later multiple hardware queues are used (scsi-mq). Note: in order
to benefit from concurrent processing, the number of SCST command
threads must be set to a value above one.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7509 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-14 04:03:57 +00:00
Bart Van Assche
2f1cc8382f scst_local: Rename SCpnt into scmd
This patch does not change any functionality but brings the scst_local
source code more in line with recent upstream SCSI LLDs.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7508 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-14 04:02:58 +00:00
Bart Van Assche
11a975ffad scst: Add -Wno-sign-compare for clang
This patch avoids that clang complains about mixed sign comparisons.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7507 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-14 04:01:50 +00:00
Bart Van Assche
8bec8ffea3 scripts/checkpatch: Add a script that analyzes all SCST files with checkpatch
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7506 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-14 03:58:46 +00:00
Bart Van Assche
e2a17c6a24 Change 'long long int' int 'long long'
This patch does not change any functionality.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7505 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-14 03:57:53 +00:00
Bart Van Assche
4cd532a987 Multiple files: Remove trailing whitespace
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7504 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-14 03:55:02 +00:00
Bart Van Assche
5cec097939 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7503 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-13 14:41:59 +00:00
Bart Van Assche
1017c302f2 scst: Revert r7501 because it didn't have the intended effect
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7502 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-08 02:42:21 +00:00
Bart Van Assche
3d1b6c7ef8 scst: Do not complain about mixed signedness comparisons
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7501 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-08 01:41:26 +00:00
Bart Van Assche
10333e8496 scst/include/backport.h: Avoid mixed-signedness comparisons
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7500 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-08 01:37:48 +00:00
Bart Van Assche
3e5796d178 scst: Reformat scst_*_nolockdep() macro definitions
Avoid that the definitions of these macros exceed 80 columns.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7499 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-07 16:21:29 +00:00
Bart Van Assche
fa3a6738ec scst: Remove trailing whitespace from documentation and Makefile
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7498 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-07 16:13:55 +00:00
Bart Van Assche
a1c2a08d95 scst_vdisk: Make the filename modifiable
When VAAI support is not needed can be convenient to use the
vdisk_blockio handler to handle I/O redirection between nodes in a
H.A. setup. Making the filename modifiable allows to keep the LUN
associations of an SCST device that is used for I/O redirection in
such a setup. This is a slightly modified version of a patch
provided by Marc Smith <marc.smith@parodyne.com>.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7497 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-06 21:59:54 +00:00
Bart Van Assche
5b56580253 scst: Introduce __scst_unblock_aborted_cmds()
This patch does not change any functionality but makes it easier for
static analyzers like sparse and smatch to verify locking in
scst_unblock_aborted_cmds().


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7496 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-06 21:57:50 +00:00
Bart Van Assche
090252f695 cst/include/backport.h: Add a printk_once() backport
This patch is only relevant for regression testing SCST against kernel
2.6.29 or older.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7495 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-06 21:42:02 +00:00
Bart Van Assche
c4d0b670e9 scst: Fix spelling of 'delimiter' in source code comments
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7494 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-06 21:41:30 +00:00
Bart Van Assche
915d3b7430 scst/README: Fix spelling
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7493 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-04 03:29:47 +00:00
Bart Van Assche
9c0a2c89a9 scst: Remove references to scripts to rebuild the Linux kernel
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7492 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-03 01:49:06 +00:00
Bart Van Assche
3bc04b2b43 scst, iscsi-scst: Remove instructions to rebuild the Linux kernel
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7491 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-03 01:47:16 +00:00
Bart Van Assche
5470ff4986 scripts/rebuild-rhel-kernel-rpm: Remove this script
Since rebuilding the RHEL kernel is no longer recommended, remove the script
that rebuilds the RHEL kernel RPM.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7490 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-03 01:44:26 +00:00
Bart Van Assche
92acee3c25 scst/include/backport.h: RHEL 7 build fix
Avoid that compilation fails on RHEL 7 due to a duplicate definition of
rdtsc().

Reported-by: Anton Kulshenko <shallriseagain@gmail.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7489 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-02 13:12:33 +00:00
Bart Van Assche
9a8c5d8459 scst/include/backport.h: Restore the proper vzalloc() backport
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7488 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-02 13:03:49 +00:00
Bart Van Assche
9d89cc7148 scst/include/backport.h: Remove the vzalloc() backport
The supported stable kernels before 2.6.37 already include a backported
version of vzalloc().


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7487 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-02 00:41:21 +00:00
Bart Van Assche
fa3c482bb3 scst: Build fix for kernel versions <= v4.8
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7485 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-09-27 13:47:43 +00:00
Bart Van Assche
5f1cf8cf1d scst: Add a new latency measurement infrastructure
An example of the data produced by this infrastructure:

$ echo 1 >/sys/kernel/scst_tgt/measure_latency
$ sleep 10 # Wait until an initiator has submitted multiple I/O requests
$ cat /sys/kernel/scst_tgt/targets/ib_srpt/fe80\:0000\:0000\:0000\:0002\:c903\:00fa\:b7f2/sessions/fe80\:0000\:0000\:0000\:0002\:c903\:00a3\:4272/latency/r512
state count min max avg stddev
PARSE 219 1.3 26.6 2.2 2.5 us
PREPARE_SPACE 219 0.9 10.3 1.1 0.6 us
RDY_TO_XFER 219 0.7 1.7 0.7 0.2 us
TGT_PRE_EXEC 219 0.7 11.0 0.8 0.9 us
EXEC_CHECK_SN 219 0.7 1.7 0.8 0.2 us
PRE_DEV_DONE 219 11.3 3445.7 39.6 276.4 us
DEV_DONE 219 0.7 11.0 0.9 0.7 us
PRE_XMIT_RESP1 219 1.2 58.4 1.6 3.8 us
CSW2 219 0.7 1.6 0.8 0.1 us
PRE_XMIT_RESP2 219 0.7 1.5 0.7 0.1 us
XMIT_RESP 219 0.7 1.5 0.7 0.1 us
INIT_WAIT 219 1.0 57.3 2.1 4.4 us
INIT 219 0.9 27.4 1.6 2.4 us
CSW1 219 15.0 3856.1 74.2 264.8 us
EXEC_CHECK_BLOCKING 219 1.3 10.8 1.7 0.9 us
LOCAL_EXEC 219 0.7 1.8 0.7 0.1 us
REAL_EXEC 219 0.6 1.5 0.7 0.1 us
EXEC_WAIT 219 40.6 1021.7 54.4 68.7 us
XMIT_WAIT 219 6.4 1682.0 50.6 228.1 us
total 219 - - 236.9 2012.1 us


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7484 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-09-27 04:09:27 +00:00