Commit Graph

5127 Commits

Author SHA1 Message Date
Bart Van Assche
bce22bf957 ib_srpt: Merge r7003 from trunk
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.2.x@7005 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-10-10 18:52:24 +00:00
Bart Van Assche
a2d9f08cd7 ib_srpt: Merge r6997:7001 from trunk
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.2.x@7002 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-10-10 18:15:33 +00:00
Vladislav Bolkhovitin
66ec1d73ab Blocked revisions 6969-6970,6973,6976,6978,6981 merged by Bart
........
  r6969 | bvassche | 2016-08-21 15:58:45 -0700 (Sun, 21 Aug 2016) | 1 line
  
  ib_srpt: Remove trailing whitespace
........
  r6970 | bvassche | 2016-08-21 15:59:16 -0700 (Sun, 21 Aug 2016) | 1 line
  
  ib_srpt: Address a checkpatch complaint about a missing space
........
  r6973 | bvassche | 2016-08-21 21:28:52 -0700 (Sun, 21 Aug 2016) | 2 lines
  
  isert-scst, srpt: Fix build on systems with kernel >= 4.2.0 + MOFED 3.3
........
  r6976 | bvassche | 2016-08-22 10:05:46 -0700 (Mon, 22 Aug 2016) | 1 line
  
  ib_srpt: Change unsigned into unsigned int
........
  r6978 | bvassche | 2016-08-23 08:43:25 -0700 (Tue, 23 Aug 2016) | 5 lines
  
  ib_srpt: More MOFED 3.3 fixes for kernel versions >= 4.6.0
  
  This is a slightly modified version of a patch from
  Israel Rukshin <israelr@mellanox.com>.
........
  r6981 | bvassche | 2016-08-28 09:27:43 -0700 (Sun, 28 Aug 2016) | 9 lines
  
  ib_srpt: Reduce default value of srpt_sq_size
  
  Reduce the default value of the srpt_sq_size kernel module
  parameter from 4096 to 256. This avoids on recent kernels
  (e.g. 4.1.0) QP creation causes swiotlb to complain about a
  failed allocation.
  
  Reported-by: Curtis Maloney <curtis@tinbrain.net>
........


git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.2.x@6996 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-10-07 23:22:56 +00:00
Bart Van Assche
69200308aa ib_srpt: Merge revisions 6932, 6969, 6970, 6973, 6976, 6978 and 6981 from trunk
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.2.x@6995 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-10-07 15:22:28 +00:00
Bart Van Assche
89089ec8e0 scstadmin: Fix version number
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.2.x@6987 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-10-04 05:11:53 +00:00
Israel Rukshin
377c61ddd0 Merged revisions 6934-6958 from trunk
------------------------------------------------------------------------
r6934 | mlx-storage | 2016-08-17 10:17:37 +0300 (Wed, 17 Aug 2016) | 4 lines

isert: make sure rdma_disconnect is called only once

------------------------------------------------------------------------
r6935 | mlx-storage | 2016-08-17 10:27:06 +0300 (Wed, 17 Aug 2016) | 8 lines

isert: fix cleaning isert_con_dev

------------------------------------------------------------------------
r6936 | mlx-storage | 2016-08-17 10:27:11 +0300 (Wed, 17 Aug 2016) | 4 lines

isert: add assertions for connection teardwon flow

------------------------------------------------------------------------
r6937 | mlx-storage | 2016-08-17 10:27:15 +0300 (Wed, 17 Aug 2016) | 8 lines

isert: fix a possible extra refcount put of isert connection

------------------------------------------------------------------------
r6938 | mlx-storage | 2016-08-17 10:27:19 +0300 (Wed, 17 Aug 2016) | 4 lines

isert: change wrong dev_conn bug on

------------------------------------------------------------------------
r6939 | mlx-storage | 2016-08-17 10:27:24 +0300 (Wed, 17 Aug 2016) | 6 lines

isert: fix fops ioctl using invalid conn

------------------------------------------------------------------------
r6940 | mlx-storage | 2016-08-17 10:27:28 +0300 (Wed, 17 Aug 2016) | 9 lines

isert: fix race between ioctl events and disconnect flow

------------------------------------------------------------------------
r6941 | mlx-storage | 2016-08-17 10:27:33 +0300 (Wed, 17 Aug 2016) | 7 lines

isert: fix isert conn refcount release at unreachable event

------------------------------------------------------------------------
r6942 | mlx-storage | 2016-08-17 10:27:38 +0300 (Wed, 17 Aug 2016) | 7 lines

isert: fix missing refcount cleanup at error flow

------------------------------------------------------------------------
r6943 | mlx-storage | 2016-08-17 10:27:43 +0300 (Wed, 17 Aug 2016) | 8 lines

isert: add assertion if send/recv was posted after post drain

------------------------------------------------------------------------
r6944 | mlx-storage | 2016-08-17 10:27:48 +0300 (Wed, 17 Aug 2016) | 4 lines

isert: replace kernel prints with scst macros

------------------------------------------------------------------------
r6945 | mlx-storage | 2016-08-17 10:27:53 +0300 (Wed, 17 Aug 2016) | 12 lines

isert: fix a race between timewait exit handler and poll cq

------------------------------------------------------------------------
r6946 | mlx-storage | 2016-08-17 10:27:57 +0300 (Wed, 17 Aug 2016) | 9 lines

isert: fix a race when drain wr is not the last flush

------------------------------------------------------------------------
r6947 | mlx-storage | 2016-08-17 10:28:02 +0300 (Wed, 17 Aug 2016) | 8 lines

isert: fix isert connection kref leak at estabished event handler

------------------------------------------------------------------------
r6948 | mlx-storage | 2016-08-17 10:28:06 +0300 (Wed, 17 Aug 2016) | 7 lines

isert: close isert connection earlier

------------------------------------------------------------------------
r6949 | mlx-storage | 2016-08-17 10:28:11 +0300 (Wed, 17 Aug 2016) | 4 lines

isert: change dev conn_lock spinlock to mutex

------------------------------------------------------------------------
r6950 | mlx-storage | 2016-08-17 10:28:16 +0300 (Wed, 17 Aug 2016) | 13 lines

isert: fix a race between calling to rdma_disconnect and connect flow

------------------------------------------------------------------------
r6951 | mlx-storage | 2016-08-17 10:28:20 +0300 (Wed, 17 Aug 2016) | 8 lines

isert: fix isert connection kref leak

------------------------------------------------------------------------
r6952 | mlx-storage | 2016-08-17 10:28:25 +0300 (Wed, 17 Aug 2016) | 9 lines

isert: faster release of isert_scst module

-----------------------------------------------------------------------
r6953 | mlx-storage | 2016-08-17 10:28:29 +0300 (Wed, 17 Aug 2016) | 9 lines

isert: fix races between conn fops read/write and disconnect flow

------------------------------------------------------------------------
r6954 | mlx-storage | 2016-08-17 10:28:34 +0300 (Wed, 17 Aug 2016) | 4 lines

isert: add missing fd put on error flow

------------------------------------------------------------------------
r6955 | mlx-storage | 2016-08-17 10:28:38 +0300 (Wed, 17 Aug 2016) | 9 lines

isert: fix working with freed conn object

------------------------------------------------------------------------
r6956 | mlx-storage | 2016-08-17 10:28:43 +0300 (Wed, 17 Aug 2016) | 8 lines

isert: fix isert conn cleanup when rdma_accept fails

------------------------------------------------------------------------
r6957 | mlx-storage | 2016-08-17 10:28:47 +0300 (Wed, 17 Aug 2016) | 7 lines

isert: add conn to portal conn list only if rdma_accept succeeded

------------------------------------------------------------------------
r6958 | mlx-storage | 2016-08-17 10:28:52 +0300 (Wed, 17 Aug 2016) | 4 lines

isert: fix redundant module put on error flow when handling connect request

------------------------------------------------------------------------

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.2.x@6966 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-21 09:36:18 +00:00
Vladislav Bolkhovitin
94e0d33e4f Merged revisions 6930-6933,6960-6961 via svnmerge from
svn://svn.code.sf.net/p/scst/svn/trunk

........
  r6930 | vlnb | 2016-08-02 19:49:31 -0700 (Tue, 02 Aug 2016) | 3 lines
  
  scst_vdisk: don't report unmap alignment, if it is equal to unmap granularity
........
  r6931 | bvassche | 2016-08-08 13:52:00 -0700 (Mon, 08 Aug 2016) | 1 line
  
  scst/README.dlm: Update startup sequence information
........
  r6932 | bvassche | 2016-08-09 13:18:03 -0700 (Tue, 09 Aug 2016) | 5 lines
  
  srpt/Testing.txt: Leave out --norandommap
  
  --verify and --norandommap are mutually exclusive. Hence leave out
  --norandommap.
........
  r6933 | bvassche | 2016-08-11 11:36:48 -0700 (Thu, 11 Aug 2016) | 1 line
  
  scst/README.dlm: Correct instructions for waiting for logout
........
  r6960 | vlnb | 2016-08-19 18:24:03 -0700 (Fri, 19 Aug 2016) | 3 lines
  
  scst: fix compilation on older kernels
........
  r6961 | vlnb | 2016-08-19 18:33:47 -0700 (Fri, 19 Aug 2016) | 5 lines
  
  scst README: add section about VMware and Ceph RBD space reclaim
........


git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.2.x@6964 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-20 02:05:18 +00:00
Vladislav Bolkhovitin
533548a7ef Fix svnmerge-integrated
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.2.x@6963 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-20 02:00:42 +00:00
Vladislav Bolkhovitin
9a75e25b9d Initialized merge tracking via "svnmerge" with revisions "6928" from
svn://svn.code.sf.net/p/scst/svn/trunk


git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.2.x@6929 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-03 02:36:29 +00:00
Vladislav Bolkhovitin
1284dc5414 Version update
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.2.x@6926 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-03 02:24:57 +00:00
Vladislav Bolkhovitin
d25c11ef15 Create 3.2.x stable branch
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.2.x@6925 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-03 02:16:44 +00:00
Vladislav Bolkhovitin
f125a4e9bf scst: Update README.dlm
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6921 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-03 01:43:24 +00:00
Bart Van Assche
a5f67cd1f2 scst_dlm: Instantiate lockspace as soon as cluster mode is enabled
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6920 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-02 16:31:00 +00:00
Bart Van Assche
d41a3a3cc9 /etc/init.d/scst: Make this script work on recent versions of Ubuntu Linux
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6919 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-07-26 17:26:17 +00:00
Vladislav Bolkhovitin
cde21c669a scst: small post-r6913 cleanup
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6918 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-07-26 02:04:34 +00:00
Vladislav Bolkhovitin
244271120e iscsi-scst: increase past CmdSN window to 2048
On modern storage there might be more, than 128, commands queued, so
previous CmdSN window might be too small and on unstable networks lead
to infinite retries. For more infor see thread
https://sourceforge.net/p/scst/mailman/message/35238904.

Reported-By: Lev Vainblat <lev@zadarastorage.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6917 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-07-26 01:42:26 +00:00
Bart Van Assche
1a24483678 scst.h: Move more code to <scst/backport.h>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6916 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-07-25 21:16:49 +00:00
Bart Van Assche
0a3d69c31b scst_vdisk: Fix spelling of "reopening"
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6915 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-07-25 17:03:06 +00:00
Bart Van Assche
18ccf50b87 scst_pres: Save APTPL PR info on both nodes
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6914 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-07-22 16:51:07 +00:00
Bart Van Assche
e2b03a7836 scst_pres: Modify scst_pr_sync_device_file() function prototype
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6913 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-07-22 16:50:31 +00:00
Bart Van Assche
17f49dbede scst_dlm: Initialize reg->dlm_idx for PR information loaded from disk
This patch avoids that the following kernel warning appears while
starting SCST after having loaded APTPL PR information:

WARNING: scst/src/scst_dlm.c:461 scst_copy_to_dlm()

Reported-by: <consus@gmx.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6912 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-07-22 16:48:38 +00:00
Vladislav Bolkhovitin
ff3b499a4c scst: fix perf build
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6911 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-07-15 01:23:38 +00:00
Vladislav Bolkhovitin
f2da0cec29 README.dlm: update ToDo to reflect recently discovered APTL issue
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6910 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-07-14 01:33:20 +00:00
Vladislav Bolkhovitin
aea4052085 README.dlm update to refer to LVB truncation prevention patch
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6909 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-07-13 23:24:41 +00:00
Vladislav Bolkhovitin
0c2fd8e564 iscsi-scst: handle a case in target_del() where the target was already freed
target_del() calls handle_iscsi_events() which may recursively call target_del().
The 1st target_del() may resume its execution after the target object was already freed.

Signed-off-by: Erez Zilber <erezzi.list@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6908 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-07-02 01:42:49 +00:00
Vladislav Bolkhovitin
aa18a4bcb5 Logginf cleanup
1. Make PR logging available in the release mode
2. Make /sys/kernel/scst_tgt/trace_level reflect currently available logging
3. Cleanup unused log levels from /sys/kernel/scst_tgt/trace_level

Suggested-by: Consus <consus@gmx.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6907 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-07-02 01:40:48 +00:00
Vladislav Bolkhovitin
55bb0206cd scst: when checking the status of the service, also check if all daemons are running
Signed-off-by: Erez Zilber <erezzi.list@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6906 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-06-30 04:10:38 +00:00
Vladislav Bolkhovitin
4092e26bba scst: fix possible error path crash in debug mode
It could happen, if a non-pass-through dev handler erroneously returned
SCST_EXEC_NOT_COMPLETED and TRAGE_DBG() statements enabled in debug mode.

Reported-by: Jeff Goldszer <jeff.goldszer@alebra.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6905 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-06-30 04:05:14 +00:00
Vladislav Bolkhovitin
528f5e0004 Makefiles/Kconfigs for kernels 4.5 and 4.6
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6904 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-06-25 00:56:09 +00:00
Vladislav Bolkhovitin
d4e2c4b12e We found this bug when we add ZFS zvol to vdisk_blockio, remove it from copy
manager, and change ALUA state. After that the zvol would be in constant busy
state, even if we remove all scst modules.

The problem is that blockio_on_alua_state_change_finish will unconditionally
vdisk_open_fd. But for the above mentioned case, tgt_dev_cnt will be zero, so
the fd is permanently leaked. We fix this by only do vdisk_open_fd when
tgt_dev_cnt is not zero.

Signed-off-by: Chunwei Chen <david.chen@osnexus.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6902 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-06-22 02:02:41 +00:00
Bart Van Assche
e7603fc7a7 ib_srpt: Start with comp_vector 0
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6901 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-06-09 22:18:10 +00:00
Bart Van Assche
da83a4a9a4 ib_srpt: Serialize sport->port_id accesses
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6900 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-06-09 21:39:45 +00:00
Bart Van Assche
0d3c65105a ib_srpt: Remove a duplicate comment
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6899 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-06-09 21:39:15 +00:00
Bart Van Assche
a6f0551eef ib_srpt: Introduce srpt_init_sport()
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6898 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-06-09 21:14:29 +00:00
Bart Van Assche
1b8ba2f3cb ib_srpt: Add link_layer and port_id sysfs attributes
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6897 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-06-09 21:03:34 +00:00
Bart Van Assche
0556c29fdd ib_srpt: Port to Linux kernel v4.7
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6896 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-06-08 21:19:24 +00:00
Vladislav Bolkhovitin
353d1f1928 scst: update README how to configure SCST, so VMware start using EXTENDED COPY between datastores
Based on information from Artur Piechocki <artur.piechocki@open-e.com>
Tested-By: Isaac Goldbaum <isaac.goldbaum@mail.ru>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6892 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-05-27 01:02:11 +00:00
Bart Van Assche
d15d5773a7 scst, iscsi-scst, scstadmin: Spell successful and unsuccessful correctly
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6891 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-05-07 04:30:46 +00:00
Vladislav Bolkhovitin
186369a472 scst: add possibility of polling + few minor doc cleanups
See README diff for more details



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6890 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-05-07 00:49:43 +00:00
Vladislav Bolkhovitin
21559f7798 qla2x00t: clarify that NPIV is not supported in this version
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6889 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-05-07 00:47:57 +00:00
Vladislav Bolkhovitin
c0cce7b6f5 scst: follow up to r6886
Change local and more global queue priority ratio to 2:1



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6888 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-05-06 03:51:21 +00:00
Vladislav Bolkhovitin
7fe7405277 cleanup: remove support of old kernels without cancel_delayed_work_sync
Otherwise we can not use scst_mutex on works



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6887 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-05-06 02:20:41 +00:00
Vladislav Bolkhovitin
355fa36d34 scst, EXPERIMENTAL: improve commands CPU affinity
Now commands on the fast path processed by the same thread throughout
all its lifetime.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6886 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-05-06 01:53:30 +00:00
Vladislav Bolkhovitin
fcb8b3c75e Make copy manager update internal data on INQUIRY changing vdisk events
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6885 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-05-05 01:53:17 +00:00
Vladislav Bolkhovitin
5ba4e1a707 scst_vdisk: extend vend_specific_id to 128 bytes
From Adrian Saul <Adrian.Saul@tpgtelecom.com.au>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6884 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-05-04 02:47:33 +00:00
Vladislav Bolkhovitin
33627cc8d8 When trying to remove a megaraid_sas device, the scst will hang inside
scst_free_device:

[  380.448608] [4]: scst: Detached from scsi0, channel 2, id 1, lun 0, type 0
[  601.138688] INFO: task kworker/0:0:4 blocked for more than 120 seconds.
[  601.138756]       Tainted: P           OE  3.19.0-58-quantastor #64~14.04.1
[  601.138810] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  601.138869] kworker/0:0     D ffff88085c6fba58     0     4      2 0x00000000
[  601.138926] Workqueue: events megasas_aen_polling [megaraid_sas]
[  601.138930]  ffff88085c6fba58 ffff88085c6f09d0 0000000000013e80 ffff88085c6fbfd8
[  601.138934]  0000000000013e80 ffffffff81c1d4e0 ffff88085c6f09d0 ffff88085c6fba38
[  601.138938]  ffff88085c6fbbd8 7fffffffffffffff ffff88085c6fbbd0 ffff88085c6f09d0
[  601.138942] Call Trace:
[  601.138955]  [<ffffffff817b5469>] schedule+0x29/0x70
[  601.138960]  [<ffffffff817b8574>] schedule_timeout+0x244/0x2c0
[  601.138968]  [<ffffffff8115fbcb>] ? irq_work_queue+0x6b/0x90
[  601.138975]  [<ffffffff810cb8e2>] ? wake_up_klogd+0x32/0x40
[  601.138979]  [<ffffffff810cbaf8>] ? console_unlock+0x208/0x480
[  601.138983]  [<ffffffff817b61c4>] wait_for_completion+0xa4/0x170
[  601.138989]  [<ffffffff810a1ea0>] ? wake_up_state+0x20/0x20
[  601.138995]  [<ffffffff8108d94c>] flush_workqueue+0x10c/0x5b0
[  601.139002]  [<ffffffff8108de05>] flush_scheduled_work+0x15/0x20
[  601.139044]  [<ffffffffc09314f6>] scst_free_device+0x16/0x50 [scst]
[  601.139051]  [<ffffffffc091a86f>] scst_remove+0x2df/0x3a0 [scst]
[  601.139056]  [<ffffffffc028c093>] ? enclosure_find+0x93/0xa0 [enclosure]
[  601.139061]  [<ffffffff814f3971>] device_del+0xe1/0x270
[  601.139062]  [<ffffffff814f3b22>] device_unregister+0x22/0x70
[  601.139066]  [<ffffffff815549ab>] __scsi_remove_device+0xbb/0xd0
[  601.139068]  [<ffffffff815549e6>] scsi_remove_device+0x26/0x40
[  601.139074]  [<ffffffffc039fb22>] megasas_aen_polling+0x362/0x610 [megaraid_sas]
[  601.139076]  [<ffffffff8108eeaf>] process_one_work+0x14f/0x440
[  601.139077]  [<ffffffff8108fab8>] worker_thread+0x118/0x510
[  601.139079]  [<ffffffff8108f9a0>] ? rescuer_thread+0x3d0/0x3d0
[  601.139082]  [<ffffffff81094b49>] kthread+0xc9/0xe0
[  601.139084]  [<ffffffff81094a80>] ? kthread_create_on_node+0x1c0/0x1c0
[  601.139087]  [<ffffffff817b9798>] ret_from_fork+0x58/0x90
[  601.139089]  [<ffffffff81094a80>] ? kthread_create_on_node+0x1c0/0x1c0

The problem is that scst_free_device will call flush_scheduled_work to wait
for ext_blockers_work, but scst_free_device itself is called from
schedule_work, thus creating deadlock.

Instead of using heavy-handed flush_scheduled_work, we use flush_work to wait
for ext_blockers_work to finish.

Signed-off-by: Chunwei Chen <david.chen@osnexus.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6883 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-05-04 02:43:06 +00:00
Bart Van Assche
5f59850096 scst_sysfs, LUN replacement: Initialize 'read_only' before using it
See also r6834.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6882 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-05-01 22:41:20 +00:00
Bart Van Assche
76b20c76b8 isert: fix race between teardown flow and connect flow
It is possible to get ESTABLISHED RDMACM event while the connection
is already started teardown flow (i.e. addr change).
At teardown the refcount is reduced to zero and we start releasing the
connection. In established event We need to check conn is not in teardown
flow by checking its ref count is not 0.

Signed-off-by: Israel Rukshin <israelr@mellanox.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6879 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-04-26 14:13:33 +00:00
Bart Van Assche
07bc4bb1af isert: clean tmo timer when freeing the connection
The tmo timer is set when allocating a new connection.
We need to release it in case it didn't execute yet.
Else timer execution will lead to a NULL dereference bug on conn.

Signed-off-by: Israel Rukshin <israelr@mellanox.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6878 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-04-26 14:13:13 +00:00
Bart Van Assche
0283a854ed isert: wait for RDMA CM event to complete before destroy resources
There is a race between RDMACM event handler and isert_conn_free.
The event handler use the connection resources and isert_conn_free
destroy them.
This commit fix multiple NULL dereference bugs.

Signed-off-by: Israel Rukshin <israelr@mellanox.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6877 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-04-26 14:12:47 +00:00