Bart Van Assche
7d510ddc82
Merge branch 'svn-trunk'
2019-02-11 19:16:26 -08:00
Bart Van Assche
34f9b158e2
scst: Only switch to thread context if no Data-Out buffer and no failure
...
This patch avoids that the following is reported:
[0]: scst_pre_parse:949:Failed CDB:
(h)___0__1__2__3__4__5__6__7__8__9__A__B__C__D__E__F
0: 8b 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 ................
[0]: dev_vdisk: vdisk_parse_offset:2999:Unknown opcode 0x8b
[0]: scst_parse_cmd:1333:Atomic context and non-WRITE data direction, rescheduling (cmd 00000000cd981f2b)
[0]: scst: scst_process_active_cmd:5571:***CRITICAL ERROR***: cmd 00000000cd981f2b is in invalid state 10)
BUG at /home/bart/software/scst.git/scst/src/scst_targ.c:5572
------------[ cut here ]------------
DEBUG_LOCKS_WARN_ON(val > preempt_count())
WARNING: CPU: 1 PID: 0 at kernel/sched/core.c:3230 preempt_count_sub+0x7f/0xd0
Modules linked in: qla2x00tgt(O) scst_vdisk(O) isert_scst(O) iscsi_scst(O) scst(O) sd_mod sg brd dlm af_packet crct10dif_pclmul hid_generic aesni_intel aes_x86_64 crypto_simd cryptd usbhid glue_helper hid qla2xxx_scst(O) virtio_balloon l
CPU: 1 PID: 0 Comm: swapper/1 Tainted: G W O 5.0.0-rc6-dbg+ #2
Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
Call Trace:
<IRQ>
__local_bh_enable_ip+0x7e/0x140
local_bh_enable+0x15/0x20 [scst]
scst_process_active_cmd+0x555/0x570 [scst]
scst_do_job_active.constprop.23+0x57/0xe0 [scst]
scst_cmd_tasklet+0x42/0x70 [scst]
tasklet_action_common.isra.14+0xc3/0x280
tasklet_action+0x3d/0x50
__do_softirq+0x12d/0x5b7
irq_exit+0xdd/0x100
do_IRQ+0xc3/0x160
common_interrupt+0xf/0xf
</IRQ>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7922 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-02-12 03:16:12 +00:00
Bart Van Assche
aa6c9558e8
scst: Introduce enum scst_exec_res
...
This patch does not change any functionality.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7921 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-02-12 03:10:12 +00:00
Bart Van Assche
6dc08eb5b6
scst_vdisk: Avoid that fileio_alloc_and_parse() locks up in tasklet context if low on memory
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7920 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-02-12 03:08:39 +00:00
Bart Van Assche
70150cb912
scst: Remove the exec_sync flag
...
Since all device handlers have at least one asynchronous mode, remove
the exec_sync flag.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7919 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-02-12 03:07:54 +00:00
Bart Van Assche
c63c44e4f0
vdisk_fileio: Add additioinal consistency check for asynchronous I/O
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7918 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-02-12 03:07:02 +00:00
Bart Van Assche
4af1b6fad5
Merge branch 'svn-trunk'
2019-02-10 16:11:15 -08:00
Bart Van Assche
1f2e6e0113
qla2x00t: Fix an out of bounds access
...
Avoid that KASAN reports the following:
BUG: KASAN: stack-out-of-bounds in q2t_async_event+0x27c/0x3a0 [qla2x00tgt]
Read of size 2 at addr ffff8880db407db0 by task swapper/0/0
CPU: 0 PID: 0 Comm: swapper/0 Tainted: G O 4.19.19-dbg+ #1
Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
Call Trace:
<IRQ>
dump_stack+0xa4/0xfa
print_address_description+0x71/0x239
kasan_report.cold.6+0x242/0x301
__asan_load2+0x51/0x80
q2t_async_event+0x27c/0x3a0 [qla2x00tgt]
qla2x00_async_event+0x34f/0x2390 [qla2xxx_scst]
qla24xx_msix_default+0x2b8/0x300 [qla2xxx_scst]
__handle_irq_event_percpu+0x77/0x3c0
handle_irq_event_percpu+0x68/0xe0
handle_irq_event+0x5a/0x8b
handle_edge_irq+0x114/0x2f0
handle_irq+0x18d/0x205
do_IRQ+0x73/0x150
common_interrupt+0xf/0xf
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7917 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-02-11 00:11:01 +00:00
Bart Van Assche
42e88fc0ba
scst: Use sg_virt() where appropriate
...
This patch does not change any functionality.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7916 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-02-11 00:10:12 +00:00
Bart Van Assche
77d9c561d5
scst_pres: Avoid reading past the end of a buffer
...
Detected by smatch.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7915 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-02-11 00:09:33 +00:00
Bart Van Assche
e730c8cd58
scst_user: Introduce a helper function
...
This patch does not change any functionality.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7914 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-02-11 00:08:28 +00:00
Bart Van Assche
3eb582b50e
scst_sysfs: Fix a smatch warning
...
Avoid that smatch complains about using a variable before a NULL test.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7913 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-02-11 00:07:10 +00:00
Bart Van Assche
1ba9b34529
scst_vdisk: Add a consistency check
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7912 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-02-11 00:05:44 +00:00
Bart Van Assche
fd05cde068
Merge branch 'svn-trunk'
2019-02-10 09:55:16 -08:00
Bart Van Assche
4d84d93d82
nightly build: Update kernel versions
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7911 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-02-09 15:42:19 +00:00
Bart Van Assche
b89e198c30
Merge branch 'svn-trunk'
2019-02-08 20:07:16 -08:00
Bart Van Assche
9df67df132
iscsi-scst: Fix 32-bit compiler warnings
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7910 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-02-08 03:43:35 +00:00
Bart Van Assche
685c3dfee3
scst: Avoid using 64-bit divisions on 32-bit systems
...
See also https://sourceforge.net/p/scst/tickets/17/ .
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7909 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-02-08 03:42:15 +00:00
Bart Van Assche
2d1a46182c
scst: Fix the TRACE_EXIT_HRES() macro
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7908 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-02-08 03:40:56 +00:00
Bart Van Assche
2d5d0e978c
scst_sysfs: Unbreak the 32-bit build
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7907 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-02-07 16:26:26 +00:00
Bart Van Assche
cb392c1ed4
Merge branch 'svn-trunk'
2019-02-06 20:01:42 -08:00
Bart Van Assche
769599bda8
README: Add more detailed information about latency measurements
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7906 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-02-07 04:01:29 +00:00
Bart Van Assche
25a6519792
Merge branch 'svn-trunk'
2019-02-06 19:28:48 -08:00
Bart Van Assche
814aed2eef
README: Make instructions to retrieve latency information more generic
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7905 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-02-07 01:43:16 +00:00
Bart Van Assche
65cf98f90a
scst_sysfs: Increase latency measurement suspend timeout from 1/HZ to 10 s
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7904 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-02-07 01:13:54 +00:00
Bart Van Assche
f1aa0ed5f0
Merge branch 'svn-trunk'
2019-02-04 20:13:37 -08:00
Bart Van Assche
5981007af0
README: Document the latency measurement infrastructure
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7903 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-02-05 03:59:18 +00:00
Bart Van Assche
dc03caa9cb
Merge branch 'svn-trunk'
2019-02-03 16:02:11 -08:00
Bart Van Assche
aebee8cb77
vdisk_blockio: Implement WRITE AND VERIFY
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7902 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-02-04 00:00:46 +00:00
Bart Van Assche
44505adfb2
scst_vdisk: Introduce vdev_verify()
...
This patch does not change any functionality.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7901 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-02-03 23:57:46 +00:00
Bart Van Assche
2c905c8f01
scst_vdisk: Simplify blockio_check_finish()
...
This patch does not change any functionality.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7900 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-02-03 23:56:52 +00:00
Bart Van Assche
cb93e37399
Merge branch 'svn-trunk'
2019-01-13 13:41:53 -08:00
Bart Van Assche
b7fc7a25c6
scst_lib: Also check 'fs' for older kernel versions
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7892 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-01-13 21:38:51 +00:00
Bart Van Assche
b588f90ccb
scst: Disable the kernel_write() backport for RHEL 7
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7891 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-01-13 21:37:40 +00:00
Bart Van Assche
406e70a0d4
Merge branch 'svn-trunk'
2019-01-13 13:14:40 -08:00
Bart Van Assche
ae0037f88c
ib_srpt: Fix the build against kernel version v2.6.30
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7882 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-01-13 21:14:12 +00:00
Bart Van Assche
9a36a84c0e
scst/include/backport.h: Suppress a compiler warning
...
Avoid that building SCST with gcc version 8 or later againstkernel v4.14 or
before triggers a compiler warning about casting a function pointer to an
incompatible type.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7881 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-01-13 21:13:28 +00:00
Bart Van Assche
497fb8b9f2
scst: Backport kernel_read() to kernel versions before v4.14
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7880 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-01-13 21:11:54 +00:00
Bart Van Assche
1497af694b
scst_vdisk: Fix the build for old kernel versions (v2.6.x)
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7879 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-01-13 21:11:22 +00:00
Bart Van Assche
26c47ffc4e
scst: Provide a definition for bdev_io_opt() for kernel versions < v2.6.32
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7878 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-01-13 21:10:46 +00:00
Bart Van Assche
0f0131a73d
scst: Backport scst_blk_rq_cpu() to kernel versions before v2.6.28
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7877 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-01-13 21:10:13 +00:00
Bart Van Assche
c3ed16a8ef
scripts/run-regression-tests: Print an error message if downloading a kernel tar ball failed
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7876 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-01-13 21:09:32 +00:00
Bart Van Assche
f86eb16a75
nightly build: Update kernel versions
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7875 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-01-13 20:10:47 +00:00
Bart Van Assche
0f40b6fb0f
nightly build: Update kernel versions
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7874 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-01-13 20:06:31 +00:00
Bart Van Assche
6065c28d8f
Merge branch 'svn-trunk'
2019-01-13 11:43:53 -08:00
Bart Van Assche
b6d08e5807
scst: Complain loudly if 'fs' is incorrect
...
Since not setting the fs register correctly leads to silent data
corruption, if scst_read(), scst_write(), scst_readv() or scst_writev()
is called, complain loudly if 'fs' has not been set correctly.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7873 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-01-13 19:43:31 +00:00
Bart Van Assche
4515746ea2
scst_dlm: Fix scst_read_file()
...
The 'fs' register must be set before vfs_read() is called. kernel_read()
does this but scst_read() not. Hence change the scst_read() call in the
dlm code into a kernel_read() call.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7872 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-01-13 19:41:42 +00:00
Bart Van Assche
6b81f592fa
Merge branch 'svn-trunk'
2019-01-11 21:01:24 -08:00
Bart Van Assche
cc9872d553
scst_dlm: Refuse to proceed if parsing the DLM node IDs failed
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7869 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-01-12 05:01:03 +00:00
Bart Van Assche
b06a9b8247
Merge branch 'svn-trunk'
2019-01-09 20:06:21 -08:00