Commit Graph

6532 Commits

Author SHA1 Message Date
Bart Van Assche
fcf0141902 qla2x00t-32gbit: Remove redundant assignment to pointer 'host'
The pointer 'host' is being initialized with a value that is never read and
is being re-assigned a little later on. The assignment is redundant and
hence can be removed.

Link: https://lore.kernel.org/r/20190905134229.21194-1-colin.king@canonical.com
Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

[ commit da6d2965dbdb480f091c42f54a09abe8056282e5 upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8703 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-26 00:16:16 +00:00
Bart Van Assche
2a757086d4 scripts/checkpatch: Ignore the iscsi-scst/usr directory
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8702 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-26 00:15:35 +00:00
Bart Van Assche
c312bb71c7 scst_vdisk: Change 'static const char *' into 'static const char *const'
This patch addresses a checkpatch complaint.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8701 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-26 00:14:57 +00:00
Bart Van Assche
85f8ac3a1e vdisk_blockio: Add support for unaligned buffers
This patch prevents that the following warning is reported when running the
libiscsi tests against the vdisk_blockio handler:

Refused bio with invalid length 4080 and/or offset 16.

WARNING: CPU: 3 PID: 16022 at /home/bvanassche/software/scst.git/scst/src/dev_handlers/scst_vdisk.c:6180 blockio_exec_rw+0xc89/0xcf0 [scst_vdisk]
Call Trace:
 blockio_exec_write+0x9c/0xe0 [scst_vdisk]
 vdev_do_job+0xe8/0x220 [scst_vdisk]
 blockio_exec+0x140/0x370 [scst_vdisk]
 scst_do_real_exec+0xf4/0x610 [scst]
 scst_exec_check_blocking+0x24e/0x6b0 [scst]
 scst_exec_check_sn+0x222/0x6c0 [scst]
 scst_process_active_cmd+0xdff/0x31c0 [scst]
 scst_cmd_thread+0x36f/0xb60 [scst]
 kthread+0x1bc/0x210
 ret_from_fork+0x24/0x30

See also https://github.com/sahlberg/libiscsi/issues/302.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8700 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-23 19:04:18 +00:00
Bart Van Assche
105ac34449 scst_vdisk: Rename vdisk_parse() into fileio_parse()
Since this function is only used by the vdisk_fileio handler, reflect this
in the function name.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8699 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-23 18:56:47 +00:00
Bart Van Assche
5ca9d97b65 scst: Remove the code that depends on the SCSI_EXEC_REQ_FIFO_DEFINED macro
The exec_req_fifo patches have been removed some time ago. Hence also remove
the code that depends on these patches having been applied. See also commit
78d6da4517 ("scst: Remove obsolete exec_req_fifo kernel patches"; r8022).



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8698 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-23 18:55:58 +00:00
Bart Van Assche
6fde88d57b scst, qla2x00t: Use pr_warn() instead of pr_warning()
pr_warning() has been removed from kernel v5.5. Hence use pr_warn() instead
of pr_warning().


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8697 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-23 18:54:35 +00:00
Bart Van Assche
60bf4671a4 scst: Change static const char * into static const char* const
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8696 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-23 18:53:43 +00:00
Bart Van Assche
2ec09741db scripts/checkpatch: Suppress more checkpatch complaints about long lines
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8695 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-23 18:52:57 +00:00
Bart Van Assche
d91851cccc scst: Convert mutex_release() and rwlock_release() to the kernel v5.5 prototypes
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8694 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-23 18:52:15 +00:00
Bart Van Assche
d85e33dbcc iscsi-scst: Serialize socket disconnect calls properly
This patch fixes the following kernel complaint:

WARNING: suspicious RCU usage
include/net/sock.h:1907 suspicious rcu_dereference_protected() usage!
other info that might help us debug this:
rcu_scheduler_active = 2, debug_locks = 1
no locks held by iscsi_conn_clea/18329.
stack backtrace:
Call Trace:
 dump_stack+0xa5/0xe6
 lockdep_rcu_suspicious+0x107/0x111
 tcp_disconnect+0x9ee/0xa60
 iscsi_tcp_conn_close+0x5d/0x90 [iscsi_scst]
 close_conn+0xcfe/0x1470 [iscsi_scst]
 close_conn_thr+0x54/0x80 [iscsi_scst]
 kthread+0x1bc/0x210
 ret_from_fork+0x24/0x30

Fixes: commit ba3062fe6b ("iscsi-scst: Improve connection shutdown time";
r297).


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8693 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-23 18:51:02 +00:00
Bart Van Assche
11ca9d6704 scst/kernel/in-tree/Makefile.drivers.Linux-5.4.patch: Add to the source tree
Signed-off-by: Sietse van Zanen <sietse@wizdom.nu>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8692 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-23 15:38:58 +00:00
Bart Van Assche
ffb1b505cc scripts/specialize-patch: Fix expansion of HAVE_IB_SG_DMA_LEN
This patch fixes commit ac145e1cb6 ("ib_srpt: Detect ib_sg_dma_len()
presence at compile time"; r8655).



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8691 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-23 15:37:37 +00:00
Bart Van Assche
73de09a7cb nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8690 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-21 17:00:39 +00:00
Bart Van Assche
79b07ad0c3 scst: Remove three superfluous unlikely() annotations
This was detected by checkpatch.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8689 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-21 02:55:40 +00:00
Bart Van Assche
3217d67ef4 qla2x00t-32gbit: Revert r8656
Instead of trying to fix the regressions introduced upstream, stay close
to the upstream code and let the upstream maintainers fix regressions.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8688 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-21 02:49:20 +00:00
Bart Van Assche
1379918d8a iscsi-scst/Makefile: Avoid duplicate exported symbol warnings for kernel v5.5
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8687 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-17 04:24:55 +00:00
Bart Van Assche
a169500590 Makefiles: Use KBUILD_EXTRA_SYMBOLS instead of copying Module.symvers
Copying Module.symvers is the oldest supported method for building external
kernel modules that depend on another external kernel module. Since support
for that method will be removed from Linux kernel v5.5, use
KBUILD_EXTRA_SYMBOLS instead to specify the external symbols SCST kernel
modules depend on. Support for KBUILD_EXTRA_SYMBOLS was introduced in
upstream kernel v2.6.26 so this patch drops support for kernels before
v2.6.26.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8686 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-16 23:29:42 +00:00
Bart Van Assche
d0183001e4 Makefiles: Remove the $(BUILD_INI) variable
Since the BUILD_INI variable is set but not used, remove it.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8685 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-16 21:31:30 +00:00
Bart Van Assche
94ba3b87b2 fcst/Makefile: Remove the 'tgt' target
Since that makefile target is not used, remove it.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8684 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-16 21:25:35 +00:00
Bart Van Assche
ecaab978f0 scst, scstadmin, ...: Bump the version number to 3.5.0-pre
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8683 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-06 05:28:56 +00:00
Bart Van Assche
d39337637c SVN_TAGS: Update
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8682 d57e44dd-8a1f-0410-8b47-8ef2f437770f
v3.4
2019-12-04 05:09:52 +00:00
Bart Van Assche
fa156aa40d scripts/update-version: Fix the code for updating the scstadmin version number
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8681 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-04 05:00:49 +00:00
Bart Van Assche
447d25f678 scstadmin: Bump version number
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8680 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-04 05:00:24 +00:00
Bart Van Assche
7fec3457f6 scripts/update-version: Also update the iSERt version number
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8679 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-04 04:55:30 +00:00
Bart Van Assche
4c409a4b75 ib_srpt: Tweak the version number formatting
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8678 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-04 04:54:29 +00:00
Bart Van Assche
09edff95e3 isert-scst: Bump the version number
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8677 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-04 04:54:05 +00:00
Bart Van Assche
ab9edab2d6 SVN_TAGS: Add version 3.4.0 information
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8676 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-04 04:18:52 +00:00
Bart Van Assche
ce557f2f1c scst, fcst, iscsi-scst, srpt, ...: Bump version number to 3.4.0
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8674 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-12-03 04:22:16 +00:00
Bart Van Assche
f22d4bb63b scst, fcst, iscsi-scst, qla2x00t, srpt: Add module namespace support
This patch adds support for kernel module namespaces. This patch is essential
when using SCST in combination with kernel version v5.4 or later.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8673 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-30 00:54:20 +00:00
Bart Van Assche
df61d43643 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8672 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-29 16:10:50 +00:00
Bart Van Assche
5406b273a2 qla2x00t-32gbit: fix NPIV tear down process
Fix two issues with commit f5187b7d1ac6 ("scsi: qla2xxx: Optimize NPIV
tear down process"): a missing negation in a wait_event_timeout()
condition, and a missing loop end condition.

Fixes: f5187b7d1ac6 ("scsi: qla2xxx: Optimize NPIV tear down process")
Link: https://lore.kernel.org/r/20191105145550.10268-1-martin.wilck@suse.com
Signed-off-by: Martin Wilck <mwilck@suse.com>
Acked-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

[ commit 8b1062d513880b3ec696945f15dc84d179f1f3c1 upstream ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8671 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-29 05:27:03 +00:00
Bart Van Assche
1391db2d8c nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8670 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-24 15:47:47 +00:00
Bart Van Assche
c1a340b484 scst: Fix the build against kernel v5.0 and before
Fixes: ef161f930f ("scst: Rework handling of recursive locking")
Reported-by: Ville Skytta <ville.skytta@iki.fi>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8669 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-24 04:49:58 +00:00
Bart Van Assche
50af8e3c4d ib_srpt/Makefile: Improve MOFED support on Debian
Instead of only checking the mlnx-ofed-kernel-dkms, also check the
mlnx-ofed-kernel-modules package name.

Signed-off-by: Ville Skytta <ville.skytta@iki.fi>
[ bvanassche: Combined two patches into this single change ]



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8668 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-23 19:57:05 +00:00
Bart Van Assche
810231050f iscsi-scst/Makefile: Improve MOFED support for Debian systems
Instead of only checking the mlnx-ofed-kernel-dkms package name, also check
the mlnx-ofed-kernel-modules package name.

Signed-off-by: Ville Skytta <ville.skytta@iki.fi>
[ bvanassche: extracted this change from a larger patch ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8667 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-23 19:54:54 +00:00
Bart Van Assche
8bdb6a625a iscsi-scst/Makefile: Fix grabbing OFED_VERS from deb version
Fixes: e7ccfcf213 ("iscsi-scst/Makefile, Ubuntu: Simplify code for version querying")
Signed-off-by: Ville Skytta <ville.skytta@iki.fi>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8666 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-23 06:39:42 +00:00
Bart Van Assche
0f4547b0ff scst_vdisk: Remove a superfluous WARN_ON_ONCE() statement
This patch fixes the following Coverity complaint:

7. assignment: Assigning: usn_len = max_len. The value of usn_len is now 252.

CID 326814 (#1 of 1): Out-of-bounds access (OVERRUN)
8. overrun-buffer-arg: Overrunning array virt_dev->usn of 21 bytes by
   passing it to a function which accesses it at byte offset 251 using
   argument usn_len (which evaluates to 252).

Fixes: ca180efeec ("scst_vdisk: Avoid that vdisk_usn_vpd() can trigger a buffer overflow")


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8665 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-17 22:08:45 +00:00
Bart Van Assche
f539200de5 scst: Remove the nolockdep patch files
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8664 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-17 19:26:17 +00:00
Bart Van Assche
ef161f930f scst: Rework handling of recursive locking
Use lockdep_register_key() and lockdep_unregister_key() instead of
disabling lockdep checking for certain lock objects. See also Linux
kernel commit 108c14858b9e ("locking/lockdep: Add support for dynamic
keys"; kernel version v5.1).



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8663 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-17 19:24:43 +00:00
Bart Van Assche
30f4ebdab7 scst: Simplify scst_cm_del_free_list_id()
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8662 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-17 19:22:02 +00:00
Bart Van Assche
c6abe376e9 scst_vdisk, async file I/O: Fix a WARN_ON_ONCE() statement
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8661 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-17 19:21:33 +00:00
Bart Van Assche
23a9e8e1e6 scst_vdisk, async file I/O: Report residuals instead of triggering two kernel warnings
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8660 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-17 19:20:47 +00:00
Bart Van Assche
c6c6a94965 iscsi: Remove a debug assert
Remove this debug assert because it a write residual can happen, e.g. if the
expected transfer length exceeds the Data Out buffer length. This statement
was hit by the following CDB, submitted by the libiscsi regression tests:

[14896]: scst: scst_parse_cmd:1235:Warning: expected transfer length 0 (DIF 0) for opcode WRITE(10) (handler vdisk_fileio, target iscsi) doesn't match decoded value 512
[14896]: scst_parse_cmd:1243:Suspicious CDB:
 (h)___0__1__2__3__4__5__6__7__8__9__A__B__C__D__E__F
   0: 2a 00 00 00 00 00 00 00 01 00   *.........



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8659 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-17 19:19:09 +00:00
Bart Van Assche
d5c638ca1d rpm build: Make the RPM build directory configurable
Signed-off-by: Daniel Ahlin <dah@pdc.kth.se>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8658 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-16 04:22:03 +00:00
Bart Van Assche
9d8b4ee467 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8657 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-09 17:26:30 +00:00
Bart Van Assche
1012e86f12 qla2x00t-32gbit: Revert r8645 because it breaks point-to-point mode
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8656 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-09 04:11:10 +00:00
Bart Van Assche
ac145e1cb6 ib_srpt: Detect ib_sg_dma_len() presence at compile time
This patch makes it possible to build the ib_srpt driver against a kernel
before v5.1 + latest MOFED.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8655 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-08 21:28:37 +00:00
Bart Van Assche
e634e03a78 scripts/specialize-patch: Add support for HAVE_SRP_DATA_DESC_IMM
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8654 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-08 21:17:29 +00:00
Bart Van Assche
30c6cdfbe7 ib_srpt: Detect SRP_DATA_DESC_IMM constant support at compile time
This patch makes it possible to build the ib_srpt driver against a kernel
before v4.21 + latest MOFED.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8653 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-11-08 20:40:51 +00:00