Commit Graph

5709 Commits

Author SHA1 Message Date
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
Vladislav Bolkhovitin
bcb87d57ec iscsi: logging improvements for iscsi_scstd.c
Logging improvements for iscsi_scstd.c print more information about failures.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7113 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-13 23:16:57 +00:00
Vladislav Bolkhovitin
b71fa76b5b iscsi: fix misleading error logging in config.c
This fixes four similar instances of a very misleading and confusing logging
statement, which would print a "Wrong value" that had already been corrected by
the check function.

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



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



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



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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7109 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-13 22:38:38 +00:00
Vladislav Bolkhovitin
d236725cae 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>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7108 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-13 22:30:25 +00:00
Vladislav Bolkhovitin
a23e34fb62 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>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7107 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-13 22:04:07 +00:00
Bart Van Assche
1a035743eb Merge branch 'svn-trunk' 2017-04-11 21:14:11 -07:00
Bart Van Assche
9529f5e5b3 ib_srpt: Ensure that the BUG_ON() argument has no side effects
Reported-by: David Butterfield <dab21774@gmail.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7106 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-11 18:48:36 +00:00
Bart Van Assche
624c72997b Merge branch 'svn-trunk' 2017-03-07 20:59:24 -08:00
Bart Van Assche
76daca5677 scst_lib.c: Fix indentation
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7105 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-03-08 04:43:23 +00:00
Vladislav Bolkhovitin
d91dd9b3ed 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@7104 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-03-08 04:36:45 +00:00
Bart Van Assche
7d452207c4 scst: Unbreak the kernel v2.6.38 build 2017-03-01 22:54:42 -08:00
Bart Van Assche
382cd6ada7 fcst: Port to Linux kernel v4.10 2017-03-01 22:35:42 -08:00
Bart Van Assche
5c32179226 nightly build: Update kernel configs 2017-03-01 22:24:25 -08:00
Bart Van Assche
c8b8d8a2f0 Merge branch 'svn-trunk' 2017-03-01 18:51:51 -08:00
Bart Van Assche
4481d52e8d scripts: Update kernel download location 2017-03-01 16:15:21 -08:00
Bart Van Assche
1bf5d439d6 scst: Coding style update related to the use of the keyword 'unsigned'
Use 'unsigned int' instead of 'unsigned' and 'unsigned long long'
instead of 'long long unsigned'.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7103 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-03-02 00:10:24 +00:00
Bart Van Assche
e372a0123e scst: Coding style updates related to whitespace
This patch changes whitespace only and nothing else.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7102 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-03-02 00:09:14 +00:00
Bart Van Assche
ca0ad87e2a Merge branch 'svn-trunk' 2017-03-01 07:32:25 -08:00
Bart Van Assche
0bb6de9471 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>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7101 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-03-01 15:31:59 +00:00
Bart Van Assche
b13fd42124 nightly/conf/nightly.sendmail: Use mail if mutt is not available 2017-02-28 22:10:49 -08:00
Bart Van Assche
84a80e83fe nightly build: Update kernel versions 2017-02-28 22:04:16 -08:00
Bart Van Assche
aa69fe88a5 Rename srpt/src/backport.h into srpt/src/ib_backport.h 2017-02-28 21:47:59 -08:00
Bart Van Assche
682eaed880 scst: Remove scst_device.dev_unregistering again
See also:
- commit 2e386ef7c1 ("Merge branch svn-trunk")
- commit 3fc775c75a / r6589 ("EXTENDED COPY support")
- commit 6c46b1a5a0 ("scst: Remove the dev_unregistering member variable")
2017-02-28 21:33:59 -08:00
Bart Van Assche
e009996237 scstadmin: Fix regression tests 2017-02-28 21:33:58 -08:00
Bart Van Assche
ebdb340e3a scst: Port to Linux kernel v4.11 2017-02-28 21:33:58 -08:00
Bart Van Assche
5b5a8b2523 scst_copy_mgr: Remove two incorrect assert statements 2017-02-28 20:35:39 -08:00
Bart Van Assche
bb59822be2 Merge branch 'svn-trunk' 2017-02-28 17:41:54 -08:00
Bart Van Assche
08f2570761 scst_copy_mgr: Warn if LUN lookup fails
It really is a bug if LUN lookup fails. 


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7100 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-02-27 22:36:33 +00:00