Bart Van Assche
3ef4c364ab
iscsi-scst/kernel/conn.c: Fix source code indentation
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7307 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-12-30 02:25:54 +00:00
Bart Van Assche
1d27948af3
iscsi-scst: Fix a format specifier
...
Detected by checkpatch.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7306 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-12-30 02:23:23 +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
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
a8b24ae319
iscsi_scst: conn_lookup() skips any conn already closing
...
This change helped a secondary problem I had under valgrind (due to some other
bug) with initiators timing out and reconnecting their sessions faster than the
threads were getting cleaned up (for one thing, valgrind only ever runs one
thread at a time).
It seems logical that the code in conn_lookup() would want to skip any
connection that's already known closing in this case, for the same reason it
searches the list in reverse. And the dropping connections don't have to drop
in order, so searching in reverse doesn't seem sufficient to avoid finding a
wrong (stale, closing) connection structure.
Signed-off-by: David Butterfield <dab21774@gmail.com >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7144 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-21 01:36:34 +00:00
Vladislav Bolkhovitin
baba3ad195
iscsi: avoid a crash in iscsi_extracheck_is_rd_thread()
...
Add an extra check in iscsi_extracheck_is_rd_thread() to avoid a crash when
conn->rd_task is NULL.
Signed-off-by: David Butterfield <dab21774@gmail.com >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7111 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-13 23:12:46 +00:00
Vladislav Bolkhovitin
bb2f47e7a8
iscsi-scst: add target_ip attribute
...
It adds target_ip attribute containing target IP address in each
/sys/kernel/scst_tgt/targets/iscsi/TARGET/sessions/INITIATOR/INITIATOR_IP subdirectory.
It's useful to simplify monitoring management utilities
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7067 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-12-20 05:53:48 +00:00
Bart Van Assche
3ab98d8174
iscsi-scst: Fix checkpatch complaints about whitespace
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6846 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-03-27 16:10:26 +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
0597ac78c8
iscsi-scst: Fix IPv6 format specifications
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6670 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-11-11 22:05:05 +00:00
Bart Van Assche
469fe4a42c
iscsi-scst: Remove superfluous casts
...
The C language does not require to use an explicit cast when assigning
a void * pointer to a pointer of another type.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6633 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-11-09 19:51:17 +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
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
0d9d6a6f57
isert-scst: Fix in-tree build
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6312 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-06-12 16:15:45 +00:00
Bart Van Assche
e62155683e
iscsi-scst: Fix a compiler warning for kernel versions >= 3.19
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6310 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-06-12 15:29:56 +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
1e78126962
iscsi-scst: update for 3.19 kernels
...
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com > with some improvements
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6187 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-04-24 02:54:52 +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
Bart Van Assche
5019ae319e
scst: Introduce file_inode()
...
Signed-off-by: Sebastian Herbszt <herbszt@gmx.de >
[bvanassche: Constified file_inode() argument / added iscsi-scst conversion]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6084 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-02-12 07:48:10 +00:00
Bart Van Assche
9707f85c0b
Fix kernel 3.17 checkpatch warnings about 'long long unsigned'
...
Avoid that checkpatch reports the following warning:
WARNING: type 'long long unsigned' should be specified in 'unsigned long long' order.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5885 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-11-26 08:16:44 +00:00
Vladislav Bolkhovitin
87c6bba994
iscsi-scst: Build fix for IPV6=n
...
Ensure that iscsi-scst builds properly against a kernel with CONFIG_IPV6=n.
Reported by Igor Novgorodov <igor@novg.net > on June 7, 2014.
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5732 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-08-27 02:41:40 +00:00
Vladislav Bolkhovitin
b5c649ef5c
Update for 3.15 kernels
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5610 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-06-19 03:51:48 +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
Bart Van Assche
0880cbf0cf
RHEL 7 build fixes
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5543 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-05-23 07:33:53 +00:00
Bart Van Assche
135be0f19d
iscsi-scst: Fix a checkpatch warning
...
Fix the following checkpatch 3.14 warning:
Unnecessary parentheses - maybe == should be = ?
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5435 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-04-18 05:56:35 +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
85ea152e0c
[PATCH] scst: Remove casts from INIT_DELAYED_WORK() statements
...
This is a source code cleanup patch that does not change any functionality.
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5221 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-22 02:57:49 +00:00
Bart Van Assche
53c344a10e
iscsi-scst: Kernel 3.13 build fix
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5182 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-02 17:20:00 +00:00
Bart Van Assche
9292161192
scst and iscsi-scst: Suppress two sparse complaints
...
Avoid that sparse complains about a local symbol not having been declared
static (scst_pool_dep_map and scst_conn_dep_map). Also avoid that sparse
reports these two variables as unused in the procfs build.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5110 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-11-14 09:10:51 +00:00
Bart Van Assche
1d0efdeea9
iscsi-scst: Procfs build fix for r5101
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5109 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-11-14 08:50:29 +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
Bart Van Assche
2fa0405930
iscsi-scst: Build fix for non-debug kernels (follow-up for r5095)
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5100 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-11-12 08:22:39 +00:00
Vladislav Bolkhovitin
62fffa45dc
scst_sysfs: Trigger a lockdep complaint if sysfs work
...
could trigger a deadlock
This patch causes lockdep to complain if sysfs work could trigger a deadlock.
As an example, for the patch below the following lockdep complaint is generated:
======================================================
[ INFO: possible circular locking dependency detected ]
3.12.0-rc7-dbg+ #5 Tainted: GF O
-------------------------------------------------------
scst_mgmtd/7527 is trying to acquire lock:
(scst_tgt_dev){+.+.+.}, at: [<ffffffffa01f9365>] scst_tgt_dev_sysfs_del+0x105/0x1a0 [scst]
but task is already holding lock:
(&scst_mutex){+.+.+.}, at: [<ffffffffa01eaa46>] scst_free_session+0x56/0x2c0 [scst]
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #1 (&scst_mutex){+.+.+.}:
[<ffffffff810be983>] lock_acquire+0x93/0x150
[<ffffffff81619617>] mutex_lock_interruptible_nested+0x77/0x500
[<ffffffffa01f1f9f>] scst_tgt_dev_process_thread_pid_show+0x5f/0x120 [scst]
[<ffffffffa01f38d6>] scst_process_sysfs_works+0xe6/0x1d0 [scst]
[<ffffffffa01f7af0>] sysfs_work_thread_fn+0x120/0x2b0 [scst]
[<ffffffff8107482a>] kthread+0xea/0xf0
[<ffffffff81625f6c>] ret_from_fork+0x7c/0xb0
-> #0 (scst_tgt_dev){+.+.+.}:
[<ffffffff810bdc8a>] __lock_acquire+0x14fa/0x1a60
[<ffffffff810be983>] lock_acquire+0x93/0x150
[<ffffffffa01f20df>] scst_kobject_put_and_wait+0x6f/0x140 [scst]
[<ffffffffa01f9365>] scst_tgt_dev_sysfs_del+0x105/0x1a0 [scst]
[<ffffffffa01e9114>] scst_free_tgt_dev+0x84/0x210 [scst]
[<ffffffffa01ea80b>] scst_sess_free_tgt_devs+0x6b/0x100 [scst]
[<ffffffffa01eaa4e>] scst_free_session+0x5e/0x2c0 [scst]
[<ffffffffa01ead4e>] scst_free_session_callback+0x9e/0x170 [scst]
[<ffffffffa01d5a9a>] scst_global_mgmt_thread+0x24a/0x550 [scst]
[<ffffffff8107482a>] kthread+0xea/0xf0
[<ffffffff81625f6c>] ret_from_fork+0x7c/0xb0
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0 CPU1
---- ----
lock(&scst_mutex);
lock(scst_tgt_dev);
lock(&scst_mutex);
lock(scst_tgt_dev);
*** DEADLOCK ***
1 lock held by scst_mgmtd/7527:
#0 : (&scst_mutex){+.+.+.}, at: [<ffffffffa01eaa46>] scst_free_session+0x56/0x2c0 [scst]
stack backtrace:
CPU: 1 PID: 7527 Comm: scst_mgmtd Tainted: GF O 3.12.0-rc7-dbg+ #5
Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop Reference Platform, BIOS 6.00 07/31/2013
ffffffff822efd40 ffff88007b7c1ac8 ffffffff8161464a ffffffff822efd40
ffff88007b7c1b08 ffffffff81610d02 ffff88007b7c1b60 ffff8800692748c0
0000000000000000 ffff880069274898 ffff880069274120 ffff8800692748c0
Call Trace:
[<ffffffff8161464a>] dump_stack+0x4e/0x82
[<ffffffff81610d02>] print_circular_bug+0x201/0x210
[<ffffffff810bdc8a>] __lock_acquire+0x14fa/0x1a60
[<ffffffff810be983>] lock_acquire+0x93/0x150
[<ffffffffa01f9365>] ? scst_tgt_dev_sysfs_del+0x105/0x1a0 [scst]
[<ffffffffa01f20df>] scst_kobject_put_and_wait+0x6f/0x140 [scst]
[<ffffffffa01f9365>] ? scst_tgt_dev_sysfs_del+0x105/0x1a0 [scst]
[<ffffffffa01f9365>] scst_tgt_dev_sysfs_del+0x105/0x1a0 [scst]
[<ffffffffa01e9114>] scst_free_tgt_dev+0x84/0x210 [scst]
[<ffffffffa01ea80b>] scst_sess_free_tgt_devs+0x6b/0x100 [scst]
[<ffffffffa01eaa4e>] scst_free_session+0x5e/0x2c0 [scst]
[<ffffffffa01ead4e>] scst_free_session_callback+0x9e/0x170 [scst]
[<ffffffffa01d5a9a>] scst_global_mgmt_thread+0x24a/0x550 [scst]
[<ffffffff81075850>] ? wake_up_atomic_t+0x30/0x30
[<ffffffffa01d5850>] ? scst_register_session_non_gpl+0x20/0x20 [scst]
[<ffffffff8107482a>] kthread+0xea/0xf0
[<ffffffff81074740>] ? kthread_create_on_node+0x140/0x140
[<ffffffff81625f6c>] ret_from_fork+0x7c/0xb0
[<ffffffff81074740>] ? kthread_create_on_node+0x140/0x140
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5095 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-11-09 07:40:09 +00:00
Vladislav Bolkhovitin
13ee8e1649
We were setting the next timeout check to be the current time plus
...
the timeout value. The problem is that if commands were started at
00:00:05 and 00:00:10 and the timeout value was 15 seconds and the
first command completed ok, then conn_rsp_timer_fn would have run
at 00:00:20 and rescheduled the next conn_rsp_timer_fn run for 15
secs from that time (00:00:35). But, we would have wanted to check on
the second command at 15 secs after its write_start time which is
00:00:25.
This patch has us reschedule the next conn_rsp_timer_fn run for
the req's write_start time + its timeout.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5093 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-11-09 03:19:33 +00:00
Vladislav Bolkhovitin
1f4f117f3f
This patch fixes 2 issues.
...
1. If we have a nop in flight then we do not really need to send
more to test if the other side is still there. Either that nop
will timeout and conn will be dropped or it will complete
and last_rcv_time will be updated.
2. We are sending nop-ins every nop_in_interval seconds, but if
we got a data half way in to the window, then when conn_nop_in_delayed_work_fn
is run it was scheduling the next check to be nop_in_interval more
seconds. With the current settings this could end up with us waiting
59 secs before sending a nop and about 130 secs for it to timeout, when
at 61 it should be timing out and getting cleaned up already. This patch
has us take into account when the last time we got data to try and
reschedule the next nop check closer to nop_in_interval from that time.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5092 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-11-09 03:10:38 +00:00
Vladislav Bolkhovitin
2d874f7cb8
scst_sysfs: Introduce scst_kobject_put_and_wait()
...
This patch does not change any functionality other than the message
printed when it takes more than one second before the completion is
signalled.
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5086 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-10-31 04:44:52 +00:00
Vladislav Bolkhovitin
2cadcc2c64
Cache alignment review
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4809 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-23 01:38:31 +00:00
Vladislav Bolkhovitin
b9c0b9d92d
Another micro-optimization: cache align all fast path structures
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4785 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-04 23:51:16 +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
ddae1f7a63
Fix incorrect duplicate connection sysfs entry detection
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4680 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-01-04 03:08:29 +00:00
Vladislav Bolkhovitin
a698883844
Switch to the new and preferred approach for printing kernel messages
...
From: Bart Van Assche <bvanassche@acm.org >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4558 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-10-10 03:01:34 +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
Vladislav Bolkhovitin
7872837b6b
Replace list_entry((a)->next, b, c) by list_first_entry(a, b, c).
...
BSD-signed-off-by: Bart Van Assche <bvanassche@acm.org >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3965 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-10 03:50:24 +00:00
Vladislav Bolkhovitin
c54ebba11a
Some more TM cleanups/improvements
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3460 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-05-18 21:45:09 +00:00
Vladislav Bolkhovitin
5e7544e5a4
TM handling fixes, part2, hopefully, final.
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3450 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-05-12 01:31:01 +00:00
Vladislav Bolkhovitin
70eb596f60
Rework iSCSI aborts to make them more correct and remove recent workarounds (one more post-IET cleanup)
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3444 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-05-09 23:07:23 +00:00
Vladislav Bolkhovitin
8443ae6bc7
Don't abort not yet received commands
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3425 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-04-29 19:54:13 +00:00
Vladislav Bolkhovitin
3c59daab2a
Correctly process being read cmd during abort
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3413 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-04-26 00:04:01 +00:00