Commit Graph

6554 Commits

Author SHA1 Message Date
Bart Van Assche
9fcbfdec97 Merge branch 'svn-trunk' 2019-03-09 17:31:56 -08:00
Bart Van Assche
759bdca73a scst: Use a per-cpu counter to track the number of commands per device
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8027 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-10 01:24:43 +00:00
Bart Van Assche
53fdc293e2 scst: Use a per-cpu counter for sessions
Make scst_alloc_session() initialize sess->refcnt to 1 instead of 0.
Compensate this by removing an scst_get() call from __scst_register_session().



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8026 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-10 01:18:17 +00:00
Bart Van Assche
26d7fd0e3a scst: Do not suspend SCSI command processing when adding a device
Since the only global data structure that is modified by the code that adds
a device (scst_dev_list) is consistently protected by scst_mutex, suspending
command processing when adding a device is not necessary.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8025 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-10 01:10:11 +00:00
Bart Van Assche
46698cc77d scstadmin: Enable Perl warnings
Make the Perl interpreter complain about dubious Perl constructs.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8024 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-10 01:01:59 +00:00
Bart Van Assche
3c86e2773f Merge branch 'svn-trunk' 2019-03-09 15:15:07 -08:00
Bart Van Assche
398af246b5 scst: Remove an empty directory
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8023 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-09 23:12:50 +00:00
Bart Van Assche
78d6da4517 scst: Remove obsolete exec_req_fifo kernel patches
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8022 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-09 23:11:47 +00:00
Bart Van Assche
24a5d97db9 scst: Remove old kernel readahead patches
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8021 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-09 23:09:58 +00:00
Bart Van Assche
1b23ac9120 scripts/specialize-patch: Support specializing a patch for RHEL 6.x/7.x
This patch is based on a patch from <orlov@soligran.ru>.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8020 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-09 23:08:47 +00:00
Bart Van Assche
cbca6ada82 fcst: Add an rcu_barrier() call
fcst uses call_rcu() hence rcu_barrier() must be called before module
unloading finishes.

Fixes: 6023f1ad34 ("This patch adds a new target module for SCST and libfc that accepts FCP requests from libfc HBAs running Fibre Channel over Ethernet (FCoE) and passes them to SCST.") # v3.0.0 (r1514).



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8019 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-09 23:05:17 +00:00
Bart Van Assche
e57e339397 Merge branch 'svn-trunk' 2019-03-08 18:16:07 -08:00
Bart Van Assche
18cd60d67e scst: Port to Oracle Linux 7 UEKR5
See also https://yum.oracle.com/oracle-linux-7.html.

Reported-by: Jose Martins <jose.martins2307@gmail.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8018 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-08 17:48:14 +00:00
Bart Van Assche
167a7291f0 Merge branch 'svn-trunk' 2019-03-07 19:06:56 -08:00
Bart Van Assche
230f594cc6 scst: Introduce two local variables
This patch does not change any functionality.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8017 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-08 03:06:36 +00:00
Bart Van Assche
411652a9dd Merge branch 'svn-trunk' 2019-03-07 19:02:51 -08:00
Bart Van Assche
ed0ed73f08 scst: Remove scst_mgmt_cmd.scst_get_called
This patch does not change any functionality.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8016 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-08 03:01:27 +00:00
Bart Van Assche
1698ec7944 scripts/kernel-functions: Backport the -fno-PIE patch to the 2.6 kernel series
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8015 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-08 02:19:44 +00:00
Bart Van Assche
93038095e5 Merge branch 'svn-trunk' 2019-03-07 18:16:27 -08:00
Bart Van Assche
450ee268cb nightly build: Restore a recently removed double quote
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8014 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-07 18:11:45 +00:00
Bart Van Assche
0351c0ec09 fcst: Remove ft_cmd_flag()
This function is no longer used. r8010 removed the last user of this function.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8013 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-07 17:59:10 +00:00
Bart Van Assche
17ef76b3d1 Change (int)ARRAY_SIZE(...) back into ARRAY_SIZE(...)
This patch does not change any functionality.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8012 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-07 17:54:26 +00:00
Bart Van Assche
e167e2ebb7 nightly build: Remove kernel version 2.6.30 and older
Or in other words, focus on RHEL 6 (kernel 2.6.32) and later.




git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8011 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-07 17:20:01 +00:00
Bart Van Assche
771a5c193f Merge branch 'svn-trunk' 2019-03-06 20:09:02 -08:00
Bart Van Assche
e680de4602 fcst: Remove ft_cmd_dump() and ft_cmd_tm_dump()
Functions that dump the state of SCSI commands and task management functions
should occur in the SCST core instead of in target drivers. If anyone needs
this functionality it should be moved into the SCST core.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8010 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-07 04:08:41 +00:00
Bart Van Assche
cfa36bbbb3 Merge branch 'svn-trunk' 2019-03-06 19:46:45 -08:00
Bart Van Assche
d56aea893b nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8008 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-07 03:33:42 +00:00
Bart Van Assche
7d771b59ad Merge branch 'svn-trunk' 2019-03-06 17:36:46 -08:00
Bart Van Assche
3e0790141a scripts/kernel-functions: Fix -fno-PIE backport
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8007 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-07 01:36:31 +00:00
Bart Van Assche
e87970d094 scripts/specialize-patch: Remove a duplicate test
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8003 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-05 02:25:33 +00:00
Bart Van Assche
c56606c0df Update Subversion ignore lists
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8002 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-02 21:36:48 +00:00
Bart Van Assche
59392b278a Merge branch 'svn-trunk' 2019-03-02 12:08:02 -08:00
Bart Van Assche
7cb8e9bdb6 scst/src/scst_proc.c: Remove this file
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8001 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-02 20:07:49 +00:00
Bart Van Assche
1389825f5d Merge branch 'svn-trunk' 2019-03-02 12:06:36 -08:00
Bart Van Assche
87d82bfa8f Remove documentation references to procfs
Now that procfs has been removed, remove the references to procfs from
the documentation.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8000 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-02 20:06:25 +00:00
Bart Van Assche
08e532715d Remove procfs support
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
2019-03-02 20:04:25 +00:00
Bart Van Assche
061206de53 Merge branch 'svn-trunk' 2019-02-28 20:20:05 -08:00
Bart Van Assche
81c9a1f49d make uninstall: Do not remove /usr/local/sbin
Reported-by: Heiner Lesaar <heiner.lesaar@googlemail.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7998 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-01 04:15:01 +00:00
Bart Van Assche
c52b6e08da Merge branch 'svn-trunk' 2019-02-28 19:51:34 -08:00
Bart Van Assche
d4a52e777e scst: Fix the get_user_pages() backport for kernel versions >= v4.4.168
The get_user_pages() calling convention has been changed in kernel v4.4.168.
Make sure that SCST passes the correct arguments.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7997 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-02-28 22:03:44 +00:00
Bart Van Assche
de656af3f0 scripts/kernel-functions: Avoid that compilation fails with "error: code model kernel does not support PIC mode"
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7996 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-02-28 22:01:28 +00:00
Bart Van Assche
19e2746095 Merge branch 'svn-trunk' 2019-02-27 21:23:08 -08:00
Bart Van Assche
b4d66ec4bc nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7995 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-02-27 14:44:48 +00:00
Bart Van Assche
cc10c081ad Merge branch 'svn-trunk' 2019-02-24 21:57:39 -08:00
Bart Van Assche
5b22c26d42 scst_vdisk: Fix a use-after-free
This patch fixes Coverity ID 333128.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7993 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-02-25 05:48:05 +00:00
Bart Van Assche
bd3233d5ca Merge branch 'svn-trunk' 2019-02-24 12:44:45 -08:00
Bart Van Assche
8cf079dbed scst: Avoid that excessive data lengths cause COMPARE AND WRITE to crash
Avoid that running the libiscsi conformance tests triggers the following crash:

==================================================================
BUG: KASAN: wild-memory-access in sg_cmp_elem+0x1b6/0x490 [scst]
Read of size 8 at addr 0002000100000000 by task disk021_5/1231
CPU: 0 PID: 1231 Comm: disk021_5 Tainted: G           O      5.0.0-rc6-dbg+ #2
Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
Call Trace:
 dump_stack+0x86/0xca
 kasan_report.cold.3+0x5/0x3b
 __asan_load8+0x54/0x90
 sg_cmp_elem+0x1b6/0x490 [scst]
 sg_cmp.constprop.41+0x185/0x380 [scst]
 scst_cwr_read_cmd_finished+0x214/0x6d0 [scst]
 scst_finish_internal_cmd+0x109/0x1d0 [scst]
 scst_process_active_cmd+0x193/0x570 [scst]
 scst_process_redirect_cmd+0x214/0x300 [scst]
 scst_cmd_done_local+0xec/0x1f0 [scst]
 fileio_async_complete+0x98/0x1b0 [scst_vdisk]
 fileio_exec_async+0x3ac/0x430 [scst_vdisk]
 fileio_exec_read+0x34f/0x560 [scst_vdisk]
 vdev_do_job+0xf5/0x260 [scst_vdisk]
 fileio_exec+0x66/0x70 [scst_vdisk]
 scst_do_real_exec+0x11f/0x540 [scst]
 scst_exec_check_blocking+0x14c/0x270 [scst]
 scst_exec_check_sn+0x2ef/0x650 [scst]
 scst_process_active_cmd+0x2d2/0x570 [scst]
 scst_cmd_thread+0x1e3/0x6b0 [scst]
 kthread+0x1d2/0x1f0
 ret_from_fork+0x3a/0x50
==================================================================


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7992 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-02-24 17:53:27 +00:00
Bart Van Assche
65ad03ffd0 vdisk_fileio, async mode: Make a check more strict
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7991 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-02-24 17:50:55 +00:00
Bart Van Assche
6076eeaecb vdisk_fileio, async mode: Switch back from bvec to kvec
The latter mode can handle SCST's multi-page sgv's fine while kernels before
v5.1 do not support multi-page bvecs.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7990 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-02-24 17:50:19 +00:00
Bart Van Assche
fa1336c452 scripts/run-regression-tests: Disable SELinux
The regression tests fail with an error message that is not related to SCST
if SELinux is enabled. Hence disable SELinux for the regression tests.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7989 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-02-24 16:54:04 +00:00