Commit Graph

5517 Commits

Author SHA1 Message Date
Bart Van Assche
47b9268d4f dpkg: Enable stripping of binary and compression of manual pages
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7365 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-02-06 03:26:03 +00:00
Bart Van Assche
80b20ded1b dpkg: Remove SCST init script links after package uninstallation instead of before
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7364 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-02-06 03:22:14 +00:00
Bart Van Assche
bcdb25e550 iscsi-scst, srpt: Remove MOFED_MAJOR and MOFED_MINOR definitions
Commit r7084 removed all users of MOFED_MAJOR. Hence also remove the
code that sets that variable. Note: MOFED_MINOR was never used in any
.c file.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7363 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-02-05 17:24:46 +00:00
Bart Van Assche
0dd06cbcb9 srpt/Makefile: Improve MOFED detection further
Ensure that MOFED is detected correctly on Debian systems on which the rpm
command has been installed ("alien" package).


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7362 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-02-05 17:12:39 +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
86121f3ee4 scst: Reduce the object size slightly
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7360 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-02-04 23:57:14 +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
Bart Van Assche
a290c4ea4b qla2x00t: Remove a cast from a debug statement
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7358 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-02-04 23:14:43 +00:00
Bart Van Assche
993cf71424 qla2x00t: Fix kernel-doc header inconsistencies
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7357 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-02-04 23:06:21 +00:00
Bart Van Assche
39139632db scst: Document scst_register_session_mq() arguments
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7356 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-02-04 23:05:58 +00:00
Bart Van Assche
56a8b3ba57 srpt/Makefile: Add support for detecting MOFED on Debian systems
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7355 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-02-04 17:55:38 +00:00
Bart Van Assche
7b7d702f10 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7354 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-02-03 05:15:16 +00:00
Bart Van Assche
b3435fbdda debian/rules: Also clean the scstadmin/scstadmin soft link
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7353 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-02-01 04:45:01 +00:00
Bart Van Assche
34f4744997 scripts/list-non-source-files: Add to repository
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7352 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-02-01 04:33:56 +00:00
Bart Van Assche
24568c1482 debian/rules: Make executable
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7351 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-02-01 04:26:50 +00:00
Bart Van Assche
41473b3e66 Add support for generating Debian packages
Debian packages can be generated by running "make dpkg". Running that command
will produce e.g. the following output:
[ ... ]
Output files:
total 8444
-rw-r--r-- 1 bart bart  185150 Jan 31 20:11 iscsi-scst_3.4.0.6003-1_amd64.deb
-rw-r--r-- 1 bart bart   53174 Jan 31 20:11 scst-dev_3.4.0.6003-1_all.deb
-rw-r--r-- 1 bart bart  878030 Jan 31 20:11 scst-dkms_3.4.0.6003-1_all.deb
-rw-r--r-- 1 bart bart    7388 Jan 31 20:09 scst_3.4.0.6003-1.debian.tar.xz
-rw-r--r-- 1 bart bart    1046 Jan 31 20:09 scst_3.4.0.6003-1.dsc
-rw-r--r-- 1 bart bart   95348 Jan 31 20:11 scst_3.4.0.6003-1_amd64.build
-rw-r--r-- 1 bart bart    6526 Jan 31 20:11 scst_3.4.0.6003-1_amd64.buildinfo
-rw-r--r-- 1 bart bart    3054 Jan 31 20:11 scst_3.4.0.6003-1_amd64.changes
-rw-r--r-- 1 bart bart 4892014 Jan 31 20:11 scst_3.4.0.6003-1_amd64.deb
-rw-rw-r-- 1 bart bart 2458224 Jan 31 20:09 scst_3.4.0.6003.orig.tar.xz
-rw-r--r-- 1 bart bart   43616 Jan 31 20:11 scstadmin_3.4.0.6003-1_amd64.deb

These packages can be installed with the dpkg command. An example:

cd dpkg && sudo dpkg -i scst_*.deb iscsi-scst_*.deb scstadmin_*.deb


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7350 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-02-01 04:21:29 +00:00
Bart Van Assche
dc20e09b51 scripts/clean-source-tree: Add command-line option -x (exclude file)
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7349 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-02-01 04:19:13 +00:00
Bart Van Assche
9ec73e101a Makefile: Rework the code for generation of a source code distribution archive
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7348 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-02-01 04:17:00 +00:00
Bart Van Assche
6c61863bf9 Makefile: Evaluate $(VERSION) once
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7347 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-02-01 04:14:57 +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
03168499aa scst: COMPARE AND WRITE also not supported for MQ sessions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7345 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-01-30 06:14:03 +00:00
Bart Van Assche
f41c5712d8 scripts/clean-source-tree: Add to repository
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7344 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-01-22 03:45:18 +00:00
Bart Van Assche
397511514a scripts/list-source-files: Improve robustness of this script
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7343 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-01-22 03:44:33 +00:00
Bart Van Assche
f2a00f8e73 scst: Fix spelling in a source code comment
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7342 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-01-20 16:57:52 +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
Bart Van Assche
52e6f307b9 iscsi-scst: Fix spelling in a source code comment
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7340 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-01-18 05:57:05 +00:00
Vladislav Bolkhovitin
8f47816137 scst_vdisk: fix crash on/after changing vcdrom media
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7339 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-01-18 05:25:21 +00:00
Vladislav Bolkhovitin
ca9debd891 iscsi-scst: fix a subtle race inside the EXTRACHECKs facility.
The system is running an iSCSI write test with header and data digests
enabled. On the command that resulted in the assert, all of the write
data was sent as immediate and unsolicited. The unsolicited data
consisted of a single DataOut PDU and it was the iscsi_cmnd resource
allocated for receiving the unsolicited DataOut that caused the assert,
not the iscsi_cmnd resource tracking the iSCSI write command. As the
Recv thread is finishing up with the iscsi_cmnd struct for receiving the
final unsolicited DataOut, SCST is call  the  iscsi_pre_exec function to
restart the command and this routine will process the DataOut
iscsi_cmnd as it is queued onto the rx_digest_list of the iscsi_cmnd for
Write.

ffff8a984150c600 is the iscsi_cmnd allocated to track the iSCSI Write command
ffff8a984150d680 is the iscsi_cmnd allocated for receiving the Data-out PDU

In the logs below, recv thread 3677 just completed receiving the unsolicited DataOut.

[  977.563046] [3677]: do_recv:808:nr_segs 0, bytes_left 0, res 196608
[  977.563048] [31728]: iscsi_make_conn_rd_active:351:conn ffff8a97d0df1600, rd_state 2, rd_data_ready 1
[  977.563065] [3677]: do_recv:808:nr_segs 0, bytes_left 0, res 4
[  977.563069] [31728]: iscsi_make_conn_rd_active:351:conn ffff8a97d0df1600, rd_state 2, rd_data_ready 1
[  977.563076] [3677]: cmnd_rx_end:3475:cmnd ffff8a984150d680, opcode 5
[  977.563078] [31728]: iscsi_make_conn_rd_active:351:conn ffff8a97d0df1600, rd_state 2, rd_data_ready 1
[  977.563081] [3677]: cmnd_rx_end:3478:Updated last_rcv_time 4295644274
[  977.563091] [3677]: data_out_end:2455:cmnd ffff8a984150d680, req ffff8a984150c600
[  977.563093] [3677]: cmd_add_on_rx_ddigest_list:820:Adding RX ddigest cmd ffff8a984150d680 to digest list of req ffff8a984150c600
[  977.563096] [3677]: cmnd_get:764:cmnd ffff8a984150d680, new cmnd->ref_cnt 2

Here we see no more data is pending to be received on this write, so
iscsi_restart_cmnd is called by recv thread which should trigger SCST to
start processing the command:

[  977.563106] [3677]: data_out_end:2495:req ffff8a984150c600, FINAL 80, outstanding_r2t 0, r2t_len_to_receive 0, r2t_len_to_send 0
[  977.563108] [3677]: req_del_from_write_timeout_list:141:Deleting cmd ffff8a984150c600 from conn ffff8a97d0df1600 write_timeout_list
[  977.563111] [3677]: cmnd_remove_data_wait_hash:1606:Deleting cmnd ffff8a984150c600 from the hash (ITT 1e230400)

SCST thread 24654 calls the pre execute routine which verifies the data
digest on immediate and unsolicited data:

[  977.563157] [24654]: iscsi_pre_exec:1917:Checking digest of RX ddigest cmd ffff8a984150c600
[  977.563161] [24654]: digest_data:125:req ffff8a984150c600, idx 0, count 16, sg_cnt 64, size 65536, offset 0
[  977.563170] [24654]: digest_rx_data:219:RX data digest OK for cmd ffff8a984150c600
[  977.563173] [3677]: cmnd_put:775:cmnd ffff8a984150c600, new ref_cnt 2
[  977.563176] [24654]: cmd_del_from_rx_ddigest_list:830:Deleting RX digest cmd ffff8a984150c600 from digest list

Recv thread calls pre release on iscsi_cmnd allocated for unsolicited
DataOut PDU:

[  977.563178] [3677]: req_cmnd_pre_release:820:req ffff8a984150d680

[  977.563181] [24654]: cmnd_put:775:cmnd ffff8a984150c600, new ref_cnt 1

SCST thread 24654 processing data digest on unsolicited DataOut PDU.
Here we have two threads accessing  the same iscsi_cmnd struct. SCST
thread will set on_rx_digest_list flag to 0. Recv thread will set
release_called flag to 1.

[  977.563184] [24654]: iscsi_pre_exec:1917:Checking digest of RX ddigest cmd ffff8a984150d680
[  977.563186] [24654]: cmd_del_from_rx_ddigest_list:830:Deleting RX digest cmd ffff8a984150d680 from digest list
[  977.563189] [24654]: cmnd_put:775:cmnd ffff8a984150d680, new ref_cnt 0

[  977.563191] [3677]: conn_get:868:conn ffff8a97d0df1600, new conn_ref_cnt 4
[  977.563194] [24654]: cmnd_done:589:cmnd ffff8a984150d680
[  977.563196] BUG at ./iscsi-scst/kernel/iscsi.c:598 (cmnd->on_rx_digest_list)
[  977.563212] ------------[ cut here ]------------
[  977.563215] kernel BUG at ./iscsi-scst/kernel/iscsi.c:598!

Reported and analyzed by Adam Hutchinson <ajhutchin@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7338 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-01-13 03:37:19 +00:00
Vladislav Bolkhovitin
9ac6a883d1 qla2x00t: fix in-kernel tree build
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7337 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-01-13 03:31:26 +00:00
Bart Van Assche
2594bc1fad qla2x00t: Declare local functions 'static'
Additionally, remove the 'inline' keyword from these two functions
because today's compilers are better than humans at deciding which
functions should be inlined and which ones not. This patch avoids
that building the qla2x00t driver on RHEL 7.4 triggers two compiler
warnings.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7336 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-01-11 17:00:21 +00:00
Bart Van Assche
32ab3b1e1f qla2x00t/extract-qla2xxx-orig: Use scripts/kernel-functions instead of duplicating it
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7335 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-01-09 00:45:26 +00:00
Bart Van Assche
8f22880dee scstadmin: Slightly change the output format of exported LUNs
An example:

# scstadmin -noprompt -handler vdisk_fileio -close_dev diskf0
Collecting current configuration: done.


-> Making requested changes.
Device 'diskf0' is currently in use by the following:

        Driver     Target                  Group Lun 
        ---------- ----------------------- ----- ----
        iscsi      iqn.2012-06.be.bva:tgt1       61  
        scst_local disks                         1   


FATAL: Received the following error:

        Device 'diskf0' still in use, aborting. Use -force to override.




git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7334 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-01-07 02:25:10 +00:00
Bart Van Assche
2ccb2b1003 scstadmin, listExported: Remove dead code
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7333 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-01-07 02:23:49 +00:00
Bart Van Assche
843e1e755d scstadmin: Align exports columns properly
An example:

# scstadmin -noprompt -handler vdisk_fileio -close_dev diskf0
Collecting current configuration: done.


-> Making requested changes.
Device 'diskf0' is currently in use by the following:

        Driver     Target                  Group Lun 
        --------------------------------------------
        iscsi      iqn.2012-06.be.bva:tgt1       61  
        scst_local disks                         1   


FATAL: Received the following error:

        Device 'diskf0' still in use, aborting. Use -force to override.

This patch is based on a proposal from Dzmitry Kotsikau.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7332 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-01-07 01:04:08 +00:00
Bart Van Assche
e3770250bb scstadmin: Synchronize test 07 with trunk r7327
Trunk r7327 restored the 'dummy' attribute for the vdisk_nullio handler
and hence changed the outcome of test 07. Update the expected output.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7331 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-01-07 01:02:42 +00:00
Bart Van Assche
9de081f1a7 scripts/kernel-functions: Synchronize with the latest kernel.org directory layout
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7330 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-01-06 22:54:12 +00:00
Bart Van Assche
5053945226 scst_lib: Kernel v4.14.x (x>=11) build fix
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7329 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-01-06 22:53: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
e0903d4ce0 scstadmin: Fix parsing of the soft links under the 'exported' directory
Reported-by: Dzmitry Kotsikau <dkotsikau@gmail.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7326 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-01-04 18:02:47 +00:00
Bart Van Assche
7baba46a23 scstadmin: Improve test 08
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7325 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-01-04 18:01:16 +00:00
Bart Van Assche
e02fb4b9ad scstadmin tests: Remove temporary files after tests 05 and 06 have finished
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7324 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-01-04 18:00:48 +00:00
Bart Van Assche
3ef72409bd scstadmin: Add test 08 for -close_dev
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7323 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-01-04 04:17:23 +00:00
Bart Van Assche
efff1b524d scstadmin: Skip the copy manager when computing exported LUNs
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7322 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-01-04 04:16:04 +00:00
Bart Van Assche
a8f0afeb50 scstadmin: Add the -dumpAttrs command line option
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7321 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-01-04 04:15:11 +00:00
Bart Van Assche
6aaefd6882 scstadmin, test 07: Make a filename more specific
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7320 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-01-04 04:14:08 +00:00
Bart Van Assche
31ff7ecab8 scstadmin: Revert r7310 because it was reported not to fix the issue it should have fixed
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7319 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-01-04 02:40:13 +00:00
Bart Van Assche
a51cd22614 ib_srpt: Refine two log messages
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7318 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-01-04 00:30:22 +00:00
Bart Van Assche
58f7ca66f1 ib_srpt: Make it easier to use SR-IOV virtual functions
Management datagrams (MADs) are not supported for SR-IOV VFs. That
is why srpt_refresh_port() fails for SR-IOV VFs. Make it easier to
use SR-IOV VFs by only logging an error message if MAD handler
registration fails.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7317 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-01-03 23:54:44 +00:00
Bart Van Assche
c3b1c10abf ib_srpt: Revert r7315 because it did not enable SR-IOV support
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7316 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-01-03 23:29:49 +00:00