Commit Graph

5739 Commits

Author SHA1 Message Date
Bart Van Assche
04dea09c25 Merge branch 'svn-trunk' 2017-04-28 19:49:03 -07:00
Vladislav Bolkhovitin
128d2b20a8 scst: add mutex_lock/unlock around scst_alloc_add_acg()
The CONFIG_SCST_PROC build was calling scst_alloc_add_acg() without holding the
scst_mutex.

Signed-off-by: David Butterfield <dab21774@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7155 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-29 01:00:59 +00:00
Vladislav Bolkhovitin
a9dcdfadee scst: create proc/scst_threads with mode S_IRUGO, not 0
Signed-off-by: David Butterfield <dab21774@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7154 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-29 00:58:55 +00:00
Bart Van Assche
fb89afd27a Merge branch 'svn-trunk' 2017-04-26 20:31:44 -07:00
Bart Van Assche
909247cb3d scst: Port to Linux kernel v4.11
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7153 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-27 00:17:22 +00:00
Bart Van Assche
0371382394 scst: Introduce scst_scsi_execute()
This patch does not change any functionality but makes it easier
to port SCST to Linux kernel v4.11.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7152 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-26 23:53:11 +00:00
Vladislav Bolkhovitin
33af3ccb46 ql2x00t: howto update
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7151 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-22 04:15:21 +00:00
Bart Van Assche
bef67e0b50 Merge branch 'svn-trunk' 2017-04-21 21:01:41 -07:00
Vladislav Bolkhovitin
a09440181c Web updates
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7150 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-22 03:58:24 +00:00
Vladislav Bolkhovitin
4a4d4a1721 Web updates
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7149 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-22 03:50:03 +00:00
Vladislav Bolkhovitin
2ce8ce38e4 Web updates
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7148 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-22 03:33:13 +00:00
Vladislav Bolkhovitin
7fcfd8f589 Web updates
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7147 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-22 03:21:07 +00:00
Vladislav Bolkhovitin
68fa7e1a0d Copyright updates
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7146 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-22 03:19:52 +00:00
Vladislav Bolkhovitin
ed19aa2813 Web updates
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7145 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-22 03:04:34 +00:00
Bart Van Assche
0d8490d10b Merge branch 'svn-trunk' 2017-04-20 20:10:40 -07:00
Vladislav Bolkhovitin
a8b24ae319 iscsi_scst: conn_lookup() skips any conn already closing
This change helped a secondary problem I had under valgrind (due to some other
bug) with initiators timing out and reconnecting their sessions faster than the
threads were getting cleaned up (for one thing, valgrind only ever runs one
thread at a time).

It seems logical that the code in conn_lookup() would want to skip any
connection that's already known closing in this case, for the same reason it
searches the list in reverse.  And the dropping connections don't have to drop
in order, so searching in reverse doesn't seem sufficient to avoid finding a
wrong (stale, closing) connection structure.

Signed-off-by: David Butterfield <dab21774@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7144 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-21 01:36:34 +00:00
Vladislav Bolkhovitin
296f133caf 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>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7143 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-21 01:32:07 +00:00
Vladislav Bolkhovitin
0e92843d30 iscsi-scst: reset conn->rx_task in scsi_cmnd_start() for EXTRACHECKS
In scsi_cmnd_start() conn->rx_task is intended to be set only during the
call to _stage1_done, but there was no code to reset it.  It doesn't
actually matter in execution, but it was a little confusing to wonder
and try to understand why it wasn't reset.

Signed-off-by: David Butterfield <dab21774@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7142 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-21 01:17:53 +00:00
Vladislav Bolkhovitin
660fb57d3a 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>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7141 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-21 01:11:37 +00:00
Vladislav Bolkhovitin
82f5ffd255 iscsi-scstd: daemon handle EOF (rc == 0) from nl_fd
Daemon now handles receipt of EOF (rc == 0) from nl_fd.  Probably this never
happens in a real kernel build, but it does during shutdown in a usermode build
and it seems like it is "generically correct" in either case.

Signed-off-by: David Butterfield <dab21774@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7140 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-21 01:04:16 +00:00
Vladislav Bolkhovitin
344387c40e iscsi-scstd: replace signal() with sigaction()
Replace signal() with sigaction() for validity in a multithreaded process

Signed-off-by: David Butterfield <dab21774@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7139 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-21 01:02:25 +00:00
Vladislav Bolkhovitin
a8336afa4c iscsi-scst: change local names of ioctl() and open() to not conflict
Change local names of ioctl() and open() to not conflict with C library names.
This isn't really a bug in a strictly kernel-resident build, but the change
avoids symbol conflicts with libc when building for usermode.

Signed-off-by: David Butterfield <dab21774@gmail.com>

with some changes



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7138 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-21 00:57:10 +00:00
Vladislav Bolkhovitin
dd026f8511 fileio_tgt: change "#if DEBUG_TM_FN_IGNORE" to "#ifdef ..."
Signed-off-by: David Butterfield <dab21774@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7137 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-19 03:44:20 +00:00
Bart Van Assche
01cbd681d3 Merge branch 'svn-trunk' 2017-04-17 21:55:48 -07:00
Vladislav Bolkhovitin
24b9a38b2b scst: avoid possible side effect with WARN_ON_ONCE()
Reported-By: David Butterfield <dab21774@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7136 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-18 04:06:18 +00:00
Vladislav Bolkhovitin
89a939536f fcst: Linux kernel v4.10 build fix
Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7135 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-18 04:02:44 +00:00
Vladislav Bolkhovitin
74bee99f59 iscsi-scst: replace strncpy() by strlcpy()
Follow up for r7109: strlcpy() is more appropriate in this place.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7134 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-18 03:57:12 +00:00
Bart Van Assche
4da1ca4faf Merge branch 'svn-trunk' 2017-04-14 21:12:16 -07:00
Bart Van Assche
b58937bf62 srpt/Makefile: Add support for make -i
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7133 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-15 04:10:44 +00:00
Bart Van Assche
4ffb6b6f12 iscsi-scst/Makefile: Add support for make -i
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7132 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-15 04:10:31 +00:00
Bart Van Assche
3a286cc040 Merge branch 'svn-trunk' 2017-04-14 17:45:34 -07:00
Bart Van Assche
8c4889d092 iscsi-scst/Makefile: Fix detection of whether InfiniBand is enabled
Inspecting modules.symbols is fine after a kernel has been installed but
not if a kernel tree has not been installed. If a kernel tree has not
been installed, check the .config file.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7131 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-14 21:38:56 +00:00
Bart Van Assche
41964012c1 isert-scst: Fix two configuration tests
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7130 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-14 20:47:26 +00:00
Bart Van Assche
8730c9c5a6 ib_srpt: Fix two configuration tests
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7129 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-14 20:46:50 +00:00
Bart Van Assche
1417cfff88 Merge branch 'svn-trunk' 2017-04-13 21:29:58 -07:00
Bart Van Assche
3685688caa iscsi-scst/Makefile: Optimize Makefile
Cache conftest results and enable parallel invocation of conftests.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7128 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-14 04:29:38 +00:00
Bart Van Assche
4f6fc459c0 ib_srpt: Optimize Makefile
Cache conftest results and enable parallel invocation of conftests.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7127 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-14 04:21:38 +00:00
Vladislav Bolkhovitin
57ee5e39ab backport ACCESS_ONCE() before 2.6.26
Signed-off-by: David Butterfield <dab21774@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7126 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-14 01:19:06 +00:00
Vladislav Bolkhovitin
c98eb43f55 extraclean does "rm tags cscope.out"
Signed-off-by: David Butterfield <dab21774@gmail.com>




git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7125 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-14 01:17:45 +00:00
Vladislav Bolkhovitin
68129122e8 iscsi-scst: clean up the conftest subdirectory too
Reported-by: David Butterfield <dab21774@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7124 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-14 01:16:10 +00:00
Vladislav Bolkhovitin
eaa99a8770 Fix a few minor "extra" compiler warnings (mostly "const" issues)
Add "XXX" comments in a few places about potential problems seen in SCST code,
for future investigation and possible repair.

Signed-off-by: David Butterfield <dab21774@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7123 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-14 01:03:25 +00:00
Vladislav Bolkhovitin
a2e0916fbf Fix a few compiler messages issued when some extra warnings are enabled:
casting const to non-const
    uninitialized structure members
    non-static local function
    missing enumerated switch-value cases

Signed-off-by: David Butterfield <dab21774@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7122 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-13 23:58:32 +00:00
Vladislav Bolkhovitin
9c7b816179 scst_vdisk: move declarations inside #ifdef
Move some #ifdefs to also cover declarations used only inside the #ifdef.
This is to avoid compiler warnings about unused variables.

Signed-off-by: David Butterfield <dab21774@gmail.com>





git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7121 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-13 23:53:35 +00:00
Vladislav Bolkhovitin
011bc77ec9 scst_vdisk: remove parentheses from DEF_DIF_FILENAME_TMPL
DEF_DIF_FILENAME_TMPL should not have the parentheses; I used it in some
context where that became apparent.

Signed-off-by: David Butterfield <dab21774@gmail.com>




git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7120 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-13 23:45:15 +00:00
Vladislav Bolkhovitin
f84ed1c222 scst: remove superfluous assignment in scst_dg_add()
The "res" is unconditionally set by the call to scst_dg_sysfs_add(),
so setting it to ENOMEM above that is superfluous.

Signed-off-by: David Butterfield <dab21774@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7119 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-13 23:43:55 +00:00
Vladislav Bolkhovitin
a4a1e480b1 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>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7118 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-13 23:42:51 +00:00
Vladislav Bolkhovitin
bbd9b42a2e 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>




git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7117 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-13 23:41:14 +00:00
Vladislav Bolkhovitin
c0440263b0 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>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7116 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-13 23:39:14 +00:00
Vladislav Bolkhovitin
d1e78984c4 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>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7115 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-13 23:37:13 +00:00
Vladislav Bolkhovitin
f05a100fb4 scst_vdisk: logging to distinguish different cases of EINVAL
Signed-off-by: David Butterfield <dab21774@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7114 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-13 23:19:05 +00:00