svn+ssh://svn.code.sf.net/p/scst/svn/trunk
........
r7096 | bvassche | 2017-02-23 18:08:17 -0800 (Thu, 23 Feb 2017) | 4 lines
scst_copy_mgr: Avoid that LUN removal triggers a BUG()
Reported-by: Jinpu Wang <jinpu.wang@profitbricks.com>
........
r7101 | bvassche | 2017-03-01 07:31:59 -0800 (Wed, 01 Mar 2017) | 20 lines
scst_vdisk: Avoid that LUN refresh triggers a general protection fault
Avoid that triggering LUN referesh concurrently with device deletion
triggers the following:
general protection fault: 0000 [#1]
Workqueue: events vdev_inq_changed_fn [scst_vdisk]
Call Trace:
_raw_spin_lock_bh+0x2b/0x30
scst_cm_update_dev+0x87/0x190 [scst]
scst_dev_inquiry_data_changed+0xfb/0x1b0 [scst]
vdev_inq_changed_fn+0x60/0x120 [scst_vdisk]
process_one_work+0x14d/0x410
worker_thread+0x66/0x460
kthread+0xdb/0x100
ret_from_fork+0x3f/0x70
Reported-by: Jinpu Wang <jinpu.wang@profitbricks.com>
Tested-by: Jinpu Wang <jinpu.wang@profitbricks.com>
........
r7104 | vlnb | 2017-03-07 20:36:45 -0800 (Tue, 07 Mar 2017) | 5 lines
Linux kernel v4.10 build fix.
Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
........
r7106 | bvassche | 2017-04-11 11:48:36 -0700 (Tue, 11 Apr 2017) | 4 lines
ib_srpt: Ensure that the BUG_ON() argument has no side effects
Reported-by: David Butterfield <dab21774@gmail.com>
........
r7107 | vlnb | 2017-04-13 15:04:07 -0700 (Thu, 13 Apr 2017) | 7 lines
The argument to sleep() would get "promoted" to an integer with value zero.
- sleep(0.1);
+ usleep(100*1000);
Signed-off-by: David Butterfield <dab21774@gmail.com>
........
r7108 | vlnb | 2017-04-13 15:30:25 -0700 (Thu, 13 Apr 2017) | 6 lines
create_and_open_dev() returns a (-errno), so the "if (iser_fd...)" check should
detect *any* negative return value as a case when fd should be set to -1.
Signed-off-by: David Butterfield <dab21774@gmail.com>
........
r7109 | vlnb | 2017-04-13 15:38:38 -0700 (Thu, 13 Apr 2017) | 8 lines
Change memcpy() to strncpy() because the source name string is not guaranteed
to exist as valid addressable memory beyond the NULL byte.
Signed-off-by: David Butterfield <dab21774@gmail.com>
with small addition to force set last byte NULL
........
r7110 | vlnb | 2017-04-13 16:02:18 -0700 (Thu, 13 Apr 2017) | 7 lines
Thre is potential buffer overflow in iscsi_session_alloc() due to
short computation of needed string size. Notice the "%s@%s" in the first call
to sprintf().
Signed-off-by: David Butterfield <dab21774@gmail.com>
........
r7111 | vlnb | 2017-04-13 16:12:46 -0700 (Thu, 13 Apr 2017) | 8 lines
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>
........
r7115 | vlnb | 2017-04-13 16:37:13 -0700 (Thu, 13 Apr 2017) | 12 lines
scst: fix memory leak in scst_proc_group_add()
Valgrind noticed that the "name" allocated in scst_proc_group_add() was
leaking. It turns out that scst_alloc_add_acg makes its own copy of the name
passed to it from this code, making the string duplication done here redundant
(and leaky). The change eliminates the string duplication (along with all its
associated error handling logic) and simply passes the (unowned) incoming
string down for duplication below.
Signed-off-by: David Butterfield <dab21774@gmail.com>
........
r7116 | vlnb | 2017-04-13 16:39:14 -0700 (Thu, 13 Apr 2017) | 7 lines
scst_vdisk: fix memory leak in vdisk_write_proc()
Another leak valgrind popped out, this one in vdisk_write_proc().
Signed-off-by: David Butterfield <dab21774@gmail.com>
........
r7117 | vlnb | 2017-04-13 16:41:14 -0700 (Thu, 13 Apr 2017) | 9 lines
scst: take scst_mutex before calling scst_del_free_acg() in exit_scst()
scst_del_free_acg() does lockdep_assert_held(&scst_mutex), so we'd better take
the lock before calling it.
Signed-off-by: David Butterfield <dab21774@gmail.com>
........
r7118 | vlnb | 2017-04-13 16:42:51 -0700 (Thu, 13 Apr 2017) | 8 lines
scst: take scst_mutex before calling scst_del_free_acg() in scst_proc_cleanup_module()
Take lock before a call that ends up at the lockdep_assert_held() in
scst_del_free_acg() without locking.
Signed-off-by: David Butterfield <dab21774@gmail.com>
........
r7125 | vlnb | 2017-04-13 18:17:45 -0700 (Thu, 13 Apr 2017) | 6 lines
extraclean does "rm tags cscope.out"
Signed-off-by: David Butterfield <dab21774@gmail.com>
........
r7134 | vlnb | 2017-04-17 20:57:12 -0700 (Mon, 17 Apr 2017) | 5 lines
iscsi-scst: replace strncpy() by strlcpy()
Follow up for r7109: strlcpy() is more appropriate in this place.
........
r7135 | vlnb | 2017-04-17 21:02:44 -0700 (Mon, 17 Apr 2017) | 5 lines
fcst: Linux kernel v4.10 build fix
Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
........
r7136 | vlnb | 2017-04-17 21:06:18 -0700 (Mon, 17 Apr 2017) | 5 lines
scst: avoid possible side effect with WARN_ON_ONCE()
Reported-By: David Butterfield <dab21774@gmail.com>
........
r7137 | vlnb | 2017-04-18 20:44:20 -0700 (Tue, 18 Apr 2017) | 5 lines
fileio_tgt: change "#if DEBUG_TM_FN_IGNORE" to "#ifdef ..."
Signed-off-by: David Butterfield <dab21774@gmail.com>
........
r7139 | vlnb | 2017-04-20 18:02:25 -0700 (Thu, 20 Apr 2017) | 7 lines
iscsi-scstd: replace signal() with sigaction()
Replace signal() with sigaction() for validity in a multithreaded process
Signed-off-by: David Butterfield <dab21774@gmail.com>
........
r7141 | vlnb | 2017-04-20 18:11:37 -0700 (Thu, 20 Apr 2017) | 7 lines
scst: set file size for NULLIO in PROCFS build
The file size wasn't getting set for NULLIO with /proc support
Signed-off-by: David Butterfield <dab21774@gmail.com>
........
r7143 | vlnb | 2017-04-20 18:32:07 -0700 (Thu, 20 Apr 2017) | 9 lines
iscsi-scst: fix ENOMEM path
In an error path in iscsi_threads_pool_get(), when a new pool cannot be
allocated, if there is a pool on iscsi_thread_pools_list, it passes that back as
an alternative, so return zero in that case.
Signed-off-by: David Butterfield <dab21774@gmail.com>
........
r7152 | bvassche | 2017-04-26 16:53:11 -0700 (Wed, 26 Apr 2017) | 5 lines
scst: Introduce scst_scsi_execute()
This patch does not change any functionality but makes it easier
to port SCST to Linux kernel v4.11.
........
r7153 | bvassche | 2017-04-26 17:17:22 -0700 (Wed, 26 Apr 2017) | 1 line
scst: Port to Linux kernel v4.11
........
r7154 | vlnb | 2017-04-28 17:58:55 -0700 (Fri, 28 Apr 2017) | 5 lines
scst: create proc/scst_threads with mode S_IRUGO, not 0
Signed-off-by: David Butterfield <dab21774@gmail.com>
........
r7158 | bvassche | 2017-05-01 14:01:33 -0700 (Mon, 01 May 2017) | 1 line
scst: Kernel v4.12 build fixes
........
r7162 | bvassche | 2017-05-02 07:13:15 -0700 (Tue, 02 May 2017) | 1 line
scst_lib: Fix kernel 2.6.30 build
........
r7163 | bvassche | 2017-05-02 07:23:00 -0700 (Tue, 02 May 2017) | 1 line
scst: Fix build for kernels before v2.6.39
........
r7168 | bvassche | 2017-05-03 19:56:27 -0700 (Wed, 03 May 2017) | 1 line
scst: Fix build for kernels before v2.6.39
........
r7169 | vlnb | 2017-05-05 18:31:59 -0700 (Fri, 05 May 2017) | 3 lines
scst: nolockdep patch for kernel 4.9
........
r7170 | vlnb | 2017-05-10 20:51:32 -0700 (Wed, 10 May 2017) | 3 lines
qla2x00t: update to kernel 4.10
........
r7171 | vlnb | 2017-05-10 20:52:51 -0700 (Wed, 10 May 2017) | 3 lines
scst: nolockdep patch for kernel 4.10
........
r7173 | vlnb | 2017-05-10 21:00:29 -0700 (Wed, 10 May 2017) | 7 lines
fcst: Linux kernel v4.11 build fix
Linux kernel v4.11 build fix.
Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
........
r7175 | bvassche | 2017-05-13 17:42:24 -0700 (Sat, 13 May 2017) | 4 lines
scst/include/backport.h: Remove duplicate definition of kthread_create_on_node()
This patch reverts most of r7168.
........
r7176 | bvassche | 2017-05-13 17:55:39 -0700 (Sat, 13 May 2017) | 1 line
scst/include/backport.h: Add a comment
........
r7177 | bvassche | 2017-05-13 19:55:24 -0700 (Sat, 13 May 2017) | 1 line
scst/include/backport.h: Fix kthread_create_on_node() definition
........
r7178 | bvassche | 2017-05-13 20:06:54 -0700 (Sat, 13 May 2017) | 4 lines
scst/include/backport.h: Add a kref_read() backport
This patch does not change any functionality.
........
r7179 | bvassche | 2017-05-13 20:13:56 -0700 (Sat, 13 May 2017) | 4 lines
scst/include/backport.h: Add a backport of rcu_dereference_protected()
This patch does not change any functionality.
........
r7185 | bvassche | 2017-05-14 11:56:09 -0700 (Sun, 14 May 2017) | 14 lines
scst_local: Fix a race condition
Avoid that the following crash can occur:
general protection fault: 0000 [#1] PREEMPT SMP
RIP: 0010:scsi_is_host_device+0x7/0x20 [scsi_mod]
Call Trace:
scst_process_aens+0x95/0x1d0 [scst_local]
scst_aen_work_fn+0x6f/0x120 [scst_local]
process_one_work+0x20b/0x6c0
worker_thread+0x4e/0x4a0
kthread+0x113/0x150
ret_from_fork+0x31/0x40
........
r7190 | vlnb | 2017-05-19 20:00:28 -0700 (Fri, 19 May 2017) | 8 lines
scst: fix possible NULL dereference in TM code
TM command accessing a non-existing LUN might lead NULL dereference in
scst_call_dev_task_mgmt_fn_done().
Reported-By: <Ilan Steinberg <ilan.steinberg@kaminario.com>>
........
r7193 | vlnb | 2017-05-22 19:23:38 -0700 (Mon, 22 May 2017) | 5 lines
qla2x00t: fix broken 4.9 kernels build
Reported-By: Marc Smith <marc.smith@parodyne.com>
........
r7203 | vlnb | 2017-06-02 19:38:51 -0700 (Fri, 02 Jun 2017) | 3 lines
Update to 4.11 kernels
........
r7208 | vlnb | 2017-06-12 20:58:26 -0700 (Mon, 12 Jun 2017) | 5 lines
scst: Linux kernel v4.12 warning fix.
Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
........
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.2.x@7209 d57e44dd-8a1f-0410-8b47-8ef2f437770f
........
r7053 | vlnb | 2016-12-15 18:46:49 -0800 (Thu, 15 Dec 2016) | 3 lines
fileio_tgt: avoid warnings about casting between pointers and integers of different size
........
r7059 | vlnb | 2016-12-15 19:03:59 -0800 (Thu, 15 Dec 2016) | 3 lines
Update SVN_TAGS for 3.2.0
........
r7060 | vlnb | 2016-12-15 20:25:04 -0800 (Thu, 15 Dec 2016) | 3 lines
Web updates
........
r7061 | bvassche | 2016-12-17 04:33:45 -0800 (Sat, 17 Dec 2016) | 6 lines
ib_srpt: Revert r7050
r7050 did not change any behavior so revert it. Note for myself: in the
ib_srpt driver the port number is set by the ib_modify_qp() call in
srpt_init_ch_qp().
........
r7065 | vlnb | 2016-12-19 21:47:15 -0800 (Mon, 19 Dec 2016) | 20 lines
scst: avoid false lockdep complaints about recursive locking
In some cases SCST needs to take multiple locks recursivly, e.g. to lock
all tgt_devs in a session. For this case SCST takes those locks in their
current sort order, e.g. by LUN for tgt_devs, then releases in the
opposite order. Unfortunately, lockdep complains on such actions as
recursive locking, then disables itself. The disabling itself action is
the most unpleasant one leading to lockdep being useless after this point.
Unfortunately, nested locking annotations can't help, because after
free, then alloc again, or after LUN change (in case of tgt_devs) order
of locks can change.
So, this patch implements a way to annotate some lock and unlock actions
as "no lockdep", so lockdep will not track them. It contains related
kernel patches for some kernels.
This is a debug aid only useful only with lockdep enabled kernels.
........
r7066 | vlnb | 2016-12-19 21:49:07 -0800 (Mon, 19 Dec 2016) | 3 lines
Put_page_callback and scst_exec_req_fifo patches for RHEL5/6
........
r7067 | vlnb | 2016-12-19 21:53:48 -0800 (Mon, 19 Dec 2016) | 8 lines
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
........
r7068 | vlnb | 2016-12-19 21:55:19 -0800 (Mon, 19 Dec 2016) | 3 lines
Minor misc changes
........
r7069 | vlnb | 2016-12-19 22:00:43 -0800 (Mon, 19 Dec 2016) | 9 lines
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.
........
r7070 | vlnb | 2016-12-19 22:01:34 -0800 (Mon, 19 Dec 2016) | 3 lines
iscsi-scst: document thread_pid attribute
........
r7071 | vlnb | 2016-12-19 22:07:55 -0800 (Mon, 19 Dec 2016) | 7 lines
scst: improve thin provisioning support
This patch adds gen_tp_soft_threshold_reached_UA attribute for thin
provisioned devices that allows to generate THIN PROVISIONING SOFT
THRESHOLD REACHED Unit Attention.
........
r7072 | vlnb | 2016-12-19 22:10:56 -0800 (Mon, 19 Dec 2016) | 6 lines
scst: add ACA support
ACA (Auto Contingent Allegiance) is a way to handle CHECK CONDITION
status. It significantly improves performance of AIX systems.
........
r7073 | vlnb | 2016-12-19 22:14:55 -0800 (Mon, 19 Dec 2016) | 7 lines
scst: add max_tgt_dev_commands sysfs attribute
This per-device attribute allows to control maximum number of SCSI
commands any session to this device can have in flight. It makes
currently hardcoded constant be run time configurable.
........
r7074 | vlnb | 2016-12-19 22:17:11 -0800 (Mon, 19 Dec 2016) | 3 lines
scst: improve latency statistics
........
r7075 | vlnb | 2016-12-19 22:21:13 -0800 (Mon, 19 Dec 2016) | 6 lines
scst: performance improvements
This patch trying to allocate memory in per-NUMA and per-CPU manner to
(significantly) improve performance for high IOPS cases.
........
r7076 | vlnb | 2016-12-19 22:27:38 -0800 (Mon, 19 Dec 2016) | 8 lines
scst: add thread_index sysfs attribute
This attribute exports per LUN thread index assigned by
scst_add_threads(). It can be used to look up which export thread is
serving which target since this index also appears in the export thread
name. This information then could be used to set CPU affinity for those threads to improve performance.
........
r7077 | vlnb | 2016-12-19 22:28:41 -0800 (Mon, 19 Dec 2016) | 3 lines
scst: minor forwarding mode fixes
........
r7078 | vlnb | 2016-12-20 19:39:24 -0800 (Tue, 20 Dec 2016) | 3 lines
scst: document nolockdep patches
........
r7079 | vlnb | 2016-12-20 19:42:30 -0800 (Tue, 20 Dec 2016) | 3 lines
Web updates
........
r7080 | vlnb | 2016-12-21 19:07:19 -0800 (Wed, 21 Dec 2016) | 3 lines
Cleanup
........
r7081 | bvassche | 2016-12-27 12:21:53 -0800 (Tue, 27 Dec 2016) | 1 line
ib_srpt: Fix nightly build
........
r7082 | bvassche | 2016-12-27 12:23:31 -0800 (Tue, 27 Dec 2016) | 1 line
ib_srpt: Improve portability
........
r7083 | bvassche | 2016-12-27 12:25:13 -0800 (Tue, 27 Dec 2016) | 4 lines
isert-scst: Rename SCST_DIR into SCST_SYMVERS_DIR
Additionally, align shell code.
........
r7086 | bvassche | 2017-01-08 13:10:32 -0800 (Sun, 08 Jan 2017) | 2 lines
ib_srpt: Remove a local variable
........
r7087 | bvassche | 2017-01-08 13:10:54 -0800 (Sun, 08 Jan 2017) | 1 line
ib_srpt: Rename a symbolic constant
........
r7088 | bvassche | 2017-01-08 13:45:39 -0800 (Sun, 08 Jan 2017) | 2 lines
ib_srpt: Destroy SRQ before freeing the buffers posted on the SRQ
........
r7089 | bvassche | 2017-01-08 13:46:20 -0800 (Sun, 08 Jan 2017) | 2 lines
ib_srpt: Only report that SRQ creation failed if it was attempted to create an SRQ
........
r7090 | bvassche | 2017-01-10 17:16:07 -0800 (Tue, 10 Jan 2017) | 5 lines
scst: Fix a memory leak
Avoid that the memory allocated for struct scst_acn and its name is
leaked by scst_del_acg().
........
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.2.x@7094 d57e44dd-8a1f-0410-8b47-8ef2f437770f
svn+ssh://svn.code.sf.net/p/scst/svn/trunk
........
r7054 | vlnb | 2016-12-15 18:49:45 -0800 (Thu, 15 Dec 2016) | 5 lines
Add user space pieces to scst-dist-gzip.
They now essential part of the distribution
........
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.2.x@7056 d57e44dd-8a1f-0410-8b47-8ef2f437770f
........
r7040 | bvassche | 2016-11-30 21:06:36 -0800 (Wed, 30 Nov 2016) | 4 lines
scst_mem: Fix indentation
See also trunk r677.
........
r7041 | bvassche | 2016-11-30 21:07:48 -0800 (Wed, 30 Nov 2016) | 4 lines
scst: Use READ_ONCE() instead of ACCESS_ONCE()
This is a stylistic change only.
........
r7042 | bvassche | 2016-11-30 21:08:58 -0800 (Wed, 30 Nov 2016) | 2 lines
scripts/run-regression-tests: Avoid that "make oldconfig" hangs
........
r7044 | bvassche | 2016-11-30 21:16:15 -0800 (Wed, 30 Nov 2016) | 2 lines
scst_vdisk: Remove a superfluous cast
........
r7045 | bvassche | 2016-11-30 21:22:01 -0800 (Wed, 30 Nov 2016) | 1 line
scst_vdisk: Remove more unneeded casts
........
r7046 | bvassche | 2016-12-01 08:18:39 -0800 (Thu, 01 Dec 2016) | 2 lines
ib_srpt: Only complain if immediate data has to be copied if CONFIG_SLUB_DEBUG=n
........
r7047 | bvassche | 2016-12-01 08:19:14 -0800 (Thu, 01 Dec 2016) | 1 line
ib_srpt Makefile: Follow-up for trunk r6138
........
r7048 | bvassche | 2016-12-01 08:19:40 -0800 (Thu, 01 Dec 2016) | 1 line
ib_srpt: Reduce build time
........
r7049 | bvassche | 2016-12-07 15:52:41 -0800 (Wed, 07 Dec 2016) | 5 lines
ib_srpt: Simplify a debug statement
It is likely that ib_device.dma_ops will be removed sooner or later.
Hence make sure that the ib_srpt driver does not depend on it.
........
r7050 | bvassche | 2016-12-14 04:31:23 -0800 (Wed, 14 Dec 2016) | 1 line
ib_srpt: Create QP on the RDMA port the initiator logged in to
........
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.2.x@7052 d57e44dd-8a1f-0410-8b47-8ef2f437770f
svn+ssh://svn.code.sf.net/p/scst/svn/trunk
........
r7043 | bvassche | 2016-11-30 21:10:43 -0800 (Wed, 30 Nov 2016) | 6 lines
scst.spec.in: Remove %dir /lib/modules/%{kversion}/extra
This avoids that the SCST RPM conflicts with other kernel RPMs
that install kernel modules in the "extra" directory. Reported
and suggested by Consus <consus@gmx.com>.
........
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.2.x@7051 d57e44dd-8a1f-0410-8b47-8ef2f437770f
svn+ssh://svn.code.sf.net/p/scst/svn/trunk
........
r7032 | bvassche | 2016-11-24 08:53:00 -0800 (Thu, 24 Nov 2016) | 6 lines
scripts/generate-kernel-patch: Revert r7022
Revert r7022 because:
* Changing $kver3 into $kver is wrong for 2.x kernels.
* Building include/iscsi_scst_itf_ver.h must not depend on the kernel version.
........
r7034 | bvassche | 2016-11-24 09:32:40 -0800 (Thu, 24 Nov 2016) | 7 lines
iscsi-scst/Makefile: Fix INFINIBAND_ENABLED test
Running "make install" ensures that the kernel config file is available
in $(KDIR)/.config. However, that file is not available if $(KDIR) points
at a kernel that comes from a Linux distributor. Hence change the
$(INFINIBAND_ENABLED) test to check $(KDIR)/../modules.symbols.
........
r7037 | vlnb | 2016-11-29 19:06:38 -0800 (Tue, 29 Nov 2016) | 9 lines
generate-kernel-patch: fix custom cross-compilation kernel case
Otherwise there is non-fatal error like: No such file or directory
grep: /lib/modules/<current_running_kernel>/build/.config: Permission denied
This is a better version of r7022 suggested by Bart
........
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.2.x@7038 d57e44dd-8a1f-0410-8b47-8ef2f437770f
........
r6934 | mlx-storage | 2016-08-17 00:17:37 -0700 (Wed, 17 Aug 2016) | 3 lines
isert: make sure rdma_disconnect is called only once
Signed-off-by: Israel Rukshin <israelr@mellanox.com>
........
r6935 | mlx-storage | 2016-08-17 00:27:06 -0700 (Wed, 17 Aug 2016) | 7 lines
isert: fix cleaning isert_con_dev
Clean pointers not to point to invalid memory.
- While conn is released set conn_dev->conn to null as conn is invalid now.
- While conn_dev is released set priv(conn) to null as conn_dev is invalid now.
Signed-off-by: Israel Rukshin <israelr@mellanox.com>
........
r6936 | mlx-storage | 2016-08-17 00:27:11 -0700 (Wed, 17 Aug 2016) | 3 lines
isert: add assertions for connection teardwon flow
Signed-off-by: Israel Rukshin <israelr@mellanox.com>
........
r6937 | mlx-storage | 2016-08-17 00:27:15 -0700 (Wed, 17 Aug 2016) | 7 lines
isert: fix a possible extra refcount put of isert connection
On login logout stress we can start a teardown flow before connection is
fully established.
In this case we have one less refcount on isert connection.
Signed-off-by: Israel Rukshin <israelr@mellanox.com>
........
r6938 | mlx-storage | 2016-08-17 00:27:19 -0700 (Wed, 17 Aug 2016) | 3 lines
isert: change wrong dev_conn bug on
Signed-off-by: Israel Rukshin <israelr@mellanox.com>
........
r6939 | mlx-storage | 2016-08-17 00:27:24 -0700 (Wed, 17 Aug 2016) | 5 lines
isert: fix fops ioctl using invalid conn
On teardown flow we need to set dev conn state to disconnected.
Signed-off-by: Israel Rukshin <israelr@mellanox.com>
........
r6940 | mlx-storage | 2016-08-17 00:27:28 -0700 (Wed, 17 Aug 2016) | 8 lines
isert: fix race between ioctl events and disconnect flow
The ioctl events may arive after the isert connection has
started the teardown flow.
This scenario may occur on login logout stress.
It may lead to NULL derefrence bugs.
Signed-off-by: Israel Rukshin <israelr@mellanox.com>
........
r6941 | mlx-storage | 2016-08-17 00:27:33 -0700 (Wed, 17 Aug 2016) | 6 lines
isert: fix isert conn refcount release at unreachable event
On unreachable event the isert conn kref is always 2.
The refcount becomes 2 after successful connect event.
Signed-off-by: Israel Rukshin <israelr@mellanox.com>
........
r6942 | mlx-storage | 2016-08-17 00:27:38 -0700 (Wed, 17 Aug 2016) | 6 lines
isert: fix missing refcount cleanup at error flow
Before calling to rdma_accept isert kref is 2, so on failure
we must decrease it twice.
Signed-off-by: Israel Rukshin <israelr@mellanox.com>
........
r6943 | mlx-storage | 2016-08-17 00:27:43 -0700 (Wed, 17 Aug 2016) | 7 lines
isert: add assertion if send/recv was posted after post drain
After post drain we are not allowed to call post_recv or post_send,
because the drain must be the last flush to let us know that we may
close the conection safely.
Signed-off-by: Israel Rukshin <israelr@mellanox.com>
........
r6944 | mlx-storage | 2016-08-17 00:27:48 -0700 (Wed, 17 Aug 2016) | 3 lines
isert: replace kernel prints with scst macros
Signed-off-by: Israel Rukshin <israelr@mellanox.com>
........
r6945 | mlx-storage | 2016-08-17 00:27:53 -0700 (Wed, 17 Aug 2016) | 11 lines
isert: fix a race between timewait exit handler and poll cq
Timewait exit event handler start to close iscsi conn
before poll cq finish to handle all the good completions.
This may lead to NULL deref at poll cq context or post recv
after post drain.
This commit close iscsi conn only when start getting flush.
Flush is guaranteed if iscsi conn was created because when allocating
iscsi conn we call post recv.
Signed-off-by: Israel Rukshin <israelr@mellanox.com>
........
r6946 | mlx-storage | 2016-08-17 00:27:57 -0700 (Wed, 17 Aug 2016) | 8 lines
isert: fix a race when drain wr is not the last flush
We must wait for both the send and recv cqs to flush all pending work
requests.
To make sure that the drain will be the last flush we post a second
drain work request on the recv queue.
Signed-off-by: Israel Rukshin <israelr@mellanox.com>
........
r6947 | mlx-storage | 2016-08-17 00:28:02 -0700 (Wed, 17 Aug 2016) | 7 lines
isert: fix isert connection kref leak at estabished event handler
Fix a missing kref put when isert_conn_established return an error.
By removing set bit ISERT_CONNECTION_ABORTED the connection teardown
will start when recieving the flush WRs.
Signed-off-by: Israel Rukshin <israelr@mellanox.com>
........
r6948 | mlx-storage | 2016-08-17 00:28:06 -0700 (Wed, 17 Aug 2016) | 6 lines
isert: close isert connection earlier
We want to close the connection not only when timewait
exit event arrive, but also on some other events.
Signed-off-by: Israel Rukshin <israelr@mellanox.com>
........
r6949 | mlx-storage | 2016-08-17 00:28:11 -0700 (Wed, 17 Aug 2016) | 3 lines
isert: change dev conn_lock spinlock to mutex
Signed-off-by: Israel Rukshin <israelr@mellanox.com>
........
r6950 | mlx-storage | 2016-08-17 00:28:16 -0700 (Wed, 17 Aug 2016) | 12 lines
isert: fix a race between calling to rdma_disconnect and connect flow
1) The race can happen after unreachable event handler close isert connection
and calling to rdma_disconnect from another thread on illegal cm_id.
For example call rdma_disconnect from isert_portal_release function.
2) It is also possible to get ESTABLISHED RDMACM event while rdma_disconnect
is called from another thread.
In established event we need to check conn is not in
teardown flow by checking the connection state with a mutex.
Signed-off-by: Israel Rukshin <israelr@mellanox.com>
........
r6951 | mlx-storage | 2016-08-17 00:28:20 -0700 (Wed, 17 Aug 2016) | 7 lines
isert: fix isert connection kref leak
To avoid rare cases when checking ISERT_CONNECTION_EST bit
may lead to kref leak, we now take the third refcount earlier
before calling to rdma_accept.
Signed-off-by: Israel Rukshin <israelr@mellanox.com>
........
r6952 | mlx-storage | 2016-08-17 00:28:25 -0700 (Wed, 17 Aug 2016) | 8 lines
isert: faster release of isert_scst module
If there is a dead connection we don't want to wait 60 seconds for
the connection timeout error.
So when closing the portal we close now all the connections
immediately without waiting for events to arrive.
Signed-off-by: Israel Rukshin <israelr@mellanox.com>
........
r6953 | mlx-storage | 2016-08-17 00:28:29 -0700 (Wed, 17 Aug 2016) | 8 lines
isert: fix races between conn fops read/write and disconnect flow
read/write events may arive after the isert connection has
started the teardown flow.
This scenario may occur on login logout stress.
It may lead to NULL derefrence bugs.
Signed-off-by: Israel Rukshin <israelr@mellanox.com>
........
r6954 | mlx-storage | 2016-08-17 00:28:34 -0700 (Wed, 17 Aug 2016) | 3 lines
isert: add missing fd put on error flow
Signed-off-by: Israel Rukshin <israelr@mellanox.com>
........
r6955 | mlx-storage | 2016-08-17 00:28:38 -0700 (Wed, 17 Aug 2016) | 8 lines
isert: fix working with freed conn object
isert_delete_conn_dev function checks if it needs to close the connection
by checking that dev conn is not NULL.
We were missing set conn to null when freeing it and that caused working
with memory that was already freed.
Signed-off-by: Israel Rukshin <israelr@mellanox.com>
........
r6956 | mlx-storage | 2016-08-17 00:28:43 -0700 (Wed, 17 Aug 2016) | 7 lines
isert: fix isert conn cleanup when rdma_accept fails
If rdma_accept fails the state of the qp is modified to error and all
posted recieve buffers will be flushed and because of the flush
the isert conn teardown flow will start.
Signed-off-by: Israel Rukshin <israelr@mellanox.com>
........
r6957 | mlx-storage | 2016-08-17 00:28:47 -0700 (Wed, 17 Aug 2016) | 6 lines
isert: add conn to portal conn list only if rdma_accept succeeded
If rdma_accept() failed then we shouldn't call rdma_disconnect() on that QP
as the result is unexpected.
Signed-off-by: Israel Rukshin <israelr@mellanox.com>
........
r6958 | mlx-storage | 2016-08-17 00:28:52 -0700 (Wed, 17 Aug 2016) | 3 lines
isert: fix redundant module put on error flow when handling connect request
Signed-off-by: Israel Rukshin <israelr@mellanox.com>
........
r6965 | bvassche | 2016-08-19 21:00:46 -0700 (Fri, 19 Aug 2016) | 1 line
nightly build: Update kernel versions
........
r6967 | bvassche | 2016-08-21 15:57:51 -0700 (Sun, 21 Aug 2016) | 4 lines
isert-scst: Address checkpatch coding style complaints
This patch does not change any functionality.
........
r6968 | bvassche | 2016-08-21 15:58:24 -0700 (Sun, 21 Aug 2016) | 1 line
scst_vdisk: Use tabs instead of spaces for indentation
........
r6971 | bvassche | 2016-08-21 16:16:56 -0700 (Sun, 21 Aug 2016) | 1 line
scst_vdisk: Comment out a local variable that is not used
........
r6972 | bvassche | 2016-08-21 17:04:58 -0700 (Sun, 21 Aug 2016) | 4 lines
isert-scst: Convert a cast into a container_of() expression
This patch does not change any functionality.
........
r6974 | bvassche | 2016-08-22 09:17:25 -0700 (Mon, 22 Aug 2016) | 1 line
scst: Insert a blank line after declarations where it was missing
........
r6975 | bvassche | 2016-08-22 10:05:07 -0700 (Mon, 22 Aug 2016) | 1 line
iscsi-scst: Change (signed) into (signed int)
........
r6982 | vlnb | 2016-08-30 17:47:52 -0700 (Tue, 30 Aug 2016) | 3 lines
Web updates
........
r6983 | vlnb | 2016-08-30 18:07:37 -0700 (Tue, 30 Aug 2016) | 3 lines
More web updates
........
r6988 | bvassche | 2016-10-03 22:24:35 -0700 (Mon, 03 Oct 2016) | 1 line
scstadmin: Bump version number
........
r6989 | bvassche | 2016-10-03 22:24:49 -0700 (Mon, 03 Oct 2016) | 1 line
fcst: Bump version number
........
r6993 | bvassche | 2016-10-06 17:31:52 -0700 (Thu, 06 Oct 2016) | 1 line
nightly build: Update kernel versions
........
r6998 | bvassche | 2016-10-10 11:09:12 -0700 (Mon, 10 Oct 2016) | 1 line
ib_srpt: Use tabs instead of spaces to indent
........
r6999 | bvassche | 2016-10-10 11:09:32 -0700 (Mon, 10 Oct 2016) | 1 line
ib_srpt README: Correct default srpt_sq_size
........
r7000 | bvassche | 2016-10-10 11:09:51 -0700 (Mon, 10 Oct 2016) | 1 line
ib_srpt: Rework QP failure reporting code
........
r7001 | bvassche | 2016-10-10 11:10:13 -0700 (Mon, 10 Oct 2016) | 1 line
ib_srpt: Retry with a smaller send queue size if QP creation fails
........
r7003 | bvassche | 2016-10-10 11:51:06 -0700 (Mon, 10 Oct 2016) | 23 lines
ib_srpt: Fix a race condition in the initialization code
Initialize port information before registering the CM ID. One of
the functions called by the CM handler (srpt_cm_req_recv())
namely uses the SCST target pointer so that pointer must be
initialized before the CM ID is registered. This patch avoids that
SRP login during ib_srpt initialization sporadically triggers the
following bug:
ib_srpt: Rejecting login with reason 0x10001
BUG: unable to handle kernel NULL pointer dereference at 0000000000000100
IP: [<ffffffffa09f1ccf>] srpt_cm_req_recv+0xf3f/0xf60 [ib_srpt]
Call Trace:
[<ffffffffa09f1dd5>] srpt_ib_cm_req_recv+0xe5/0x110 [ib_srpt]
[<ffffffffa06c6fae>] cm_process_work+0x1e/0x130 [ib_cm]
[<ffffffffa06c9ca8>] cm_req_handler+0x398/0x460 [ib_cm]
[<ffffffffa06c9e25>] cm_work_handler+0xb5/0x208 [ib_cm]
[<ffffffff8107d2fc>] process_one_work+0x16c/0x350
[<ffffffff8108002a>] worker_thread+0x17a/0x410
[<ffffffff810843f6>] kthread+0x96/0xa0
[<ffffffff8146f364>] kernel_thread_helper+0x4/0x10
........
r7004 | bvassche | 2016-10-10 11:51:42 -0700 (Mon, 10 Oct 2016) | 2 lines
ib_srpt: Enable S/G-list clustering
........
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.2.x@7011 d57e44dd-8a1f-0410-8b47-8ef2f437770f
........
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
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
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
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
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
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