Commit Graph
9244 Commits
Author SHA1 Message Date
Vladislav Bolkhovitin b3758b0db9 scst: compute max_transfer args as long, not int
Compute max_transfer args as long, not int, to avoid overflow when
max_sg_cnt=32768 and PAGE_SHIFT=16 (64K PAGE_SIZE).  Note it is not
only the min() call, but also the << PAGE_SHIFT needs to be long.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7189 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-05-20 02:04:16 +00:00
Bart Van Assche c7f43429af Merge branch 'svn-trunk' 2017-05-18 21:08:28 -07:00
Vladislav Bolkhovitin 8d3a9f440a qla2x00t: Disable Out-of-order processing by default
From: Quinn Tran <quinn.tran@cavium.com>

Out of order(OOO) processing requires initiator, switch
and target to support OOO. In today¹s environment, none
of the switches support OOO. OOO requires extra buffer
space which affect performance. By turning ON this feature
in QLogic's FW, it delays error recovery because droped
frame is treated as out of order frame. We¹re turning OFF
this option of speed up error recovery.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Quinn Tran <quinn.tran@cavium.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>

Merge of mainline commit 300af14bdb28157090f0c6f89d244fda940082da

EXPERIMENTAL!



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7188 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-05-19 02:58:23 +00:00
Vladislav Bolkhovitin 9d21169f8c scst: implement BLOCKIO devices "active" attribute
Intended to be able to load  on passive side as described in
https://sourceforge.net/p/scst/mailman/message/35549446/

Suggested-by: Кирилл Тюшев <kirill.tyushev8@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7187 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-05-19 02:37:49 +00:00
Bart Van Assche 4675562fcc Merge branch 'svn-trunk' 2017-05-15 19:10:49 -07:00
Bart Van Assche 81f80e1708 isert-scst: Fix a race condition that was introduced accidentally in r7184
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7186 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-05-16 02:04:47 +00:00
Bart Van Assche 07e6d21634 Merge branch 'svn-trunk' 2017-05-14 11:56:35 -07:00
Bart Van Assche b2b15e1d55 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


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7185 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-05-14 18:56:09 +00:00
Bart Van Assche 830369e50d isert-scst: Avoid that shutdown sporadically hangs
Waiting for other threads to release an object using code like
"while (object->refcnt > 0) msleep(100)" without holding a reference
on 'object' is wrong because the memory object points at may be freed
before or while this loop is in progress. Hence introduce a global
portal object count and wait on that count instead of waiting for
the per-portal reference count to reach zero.

The use-after-free was introduced in r6952 ("isert: faster release
of isert_scst module").

See also https://sourceforge.net/p/scst/tickets/2/.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7184 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-05-14 18:53:01 +00:00
Bart Van Assche cda5cadb1c isert-scst: Enable type checking for isert portal pointers
This patch does not change any functionality.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7183 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-05-14 18:49:04 +00:00
Bart Van Assche f5f161ae70 scst_local: Fix a race condition
Avoid that the following crash occurs:

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
2017-05-14 11:12:14 -07:00
Bart Van Assche 473a7be156 isert-scst: Fix a use-after-free
Waiting for other threads to release an object using code like
"while (object->refcnt > 0) msleep(100)" without holding a reference
on object is wrong because the memory object points at may be freed
before or while this loop is in progress. Hence introduce a global
portal object count and wait on that count instead of waiting for
the per-portal reference count to reach zero.
2017-05-14 09:42:17 -07:00
Bart Van Assche 1f10c8c269 isert-scst: Enable type checking for isert portal pointers 2017-05-14 09:15:56 -07:00
Bart Van Assche b799130680 ib_srpt: Fix a logging statement
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7182 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-05-14 14:55:00 +00:00
Bart Van Assche 060d4f2d21 ib_srpt: Remove ib_backport.h again 2017-05-14 07:53:20 -07:00
Bart Van Assche 7d7bc5c41b Merge branch 'svn-trunk' 2017-05-14 07:50:20 -07:00
Israel Rukshin 28c5d73550 isert-scst: fix isert connection teardown flow
Synchronizing the rdma_disconnect() with the post drain wr
as other ULPs like iSER do.

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

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7181 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-05-14 13:45:02 +00:00
Bart Van Assche f21fe1094e Merge branch 'svn-trunk' 2017-05-13 21:26:56 -07:00
Bart Van Assche 8315bfdd0f scst_vdisk: Avoid shifting left by a negative number of bits
scst_calc_block_shift() can return a negative number. Hence avoid
1 << scst_calc_block_shift().  Detected by Coverity.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7180 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-05-14 03:49:39 +00:00
Bart Van Assche 4acdf66303 Merge branch 'svn-trunk' 2017-05-13 20:19:54 -07:00
Bart Van Assche cb070d9a7f scst/include/backport.h: Add a backport of rcu_dereference_protected()
This patch does not change any functionality.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7179 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-05-14 03:13:56 +00:00
Bart Van Assche b4118ea0f1 scst/include/backport.h: Add a kref_read() backport
This patch does not change any functionality.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7178 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-05-14 03:06:54 +00:00
Bart Van Assche 4a18e68c3f scst/include/backport.h: Fix kthread_create_on_node() definition
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7177 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-05-14 02:55:24 +00:00
Bart Van Assche 9a1d8ed867 Merge branch 'svn-trunk' 2017-05-13 17:57:11 -07:00
Bart Van Assche 37baddd3c3 nightly/bin/nightly: Clone the source code tree quietly 2017-05-13 17:57:04 -07:00
Bart Van Assche 3622c0d5cb scst/include/backport.h: Add a comment
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7176 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-05-14 00:55:39 +00:00
Bart Van Assche b8cfe827be scst/include/backport.h: Remove duplicate definition of kthread_create_on_node()
This patch reverts most of r7168.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7175 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-05-14 00:42:24 +00:00
Bart Van Assche c4cf4c3f5f Merge branch 'svn-trunk' 2017-05-12 21:23:32 -07:00
Vladislav Bolkhovitin 383ceb0a8e scst: add module parameter to control the copy manager auto assignment
Reported-By: Guru Prasad <gp22online@gmail.com>
Suggested-By: Sebastian Herbszt <herbszt@gmx.de>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7174 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-05-13 03:30:07 +00:00
Vladislav Bolkhovitin 69feb6696e fcst: Linux kernel v4.11 build fix
Linux kernel v4.11 build fix.

Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7173 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-05-11 04:00:29 +00:00
Vladislav Bolkhovitin c0758f4699 scst: scst_finish_cmd() not try to left-shift lba of -1
Change scst_finish_cmd() so that it does not attempt to left-shift lba when it
is -1 (the error value).  Left-shifting of a negative value is undefined in C.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7172 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-05-11 03:57:04 +00:00
Vladislav Bolkhovitin db31c1d56b scst: nolockdep patch for kernel 4.10
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7171 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-05-11 03:52:51 +00:00
Vladislav Bolkhovitin 3f5c04bec9 qla2x00t: update to kernel 4.10
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7170 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-05-11 03:51:32 +00:00
Bart Van Assche 92a224a175 Merge branch 'svn-trunk' 2017-05-05 18:57:23 -07:00
Vladislav Bolkhovitin 06503ca3fb scst: nolockdep patch for kernel 4.9
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7169 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-05-06 01:31:59 +00:00
Bart Van Assche c3e5a9326c Merge branch 'svn-trunk' 2017-05-03 19:58:51 -07:00
Bart Van Assche 82f3e6804f scst/include/backport.h: Remove an incomplete FC backport 2017-05-03 19:58:06 -07:00
Bart Van Assche d1ad88a861 scst: Fix build for kernels before v2.6.39
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7168 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-05-04 02:56:27 +00:00
Bart Van Assche 386cd25f98 scst_lib: Convert a comment into a runtime check
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7167 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-05-04 02:45:35 +00:00
Bart Van Assche 3abfda9ec0 scstadmin: Fix a few bugs in the regression test code
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7166 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-05-04 02:36:37 +00:00
Bart Van Assche 62b12fb87d Merge branch 'svn-trunk' 2017-05-02 17:29:04 -07:00
Bart Van Assche 642744c9fc Fix spelling of "Ardis Technologies"
Reference: http://www.ddpsan.com/support-sales/about-us.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7165 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-05-02 22:32:06 +00:00
Bart Van Assche b2f00687fd scripts/generate-kernel-patch: Stop applying the put_page_callback and exec_req_fifo patches
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7164 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-05-02 18:32:56 +00:00
Bart Van Assche 50ed8ae2bb Merge branch 'svn-trunk' 2017-05-02 07:23:11 -07:00
Bart Van Assche edebe24bab scst: Fix build for kernels before v2.6.39
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7163 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-05-02 14:23:00 +00:00
Bart Van Assche 57b16a2fd8 scst_lib: Fix kernel 2.6.30 build
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7162 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-05-02 14:13:15 +00:00
Bart Van Assche acc573a2bb scripts: Update kernel download location
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7161 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-05-02 14:10:22 +00:00
Bart Van Assche 49f7595c09 Merge branch 'svn-trunk' 2017-05-01 22:30:46 -07:00
Bart Van Assche 7d9994593f qla2x00t: Convert the non-standard %Lx into %llx
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7160 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-05-02 05:28:29 +00:00
Bart Van Assche e39d23eb29 scst_sysfs: Fix spelling in a source code comment
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7159 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-05-02 05:18:05 +00:00