Commit Graph

389 Commits

Author SHA1 Message Date
Bart Van Assche
9cd602de2f Update for kernel 3.18
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5955 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-12-22 13:10:41 +00:00
Bart Van Assche
c8d86e2811 Source code spelling fix: accesss -> access
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5944 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-12-22 12:28:56 +00:00
Bart Van Assche
8d518d8e33 iscsi-scst/kernel/patches/rhel/put_page_callback-2.6.32-504.patch: Add
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5904 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-12-03 17:06:57 +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
e13aa6622d Update for kernels 3.17.x
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5882 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-11-26 07:02:17 +00:00
Vladislav Bolkhovitin
d698f6c1bd Report RX data digest failures by default
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5856 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-11-15 01:55:27 +00:00
Bart Van Assche
23bfab0626 iscsi-scst: Make iscsi_thread_pool locking more fine-grained
Protect iscsi_thread_pool.threads_list via tp_mutex instead of
scst_mutex.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5852 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-10-18 08:56:23 +00:00
Vladislav Bolkhovitin
827e5b1461 scst, iscsi-scst: Add thread_pid attribute
For SCST devices with a short name determining which SCST command
threads serve a given LUN requires an (expensive) walk of the
process table. For SCST devices with a long name it is not possible
to determine unambiguously which command threads serve a given
LUN. Hence add a thread_pid sysfs attribute that makes it easy to
figure out which command threads serve a LUN.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5851 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-10-17 02:35:01 +00:00
Vladislav Bolkhovitin
9c2fb52429 iscsi-scst: Micro-optimize cmnd_prepare_recv_pdu()
Instead of adding sg[idx].offset to addr and immediately subtracting
sg[idx].offset again, leave out both arithmetic operations.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5735 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-08-27 02:55:28 +00:00
Vladislav Bolkhovitin
760b71423a scst: Remove set_cpus_allowed() invocations
Since scst.h contains a backport of the definition of set_cpus_allowed_ptr(),
the set_cpus_allowed() invocations are superfluous. Hence remove these.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5734 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-08-27 02:43:50 +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
Bart Van Assche
a2b88e7894 Fix a kernel 3.16 checkpatch complaint about trailing semicolons
Avoid that the checkpatch tool included in Linux kernel v3.16 reports the
following warning:

    macros should not use a trailing semicolon

This patch does not change any functionality.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5724 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-08-22 07:19:55 +00:00
Vladislav Bolkhovitin
d45aab69a9 Fix incorrect address computation during receive PDUs preparations
Found and fix suggested by Кирилл Тюшев <kirill.tyushev8@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5721 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-08-21 05:17:47 +00:00
Vladislav Bolkhovitin
4d937c42ee Update for kernels 3.16
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5717 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-08-19 21:52:31 +00:00
Bart Van Assche
e4bcb3738d RHEL 7: Add scst_exec_req_fifo and put_page_callback patches
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5710 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-08-07 07:20:08 +00:00
Vladislav Bolkhovitin
726be64769 iscsi-scst: Handle data buffers with non-zero offset correctly
Start at the proper offset in the receive buffer if sg[0].offset != 0.
Return the proper data to the initiator if sg[0].offset != 0.

This patch reworks trunk r5281, "iscsi-scst: fix offset
calculation", February 13, 2014.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5683 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-07-19 03:54:33 +00:00
Vladislav Bolkhovitin
b6f2a47ee8 Change BUG_ON(1) into BUG()
With CONFIG_BUG=y both BUG() and BUG_ON(1) halt the system. However,
with CONFIG_BUG=n BUG() halts the system but BUG_ON(1) not. To avoid
such subtleties, change BUG_ON(1) into BUG().

See also patch Josh Triplett, "bug: Make BUG() always stop the machine",
7 April 2014 (commit ID a4b5d580e07875f9be29f62a57c67fbbdbb40ba2).

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5618 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-06-20 04:10:40 +00:00
Vladislav Bolkhovitin
6b32f4ae81 scst, iscsi-scst: Fix RHEL 5 compilation warnings
Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5615 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-06-20 04:03: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
ca9b38693b scst: Switch from the cpu_*() to the cpumask_*() API
The cpus_*() functions were deprecated via patch "cpumask:
introduce new API, without changing anything" (November 2008,
commit ID 2d3854a37e8b). Hence switch from the cpus_*() API to
the cpumask_*() API.

This patch has the intended side effect of not adding the "[key]"
property to cpumask sysfs attributes that contain the default
cpumask. The current code namely reads uninitialized bits on
systems where nr_cpu_ids < NR_CPUS because cpus_equal() compares
more bits than those that were set by cpumask_copy().

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5596 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-06-13 04:52:18 +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
Vladislav Bolkhovitin
416958ee4b iscsi-scst: One major number per thread pool
Assign one major number per thread pool instead of as many major
numbers as there are threads in a thread pool. Do not increment
'major' if thread pool allocation fails. Micro-optimize
iscsi_threads_pool_get() by eliminating the assignment to 'fn'
and the write via snprintf() into name[].

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5520 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-05-15 01:39:12 +00:00
Vladislav Bolkhovitin
8d4a2f0a49 Cleanups and logging improvements
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5503 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-05-06 23:22:32 +00:00
Bart Van Assche
cbc9df8306 iscsi-scst/kernel/patches/put_page_callback-3.2.57.patch: Add
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5450 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-04-20 06:24:23 +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
bbdf791c65 Update to kernels 3.14
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5432 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-04-18 00:32:51 +00:00
Vladislav Bolkhovitin
8599ec4452 Reimplement dropping of TM requests in a more reliable manner
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5395 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-26 23:51:36 +00:00
Vladislav Bolkhovitin
0c66b8aaf7 iscsi-scst: Introduce ARRAY_SIZE()
This patch 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@5386 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-26 03:21:25 +00:00
Bart Van Assche
cbb8071e73 put_page_callback-3.10.30.patch: Add
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5310 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-25 10:57:27 +00:00
Bart Van Assche
493f498b7b put_page_callback-3.12.11.patch: Add
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5309 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-25 10:55:36 +00:00
Vladislav Bolkhovitin
9ab22a69fd put_page_callback patch for 3.13.3+ kernels
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5296 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-20 05:54:49 +00:00
Vladislav Bolkhovitin
b4ba1b24c7 iscsi-scst: fix offset calculation
Fixed a subtle bug in iSCSI-SCST with incorrectly calculated offsets
for non-page aligned transfers. Originally discovered, investigated and
fix suggested by Кирилл Тюшев, then Shahar Salzman tested and proved it.
See http://sourceforge.net/mailarchive/message.php?msg_id=31924078



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5281 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-13 04:02:56 +00:00
Vladislav Bolkhovitin
e6fd59bda4 Update for 3.13 kernels
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5250 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-30 02:32:44 +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
1e897454b2 iscsi-scst/kernel/patches/rhel/put_page_callback-2.6.32-431.patch: put_page_callback patch for RHEL 6.5
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5171 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-12-22 10:02:54 +00:00
Vladislav Bolkhovitin
60d49c8451 Update for kernel 3.12
May be not completed, because this kernel has too many internal issues
reported after enabling "Kernel hacking" config options



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5163 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-12-19 05:15:48 +00:00
Bart Van Assche
7a82927e0a scripts/rebuild-rhel-kernel-rpm: Add RHEL 6.4 support
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5162 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-12-18 16:23:34 +00:00
Vladislav Bolkhovitin
81349d12a7 scst: Kernel >= 3.10 procfs build fix
The following procfs-related changes have been included in kernel 3.10:
- The PDE() macro has been removed from <linux/proc_fs.h>.
- The create_proc_entry() function has been removed.
- The proc_info field has been removed from struct scsi_host_template.

Unbreak the procfs build for kernel versions >= 3.10



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5148 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-12-18 05:58:09 +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
10840a381f A problem we are hitting is that we could hit a network issue
when a command/data is in the process of being sent. The snd
buffer space goes to zero and sendpage returns -EAGAIN. We then
wait for space to open. If space never opens then the cmd rsp timer
fires and the session/connection is dropped.

During that time we could try to send a nop as a ping, but it
is stuck behind that other command that got EAGAIN and we are
waiting for space to open to send them. We would expect the
nop in timer to fire before the cmd rsp timer, but it cannot
becuase the nop is sitting in the internal iscsi-scst queue.

This patch just has us start the timer ont he nop in right
away.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5091 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-11-09 03:02:59 +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