Commit Graph

371 Commits

Author SHA1 Message Date
Yan Burman
3c98b77b00 Merged revision 5741 from iser branch
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.0.x-iser@5742 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-08-31 11:44:38 +00:00
Yan Burman
e8f0d9af09 Merged revisions 5671,5687-5697,5723 via svnmerge from
svn+ssh://yanb123@svn.code.sf.net/p/scst/svn/branches/3.0.x

................
  r5671 | bvassche | 2014-07-10 09:27:29 +0300 (Thu, 10 Jul 2014) | 1 line
  
  scst: Create /var/lib/scst/pr and /var/lib/scst/vdev_mode_pages during installation (merge r5669 and r5670 from trunk)
................
  r5687 | bvassche | 2014-07-20 08:59:31 +0300 (Sun, 20 Jul 2014) | 1 line
  
  iscsi-scst: Handle data buffers with non-zero offset correctly (merge r5683 from trunk)
................
  r5688 | bvassche | 2014-07-20 09:01:49 +0300 (Sun, 20 Jul 2014) | 1 line
  
  Makefile: Only report which RPMs have been built if "make rpm" is run as a non-privileged user (merge r5560 from trunk)
................
  r5689 | bvassche | 2014-07-20 09:03:55 +0300 (Sun, 20 Jul 2014) | 1 line
  
  fcst: Remove an unused variable (merge r5605 from trunk)
................
  r5690 | bvassche | 2014-07-20 09:04:43 +0300 (Sun, 20 Jul 2014) | 1 line
  
  fcst: Move exch_done() calls into ft_cmd_done() (merge r5606 from trunk)
................
  r5691 | bvassche | 2014-07-20 09:05:27 +0300 (Sun, 20 Jul 2014) | 1 line
  
  fcst: Handle frame send failures properly (merge r5607 from trunk)
................
  r5692 | bvassche | 2014-07-20 09:07:57 +0300 (Sun, 20 Jul 2014) | 1 line
  
  qla2x00t: Documentation / source code comment / log messages spelling fix (merge r5555 from trunk)
................
  r5693 | bvassche | 2014-07-20 09:46:28 +0300 (Sun, 20 Jul 2014) | 1 line
  
  scst: Make lockdep_assert_held() easier to use (merge r5573 from trunk)
................
  r5694 | bvassche | 2014-07-20 09:47:58 +0300 (Sun, 20 Jul 2014) | 1 line
  
  scst: Leave out FSF mail address (merge r5572 from trunk)
................
  r5695 | bvassche | 2014-07-20 09:52:12 +0300 (Sun, 20 Jul 2014) | 1 line
  
  Change BUG_ON(1) into BUG() (merge r5618 from trunk)
................
  r5696 | bvassche | 2014-07-20 09:54:00 +0300 (Sun, 20 Jul 2014) | 1 line
  
  iscsi-scst: Suppress a compiler warning (merge r5614 from trunk)
................
  r5697 | bvassche | 2014-07-20 10:03:04 +0300 (Sun, 20 Jul 2014) | 1 line
  
  scst/include/scst.h: Define lockdep_assert_held() only once (follow-up for r5693)
................
  r5723 | vlnb | 2014-08-21 08:21:55 +0300 (Thu, 21 Aug 2014) | 11 lines
  
  Merged revisions 5721 via svnmerge from 
  svn+ssh://vlnb@svn.code.sf.net/p/scst/svn/trunk
  
  ........
    r5721 | vlnb | 2014-08-20 22:17:47 -0700 (Wed, 20 Aug 2014) | 5 lines
    
    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/branches/3.0.x-iser@5739 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-08-27 13:49:04 +00:00
Yan Burman
b990f13496 Merged revisions 5564-5565,5580,5591,5599,5604,5623,5632-5638,5645-5646,5652-5653 via svnmerge from
svn+ssh://yanb123@svn.code.sf.net/p/scst/svn/branches/3.0.x

................
  r5564 | vlnb | 2014-06-04 06:10:31 +0300 (Wed, 04 Jun 2014) | 3 lines
  
  Initialize merging from the trunk
................
  r5565 | vlnb | 2014-06-04 06:12:05 +0300 (Wed, 04 Jun 2014) | 13 lines
  
  Merged revisions 5543,5545 via svnmerge from 
  svn+ssh://vlnb@svn.code.sf.net/p/scst/svn/trunk
  
  ........
    r5543 | bvassche | 2014-05-23 00:33:53 -0700 (Fri, 23 May 2014) | 1 line
    
    RHEL 7 build fixes
  ........
    r5545 | bvassche | 2014-05-23 01:36:36 -0700 (Fri, 23 May 2014) | 1 line
    
    scripts/rebuild-rhel-kernel-rpm: Add RHEL 7 RC support
  ........
................
  r5580 | bvassche | 2014-06-11 17:33:30 +0300 (Wed, 11 Jun 2014) | 1 line
  
  ib_srpt: Merge build and login fixes from trunk
................
  r5591 | vlnb | 2014-06-12 02:52:43 +0300 (Thu, 12 Jun 2014) | 14 lines
  
  Merged revisions 5584 via svnmerge from 
  svn+ssh://vlnb@svn.code.sf.net/p/scst/svn/trunk
  
  ........
    r5584 | vlnb | 2014-06-11 12:33:18 -0700 (Wed, 11 Jun 2014) | 8 lines
    
    scst: RHEL 5 build fix
    
    Avoid that building the scst kernel module fails on RHEL 5 due to
    a missing kvasprintf() implementation.
    
    Signed-off-by: Bart Van Assche <bvanassche@acm.org>
  ........
................
  r5599 | bvassche | 2014-06-13 09:59:13 +0300 (Fri, 13 Jun 2014) | 1 line
  
  ib_srpt: Merge from trunk
................
  r5604 | vlnb | 2014-06-14 03:31:55 +0300 (Sat, 14 Jun 2014) | 14 lines
  
  Merged revisions 5602 via svnmerge from 
  svn+ssh://vlnb@svn.code.sf.net/p/scst/svn/trunk
  
  ........
    r5602 | vlnb | 2014-06-13 16:57:26 -0700 (Fri, 13 Jun 2014) | 8 lines
    
    scst_pr_read_reservation(): Initialize returned buffer
    
    Avoid that this function returns an uninitialized buffer to the
    initiator if buffer_size < 8. Detected by Coverity.
    
    Signed-off-by: Bart Van Assche <bvanassche@acm.org>
  ........
................
  r5623 | vlnb | 2014-06-25 07:00:14 +0300 (Wed, 25 Jun 2014) | 9 lines
  
  Merged revisions 5610 via svnmerge from 
  svn+ssh://vlnb@svn.code.sf.net/p/scst/svn/trunk
  
  ........
    r5610 | vlnb | 2014-06-18 20:51:48 -0700 (Wed, 18 Jun 2014) | 3 lines
    
    Update for 3.15 kernels
  ........
................
  r5632 | bvassche | 2014-06-29 08:18:01 +0300 (Sun, 29 Jun 2014) | 1 line
  
  scst_vdisk: 32-bit build fix (merge r5629 from trunk)
................
  r5633 | bvassche | 2014-06-29 08:20:31 +0300 (Sun, 29 Jun 2014) | 1 line
  
  ib_srpt: Remove existing ib_srpt.ko kernel modules before installation (merge r5621, r5628 and r5630 from trunk)
................
  r5634 | bvassche | 2014-06-29 08:22:58 +0300 (Sun, 29 Jun 2014) | 1 line
  
  Skip "depmod" while building an RPM (merge r5612 from trunk)
................
  r5635 | bvassche | 2014-06-29 08:24:11 +0300 (Sun, 29 Jun 2014) | 1 line
  
  ib_srpt: Set SCSI residual fields in SRP_CMD reply (merge r5622 from trunk)
................
  r5636 | bvassche | 2014-06-29 08:25:55 +0300 (Sun, 29 Jun 2014) | 1 line
  
  nightly build: Add kernel 3.15 build infrastructure (merge r5611 from trunk)
................
  r5637 | bvassche | 2014-06-29 08:27:14 +0300 (Sun, 29 Jun 2014) | 1 line
  
  regression tests: Sort hash keys before comparing (merge r5582 from trunk)
................
  r5638 | bvassche | 2014-06-29 08:28:45 +0300 (Sun, 29 Jun 2014) | 1 line
  
  regression tests: Sync with a recent sysfs change (merge r5581 from trunk)
................
  r5645 | bvassche | 2014-06-29 09:00:05 +0300 (Sun, 29 Jun 2014) | 1 line
  
  nightly build, scripts: Merge from trunk (r5533:r5642)
................
  r5646 | bvassche | 2014-06-29 09:10:22 +0300 (Sun, 29 Jun 2014) | 2 lines
  
  scst: Switch from the cpu_*() to the cpumask_*() API (merge r5596 from trunk)
................
  r5652 | bvassche | 2014-06-30 13:23:11 +0300 (Mon, 30 Jun 2014) | 1 line
  
  nightly build: Merge r5642:r5651 from trunk
................
  r5653 | bvassche | 2014-06-30 13:25:24 +0300 (Mon, 30 Jun 2014) | 1 line
  
  scst: Build fixes for kernel versions <= 2.6.34 (merge r5647 and r5648 from trunk)
................


git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.0.x-iser@5665 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-07-07 10:28:33 +00:00
Yan Burman
36c28d69b4 Merge iser branch
Merged revisions:
5228-5237,5243-5245,5257-5259,5261-5263,5278-5280,5297-5299,5313-5314,5317-5319,5327-5328,5341-5343,5453,5486,5519,5528-5531,5559,5576,5655-5656,5660




git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.0.x-iser@5663 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-07-07 06:40:57 +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
Vladislav Bolkhovitin
b96ab2a8bf iscsi-scst: Fix a race condition triggered by logout
This patch fixes the following crash:

general protection fault: 0000 [#1] PREEMPT SMP
Modules linked in: scst_local(O) iscsi_scst(O) scst_vdisk(O) libcrc32c scst(O) brd netconsole target_core_mod configfs fcoe libfcoe libfc scsi_transport_fc scsi_tgt ib_iser rdma_cm ib_addr iw_cm ib_cm ib_sa ib_mad ib_core iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi aesni_intel aes_x86_64 glue_he
lper parport_pc ppdev lrw gf128mul ablk_helper cryptd joydev microcode mperf psmouse i2c_piix4 processor button intel_agp intel_gtt agpgart lp parport hid_generic usbhid hid ext4 jbd2 mbcache floppy ata_piix
CPU: 0 PID: 7735 Comm: iscsiwr3 Tainted: G           O 3.11.0-debug+ #1
Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
task: ffff88000850cfc0 ti: ffff88002ea5c000 task.ti: ffff88002ea5c000
RIP: 0010:[<ffffffffa038dd7b>]  [<ffffffffa038dd7b>] target_del_all_sess+0x9b/0x180 [iscsi_scst]
RSP: 0018:ffff88002ea5dcc0  EFLAGS: 00010286
RAX: 00000000fffffffe RBX: dead0000000fefc0 RCX: 0000000000000001
RDX: ffff88000e609460 RSI: 001e00004f011780 RDI: ffff88000e609460
RBP: ffff88002ea5dce8 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: ffff88000e6093b0
R13: ffff88000e609460 R14: 0000000000000000 R15: ffff88003e948158
FS:  0000000000000000(0000) GS:ffff88000f800000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000427248 CR3: 0000000036d64000 CR4: 00000000000407f0
Stack:
 ffff88000e6093b0 ffff88003e85d600 ffff88003e948000 0000000000000030
 0000000000000000 ffff88002ea5dd28 ffffffffa038002b 0000000000000001
 ffff88003e55f880 ffff88002ea5dd28 ffffffffa0384d13 ffff88003e948000
Call Trace:
 [<ffffffffa038002b>] cmnd_tx_end+0x1db/0x1e0 [iscsi_scst]
 [<ffffffffa0384d13>] ? iscsi_do_send+0x23/0x60 [iscsi_scst]
 [<ffffffffa0385021>] iscsi_send+0x2d1/0x480 [iscsi_scst]
 [<ffffffff8104a802>] ? local_bh_enable_ip+0x82/0x110
 [<ffffffffa0380e8f>] ? conn_get+0x1f/0x70 [iscsi_scst]
 [<ffffffffa0385290>] scst_do_job_wr+0xc0/0x2d0 [iscsi_scst]
 [<ffffffffa038560d>] istwr+0x16d/0x2e0 [iscsi_scst]
 [<ffffffff8106a2e0>] ? wake_up_bit+0x40/0x40
 [<ffffffffa03854a0>] ? scst_do_job_wr+0x2d0/0x2d0 [iscsi_scst]
 [<ffffffff81069ea6>] kthread+0xd6/0xe0
 [<ffffffff81069dd0>] ? kthread_create_on_node+0x110/0x110
 [<ffffffff814debfc>] ret_from_fork+0x7c/0xb0
Code: 00 00 49 8b 94 24 b0 00 00 00 48 8b 1a 48 8d b2 c0 ee ff ff 48 81 eb 40 11 00 00 49 39 d5 74 28 44 89 f2 4c 89 e7 e8 15 fd ff ff <48> 8b 8b 40 11 00 00 48 89 de 48 8d 93 40 11 00 00 49 39 d5 48
[  474.156827] RIP  [<ffffffffa038dd7b>] target_del_all_sess+0x9b/0x180 [iscsi_scst]
 RSP <ffff88002ea5dcc0>

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5019 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-10-03 05:04:15 +00:00
Vladislav Bolkhovitin
844e194647 Update for kernels 3.11.x
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5004 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-09-28 04:23:45 +00:00
Vladislav Bolkhovitin
719b8be3f7 Fix incorrect logging of negotiated data digest
Reported by Klaus Hochlehnert <Mailings@kh-dev.de>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5003 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-09-28 04:04:47 +00:00
Bart Van Assche
75f9be4b34 iscsi-scst: Spelling fix - change dublicate into duplicate
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4926 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-07-29 10:43:00 +00:00
Vladislav Bolkhovitin
2e9540c902 Update for kernel 3.10
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4921 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-07-25 23:38:31 +00:00
Bart Van Assche
88ae3b7c78 iSCSI-SCST: Fix a sparse warning introduced via r4852
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4854 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-05-18 15:48:17 +00:00
Vladislav Bolkhovitin
9b674796d6 Update to kernel 3.9
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4853 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-05-18 03:41:04 +00:00
Vladislav Bolkhovitin
2093dd7561 Make it possible to forcibly close SRP and FC sessions via sysfs
That patch contains the following changes:
* Move the code for creating a "close_sess" sysfs attribute from iscsi-scst to
  the SCST core such that it becomes available for other target drivers. This
  does not change the functionality of iscsi-scst.
* Add code in ib_srpt and qla2x00t to allow a session to be forcibly closed from
  user space.

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




git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4852 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-05-18 00:52:46 +00:00
Vladislav Bolkhovitin
82f7d66e5e Cleanup: remove unused variable
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4810 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-25 23:03:05 +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
9ea9eec4ef Cleanups and minor fixes
Suggested by Manfred_Knick <Manfred.Knick@T-Online.de>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4790 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-08 21:00:09 +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
79bf4e77c6 Update for 3.8 kernels
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4768 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-02-23 00:44:56 +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
b3908d7447 Wrong task attribute isn't error, so warning message should be issued instead
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4753 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-02-04 23:55:34 +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
Bart Van Assche
2a50de2e4e iscsi-scst: Build fix for kernels 3.6.1..3.6.10
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4646 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-12-18 08:22:05 +00:00
Vladislav Bolkhovitin
299c407697 Update for kernel 3.7
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4645 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-12-17 23:09:58 +00:00