Bart Van Assche
b0e5d9834e
scst: Add an IOCB_DSYNC backport for kernel versions < v4.7
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7798 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-11-06 02:33:16 +00:00
Bart Van Assche
98729e73d0
scst/include/backport.h: Improve the EPOLL* backport
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7792 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-11-04 21:14:20 +00:00
Bart Van Assche
058fba5f2a
scst_user, scst_event: Convert to __poll_t
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7791 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-11-04 20:58:42 +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
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
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
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
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
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
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
Bart Van Assche
eeed9fc41e
scst: Introduce the function scst_set_cmd_state()
...
This patch does not change any functionality.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7482 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-09-27 02:28:16 +00:00
Bart Van Assche
f1357f410e
scst: Remove the existing latency measurement infrastructure
...
Remove the existing latency measurement infrastructure since it will be
replaced by a new and more powerful latency measurement infrastructure.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7481 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-09-27 02:25:43 +00:00
Bart Van Assche
2231b598c6
scst: Make command state numbers consecutive
...
This makes it easier for the compiler to optimize command state
switch statements.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7480 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-09-27 02:24:38 +00:00
Bart Van Assche
51ab2e8ebd
scst: Port to Linux kernel v4.19
...
In Linux kernel v4.19 the function scsi_execute() has been replaced by the
following macro:
/* Make sure any sense buffer is the correct size. */
#define scsi_execute(sdev, cmd, data_direction, buffer, bufflen, sense, \
sshdr, timeout, retries, flags, rq_flags, resid) \
({ \
BUILD_BUG_ON((sense) != NULL && \
sizeof(sense) != SCSI_SENSE_BUFFERSIZE); \
__scsi_execute(sdev, cmd, data_direction, buffer, bufflen, \
sense, sshdr, timeout, retries, flags, rq_flags, \
resid); \
})
This macro only accepts a sense buffer that has been declared as an array
but no sense buffers that have been passed as a pointer to a function. To
avoid build errors, convert scst_scsi_execute() from a function into a macro.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7473 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-08-27 03:26:38 +00:00
Vladislav Bolkhovitin
16b4f4aba5
scst: cleanup follow up for r7449
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7464 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-08-03 04:23:36 +00:00
Bart Van Assche
30cf7b4bda
qla2x00t: Fix more checkpatch complaints about whitespace
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7456 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-08-02 04:47:08 +00:00
Bart Van Assche
458cf2ee00
scst/include/scst.h: Port to Linux kernel v4.18
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7450 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-08-02 03:58:47 +00:00
Bart Van Assche
d67f20abfb
scst/include/backport.h: Unbreak the build for kernel version 2.6.30 and older
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7443 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-07-24 02:38:35 +00:00
Bart Van Assche
1c1693d06b
qla2x00t: Port to Linux kernel v4.17
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7439 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-07-23 04:29:35 +00:00
Bart Van Assche
d0f4afe2ec
scst/include/backport.h: Avoid that the timer_setup() backport triggers a warning
...
Avoid that gcc 8 reports the following warning for the timer_setup() backport:
warning: cast between incompatible function types from 'void (*)(struct timer_list *)' to 'void (*)(long unsigned int)' [-Wcast-function-type]
(_timer)->function = (void (*)(unsigned long))(_fn); \
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7433 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-07-23 04:21:32 +00:00
Bart Van Assche
3ec56f3bde
scst/include/backport.h: Sort #include directives alphabetically
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7432 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-07-23 04:20:56 +00:00
Bart Van Assche
687c55143d
scst: Fix kmem_cache_create_usercopy() backport
...
slab_flags_t is not available in the kernel versions
kmem_cache_create_usercopy() has been backported to, hence use
unsigned long instead.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7431 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-07-21 16:46:16 +00:00
Bart Van Assche
cfe8f3cfc1
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@7427 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-07-19 18:00:42 +00:00
Bart Van Assche
70b263cf0b
scst/include/scst.h: Revert an accidental check-in
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7422 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-07-14 02:17:57 +00:00
Bart Van Assche
f7fe8e220b
scst_local: Rework the port to kernel v4.17
...
Rework the port to kernel v4.17 such that building scst_local against the
latest MOFED version succeeds.
Reported-by: Sergey Gorenko <sergeygo@mellanox.com >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7421 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-07-14 00:44:33 +00:00
Bart Van Assche
b2416e0f49
scst_local: Port to kernel v4.17
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7409 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-07-10 04:13:57 +00:00
Vladislav Bolkhovitin
f549829482
Copyrights updated
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7396 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-04-12 03:49:10 +00:00
Bart Van Assche
cfc340381e
scst/include/backport.h: Rework the DEFINE_TIMER() backport such that it also works with kernel 3.6 and before
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7387 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-03-07 01:05:31 +00:00
Bart Van Assche
a1b4c9e2fc
scst_lib: Port task management debug code to kernel v4.15
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7385 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-03-04 19:38:02 +00:00
Vladislav Bolkhovitin
464b87730c
scst: make tgt_dev per-CPU array directly referenced
...
Modern distributions come with kernels configured for thousands CPUs
(NR_CPUS), which leads to per-CPU array of SGV pool references in each
tgt_dev exceed tens of KB requiring high order page allocations that are
not reliable on aged systems leading to inabilities to create new
sessions.
Reported-by: Jose Martins <jose.martins2307@gmail.com >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7373 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-02-16 05:27:51 +00:00
Bart Van Assche
a8e299b5e6
scst_const.h: Make WRITE_VERIFY_16 available to user space applications
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7370 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-02-10 05:58:02 +00:00
Bart Van Assche
f0f5c0ae40
scst: Port DEFINE_TIMER() instances to kernel v4.15
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7361 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-02-05 00:12:07 +00:00
Bart Van Assche
c036d7afc3
scst/include/scst_debug.h: Insert a space to keep checkpatch happy
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7359 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-02-04 23:56:31 +00:00
Vladislav Bolkhovitin
2e5ed15fb0
scst: disabled global allocated memory limits
...
See scst_max_cmd_mem module parameter for more info. Allows to avoid 2
global atomic variables on the fast path, hence get better multi-queue
performance.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7346 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-01-31 23:45:04 +00:00
Vladislav Bolkhovitin
4555e7c553
scst: add possibility to create multi-queue sessions
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7341 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-01-20 05:04:50 +00:00
Vladislav Bolkhovitin
cbc53b12c8
scst_vdisk: lower severity of message about not supported fallocate(FALLOC_FL_PUNCH_HOLE|FALLOC_FL_KEEP_SIZE) and print it only once
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7328 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-01-05 05:14:03 +00:00
Vladislav Bolkhovitin
a5e93d46b0
scst: fix displaying "mgmt" sysfs help information
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7327 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-01-05 05:02:32 +00:00
Bart Van Assche
4d81f8e174
scst_debug.h: Avoid that smatch complains about passing a pointer to format specifier %lx
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7309 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-12-30 03:37:31 +00:00
Bart Van Assche
45128613ab
scst: Backport timer_setup() to kernel versions before v4.10
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7305 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-12-30 00:53:47 +00:00
Bart Van Assche
8268f5d5b1
Convert setup_timer() into timer_setup() calls
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7294 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-12-28 18:44:21 +00:00
Bart Van Assche
ff77f1acf4
Move WARN() backport from srpt/src/ib_srpt.c to scst/include/backport.h
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7280 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-12-22 23:13:30 +00:00
Bart Van Assche
8c92d5c168
scst: Fix kernel <= 2.6.30 build
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7268 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-11-14 16:37:24 +00:00
Bart Van Assche
089f839a78
scst: Address two checkpatch warnings
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7264 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-11-13 16:47:10 +00:00
Bart Van Assche
f8fab6fcab
scst: Fix build for kernels 3.15 and older
...
blk_rq_set_block_pc() was introduced in kernel 3.16.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7262 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-11-13 16:18:00 +00:00
Bart Van Assche
4c05086b59
scst, iscsi-scst: Introduce scst_read(), scst_write(), scst_readv() and scst_writev()
...
This makes it easier to add support for new kernel versions, e.g. kernel
version v4.14.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7260 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-11-13 05:50:44 +00:00
Bart Van Assche
64c76f339c
scst: Introduce the kernel v4.14 bio_set_dev() macro
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7259 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-11-13 05:49:08 +00:00