61 Commits

Author SHA1 Message Date
Konstantin Kharlamov
054c738f63 iscsi-scst: Add a hint what to look for if no userspace process is connected
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
[ bvanassche: edited description and patch ]
2020-05-13 13:46:41 -07:00
Bart Van Assche
d1f7b0aae8 iscsi-scst: Fix multiple checkpatch warnings
This patch does not change any functionality.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8050 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-11 03:57:09 +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
78a0407d0e scst, iscsi-scst: Simplify the code that uses kstrto*l()
This patch does not change any functionality.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7522 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2018-10-14 22:05:33 +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
Vladislav Bolkhovitin
41a287734f iscsi-scst: fix a couple of bad-function-cast warnings
This is a "marginal" warning, but there are only six of them in the SCST code
and this fixes two of those.

session.c:105:4: warning: cast from function call of type void * to non-matching type _Bool [-Wbad-function-cast]
target.c:668:14: warning: cast from function call of type void * to non-matching type _Bool [-Wbad-function-cast]

Signed-off-by: David Butterfield <dab21774@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7200 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-06-01 03:53:08 +00:00
Bart Van Assche
642744c9fc Fix spelling of "Ardis Technologies"
Reference: http://www.ddpsan.com/support-sales/about-us.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7165 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-05-02 22:32:06 +00:00
Vladislav Bolkhovitin
68fa7e1a0d Copyright updates
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7146 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-22 03:19:52 +00:00
Vladislav Bolkhovitin
c9b301bf39 iscsi-scst: add per_sess_dedicated_tgt_threads attribute in ini groups
If this attrubute is set, each iSCSI session for this initiator has
dedicated, i.e. not shared with other sessions, pool of the iscsi{wr,rd}
kernel threads.

Useful to control per-session CPU affinity to improve performance.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7069 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-12-20 06:00:43 +00:00
Vladislav Bolkhovitin
fa2f54ac9e Copyrights updated
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6787 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-01-22 04:04:43 +00:00
Bart Van Assche
df2a2ac1ab iscsi-scst, procfs: Fix a compiler warning
Avoid that the compiler warns that attr_info is not used in the procfs
build.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6742 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-12-16 08:44:04 +00:00
Bart Van Assche
7614eafd64 iscsi-scst: Insert a blank line after declarations
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6616 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-11-07 00:00:42 +00:00
Vladislav Bolkhovitin
45d7f40ec1 Improve release logging
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6478 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-08-25 02:57:51 +00:00
Bart Van Assche
8eb3f31eea iscsi-scst: Fix parameter order in a debug statement
Signed-off-by: Alexey Obitotskiy <mobbitster@gmail.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6421 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-07-14 21:50:51 +00:00
Bart Van Assche
79c8bf1f7c iscsi-scst, isert-scst: One trace flags variable per kernel module
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6397 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-06-23 15:01:17 +00:00
Bart Van Assche
6aaeca1cd9 Merge iser branch r6234 into trunk
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6235 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-06-10 15:35:26 +00:00
Vladislav Bolkhovitin
fe38e4acb2 Copyrights updated
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6146 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-03-19 00:01:03 +00:00
Vladislav Bolkhovitin
97167af582 scst: Make lockdep_assert_held() easier to use
The lockdep_assert_held() macro is a convenient debugging tool.
However, it is inconvenient to surround each invocation of that
macro by an #ifdef/#endif pair. Hence make it easier to use this
macro with older kernel versions.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5573 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-06-06 03:26:55 +00:00
Vladislav Bolkhovitin
00851a7501 Merge of adding iSER web page and copyright updates from the iSER branch
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5241 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-28 05:17:26 +00:00
Vladislav Bolkhovitin
65d1b76e50 iscsi-scst: Make locking requirements explicit
Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5101 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-11-13 04:51:05 +00:00
Vladislav Bolkhovitin
10ca1d2f20 Copyrights updated
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4767 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-02-20 02:05:29 +00:00
Vladislav Bolkhovitin
8ce28aaba2 Avoid that enabling a target too quickly triggers a crash
The sysfs attributes of a target can be accessed before scst_tgt.tgt_priv
has been set. Avoid that such an access triggers a crash.

Symptom:
BUG: unable to handle kernel NULL pointer dereference at 000000000000004c
IP: [<ffffffffa1345848>] iscsi_is_target_enabled+0x8/0x20 [iscsi_scst]
PGD 150a4c067 PUD 13cacb067 PMD 0
Oops: 0000 [#1] SMP
CPU 1
Modules linked in: zfs(P) iscsi_scst(O) scst_vdisk(O) scst(O) zcommon(P) znvpair(P) zavl(P) zunicode(P) spl(O) [last unloaded: zfs]
Pid: 3974, comm: scst_uid1864 Tainted: P           O 3.2.23-zfsiscsi-std-ipv6-64 #3 Supermicro X6DVA/X6DVA
RIP: 0010:[<ffffffffa1345848>]  [<ffffffffa1345848>] iscsi_is_target_enabled+0x8/0x20 [iscsi_scst]
RSP: 0018:ffff88015071ddc0  EFLAGS: 00010282
RAX: 0000000000000000 RBX: ffff880181fdaa00 RCX: ffff88012d41f380
RDX: ffff88015071c010 RSI: 0000000000000000 RDI: ffff880181fdaa00
RBP: ffff88015071ddc0 R08: 0000000000000000 R09: 0000000000000001
R10: 0000000000000001 R11: 0000000000000001 R12: ffffffffa134a608
R13: 0000000000000000 R14: 0000000000000129 R15: ffffffffa134a4c0
FS:  0000000000000000(0000) GS:ffff88019fc80000(0000)
knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 000000000000004c CR3: 0000000151927000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process scst_uid1864 (pid: 3974, threadinfo ffff88015071c000, task ffff880194d57500)
Stack:
 ffff88015071de10 ffffffffa12ee89a 00000000fffffffc 01ff88015071de98
 ffff88015071de80 ffff8801932a48d8 00000000fffffffc ffff88015071de98
 ffff88015071de80 ffff880194d57500 ffff88015071de30 ffffffffa12f582e
Call Trace:
 [<ffffffffa12ee89a>] __scst_is_relative_target_port_id_unique+0x6a/0xc0 [scst]
 [<ffffffffa12f582e>] gen_relative_target_port_id+0x6e/0xd0 [scst]
 [<ffffffffa12fdb8a>] scst_tgt_enable_store_work_fn+0x3a/0xe0 [scst]
 [<ffffffffa12f9397>] sysfs_work_thread_fn+0xc7/0x2e0 [scst]
 [<ffffffffa12f92d0>] ? scst_tgtt_release+0x20/0x20 [scst]
 [<ffffffffa12f92d0>] ? scst_tgtt_release+0x20/0x20 [scst]
 [<ffffffff810b44f6>] kthread+0x96/0xa0
 [<ffffffff81b8ed74>] kernel_thread_helper+0x4/0x10
 [<ffffffff810b4460>] ? kthread_worker_fn+0x180/0x180
 [<ffffffff81b8ed70>] ? gs_change+0xb/0xb
Code: 42 c8 74 0f 39 78 48 75 ea c9 c3 0f 1f 84 00 00 00 00 00 31 c0 c9 c3 66 66 66 2e 0f 1f 84 00 00 00 00 00 48 8b 47 48 55 48 89 e5 <0f> b6 40 4c c9 83 e0 01 c3 66 66 66 66 66 66 2e 0f 1f 84 00 00
RIP  [<ffffffffa1345848>] iscsi_is_target_enabled+0x8/0x20 [iscsi_scst]
 RSP <ffff88015071ddc0>
CR2: 000000000000004c
---[ end trace 6311d4069703be07 ]---

Reported-by: Etienne Dechamps <e-t172@akegroup.org>
Signed-off-by: Bart Van Assche <bvanassche@acm.org> with some modifications



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4515 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-09-12 22:13:43 +00:00
Vladislav Bolkhovitin
eb95049061 Copyrights updated + cleanups
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4216 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-04-18 02:26:39 +00:00
Bart Van Assche
f944799e42 iscsi-scst: Port to RHEL 5.7
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4112 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-04 16:41:21 +00:00
Vladislav Bolkhovitin
9da517bae1 Update for kernel 3.2. Netlink part in iSCSI-SCST done by Bart Van Assche <bvanassche@acm.org>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4077 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-01-18 23:48:02 +00:00
Bart Van Assche
d1acc24bed Suppress gcc 4.6 warnings about unused variables.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3350 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-04-03 14:34:48 +00:00
Vladislav Bolkhovitin
f3238333dd Copyrights updated
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3200 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-01-06 20:02:04 +00:00
Vladislav Bolkhovitin
b53e4cb4c1 Merge of the pr branch with additional fixes for problems found during extra testing
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1714 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-05-26 17:46:46 +00:00
Vladislav Bolkhovitin
bc1cda46df Sparse cleanups
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1713 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-05-24 12:32:45 +00:00
Vladislav Bolkhovitin
ff6d116e49 Minor mainline kernel related fixes and cleanups
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1609 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-04-13 17:25:45 +00:00
Vladislav Bolkhovitin
4d5aaf047b Copyrights updated
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1585 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-04-06 08:57:48 +00:00
Bart Van Assche
53a9bad357 Fixed several compiler and checkpatch warnings.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1568 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-03-27 08:46:06 +00:00
Vladislav Bolkhovitin
2fcee2a380 Fix for possible requirsive target_mutex taking
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1554 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-03-17 19:41:16 +00:00
Vladislav Bolkhovitin
ec832bca75 Fix copy_to_user()/copy_from_user() wrong reeturn value processing
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1552 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-03-17 18:45:23 +00:00
Vladislav Bolkhovitin
20efd3bc3e Some speedup for massive targets deletions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1549 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-03-17 18:05:31 +00:00
Vladislav Bolkhovitin
17db798a36 Make enable_target() interface more clear
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1539 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-03-10 11:56:15 +00:00
Vladislav Bolkhovitin
256b25cc0f - Dev handler sysfs interface changed to match new unified rules
- Docs updated
 - Other minor fixes, improvements and cleanups



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1538 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-03-09 19:36:48 +00:00
Vladislav Bolkhovitin
4d96089e50 Sysfs interface for targets made uniform. ISCSI-SCST made confirming the uniformity requirements. See README for details.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1511 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-02-17 19:07:54 +00:00
Vladislav Bolkhovitin
6153a079a3 iSCSI target sysfs "enabled" attribute implemented
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1324 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-11-06 18:41:37 +00:00
Vladislav Bolkhovitin
977a20ccba ISCSI target sysfs implementation, except "enabled" attribute.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1305 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-10-30 20:15:38 +00:00
Vladislav Bolkhovitin
f572d4ff79 - Copyrights updated.
- Other minor updates



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@803 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-04-27 19:01:28 +00:00
Vladislav Bolkhovitin
7b30ca41cb - Now during connection and session reinstatements only SCSI commands are delayed until the corresponding reinstatement finished.
- TEST UNIT READY made HEAD OF QUEUE to let target don't look dead under high load
 - Docs updated



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@774 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-04-14 17:29:23 +00:00
Vladislav Bolkhovitin
bc96b052d5 The patch below adds support for the 2.6.29 kernel and also fixes the
checkpatch issues reported by the checkpatch script included with the 2.6.29
kernel and that were not yet reported by the 2.6.28 checkpatch script
(trailing statements should be on the next line / struct should normally be
const).
The patch below has been tested as follows:
- Reran scripts/run-regression-tests -k 2.6.24.7 -k 2.6.25.20 -k 2.6.26.8 -k 2.6.27.21 -k 2.6.28.9 -k 2.6.29 and verified the output.
- Rebuilt, installed and loaded scst, iscsi-scst and srpt as follows:
make -s clean && make -s -C scst install && make -s -C iscsi-scst install && make -s -C srpt install && cd scstadmin && make -s && make -s install && modprobe scst_vdisk && modprobe iscsi-scst && dmesg

Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com>

with minor cleanups and corrections in put_page_callback-2.6.29.patch



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@717 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-03-25 12:55:27 +00:00
Vladislav Bolkhovitin
bc7c69bfc4 - Fixed a major IET-derived iSCSI RFC violation: sessions and connections were not working
- A lot of cleanups and minor fixes, mostly IET-derived



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@685 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-03-03 18:13:23 +00:00
Vladislav Bolkhovitin
dd1400dddc The patch below adds the following two RHEL 5 / CentOS 5 patches to the SCST
source tree:
- Support for zero-copy TCP transfer completion.
- An implementation of scsi_execute_async_fifo().
Except for the hunk headers, these patches are identical to similarly named
patches already present in the SCST source tree.

Additionally, implementations of seq_list_start() and seq_list_next() are
provided for those kernel versions that do not define these functions.

The patch below has been tested by verifying that iSCSI data transfer still
works OK on CentOS 5.2 (x86_64).

Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@657 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-02-02 11:36:53 +00:00
Vladislav Bolkhovitin
b240091109 Final merge with IET (r201-204):
- 2.6.25 introduced netlink_socket_release(), to be used to clean up netlink sockets correctly (taking care of namespaces).

 - New more scalable proc seq_file implementation

+ minor signess cleanups

+ version updated



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@654 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-01-30 17:47:31 +00:00
Vladislav Bolkhovitin
684719c66e Merge with IET r170-191:
- Update MaxConnections documentation
 - Remove isns config description from man page
 - Check return values of chdir(), ftruncate() and write(), because recent versions of the glibc insist on the return value being checked by
introducing __attribute__((warn_unused_result)) to these functions.
 - Fix snprintf use in isns.c
 - Take \0-termination into account when passing strings to isns_tlv_set() to solve incompatibility with MS iSNS 3.0 as IQN length is multiple of 4
 - Fix list corruption if SCST target registration fails
 - Register the target port actually used instead of the default iSCSI port.
 - Remove unused connection->pad
 - Refactor cmnd_execute()
 - Version changed



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@649 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-01-29 19:10:10 +00:00
Vladislav Bolkhovitin
ba698dbdd5 - Fix for iSCSI RFC violation: TARGET COLD RESET must close all connections/sessions, not only the current one
- Cleanups



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@648 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-01-29 18:25:45 +00:00
Vladislav Bolkhovitin
b0c6d9a561 The patch below fixes many checkpatch warnings triggered by the iSCSI kernel
code, mainly about lines that exceeded 80 columns. As you can see in the patch
below most lines that were too long have been split, but some code has also
been moved into helper functions in order to keep the code readable. No
functionality has been changed.

This patch has been verified as follows:
- Reread the patch carefully.
- Verified that the iSCSI target kernel module still loads.
- Verified the output generated by scripts/run-regression-tests -k 2.6.27.5.

Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com>

with some modifications



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@569 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-11-12 18:49:18 +00:00
Vladislav Bolkhovitin
8b77aa8ad2 Minor cleanups and docs updates
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@422 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-06-26 16:35:10 +00:00