Bart Van Assche
69ee3d89a0
mpt: Do not explicitly initialize statics to zero
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5206 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-19 09:06:13 +00:00
Bart Van Assche
b065605333
mpt: Avoid that checkpatch complains about stm_[gs]et_dma_addr()
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5205 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-19 09:04:16 +00:00
Bart Van Assche
87c68579ca
mpt: Fix whitespace errors reported by checkpatch
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5204 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-19 08:59:20 +00:00
Bart Van Assche
91419daa26
mpt: Fix two checkpatch complaints about asm include files
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5203 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-19 08:56:28 +00:00
Bart Van Assche
2796006f3c
mpt: Fix whitespace errors reported by checkpatch
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5202 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-19 08:54:08 +00:00
Bart Van Assche
974b9fb862
mpt: sysfs mode build fix
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5201 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-19 08:17:30 +00:00
Bart Van Assche
34d18e943e
mpt: Port to kernel 3.12 and fix compiler warnings
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5200 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-18 17:48:45 +00:00
Bart Van Assche
f6d1105ed8
mpt: Clean up compiler include path
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5199 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-18 17:47:37 +00:00
Bart Van Assche
7edf970426
scst, procfs: Avoid that adding a device to a group triggers a kernel oops
...
This patch fixes the following kernel oops:
BUG: unable to handle kernel NULL pointer dereference at 0000000000000178
IP: [<ffffffffa031bbc8>] scst_acg_add_lun+0x178/0x300 [scst]
Oops: 0000 [#1 ] PREEMPT SMP
CPU: 3 PID: 7451 Comm: scstadmin Tainted: G O 3.13.0-rc3-debug+ #1
Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
RIP: 0010:[<ffffffffa031bbc8>] [<ffffffffa031bbc8>] scst_acg_add_lun+0x178/0x300 [scst]
Call Trace:
[<ffffffffa03222cf>] scst_proc_groups_devices_write+0x78f/0x890 [scst]
[<ffffffff8119dad8>] proc_reg_write+0x38/0x70
[<ffffffff81141562>] vfs_write+0xb2/0x1f0
[<ffffffff81141c57>] SyS_write+0x47/0xa0
[<ffffffff814efdb9>] system_call_fastpath+0x16/0x1b
Code: 00 00 48 8b 4d b8 49 c7 c1 80 5a 34 a0 41 b8 ce 0d 00 00 48 8b 3d c1 15 03 00 48 c7 c2 42 ba 33 a0 48 c7 c6 31 ba 33 a0 48 8b 01 <48> 8b 80 78 01 00 00 48 89 44 24 20 8b 45 a4 89 44 24 18 48 8b
RIP [<ffffffffa031bbc8>] scst_acg_add_lun+0x178/0x300 [scst]
RSP <ffff88001f4a9de8>
CR2: 0000000000000178
This regression was introduced in commit "Small logging improvement"
(trunk r4838; 2013-04-12).
Signed-off-by: Sebastian Herbszt <herbszt@gmx.de >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5198 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-17 08:01:17 +00:00
Bart Van Assche
6bf914d599
nightly build: Update kernel versions
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5197 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-16 16:11:23 +00:00
Bart Van Assche
a57c9d0cee
fcst: Fix a potential deadlock
...
This patch fixes the following lockdep warning:
======================================================
[ INFO: possible circular locking dependency detected ]
3.13.0-rc6-debug+ #5 Tainted: G W O
-------------------------------------------------------
rmmod/8653 is trying to acquire lock:
(scst_tgt_kref){+.+.+.}, at: [<ffffffffa033de6f>] scst_tgt_sysfs_put+0x10f/0x190 [scst]
but task is already holding lock:
(ft_lport_lock){+.+.+.}, at: [<ffffffffa029d3db>] ft_lport_del+0x1b/0x40 [fcst]
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #1 (ft_lport_lock){+.+.+.}:
[<ffffffff8109b4b4>] lock_acquire+0xa4/0x1e0
[<ffffffff81559837>] mutex_lock_nested+0x77/0x430
[<ffffffffa029d5a0>] ft_tgt_enable+0x20/0xd0 [fcst]
[<ffffffffa0335c99>] scst_process_tgt_enable_store+0xe9/0x230 [scst]
[<ffffffffa0335dfc>] scst_tgt_enable_store_work_fn+0x1c/0x20 [scst]
[<ffffffffa0338ebc>] scst_process_sysfs_works+0xfc/0x1f0 [scst]
[<ffffffffa033d180>] sysfs_work_thread_fn+0x120/0x2b0 [scst]
[<ffffffff81074850>] kthread+0xf0/0x110
[<ffffffff815663fc>] ret_from_fork+0x7c/0xb0
-> #0 (scst_tgt_kref){+.+.+.}:
[<ffffffff8109a95b>] __lock_acquire+0x17ab/0x1b10
[<ffffffff8109b4b4>] lock_acquire+0xa4/0x1e0
[<ffffffffa03375b9>] scst_kobject_put_and_wait+0x99/0x260 [scst]
[<ffffffffa033de6f>] scst_tgt_sysfs_put+0x10f/0x190 [scst]
[<ffffffffa03053dc>] scst_unregister_target+0x15c/0x3c0 [scst]
[<ffffffffa029c69c>] ft_tport_delete+0x2c/0xa0 [fcst]
[<ffffffffa029d3ec>] ft_lport_del+0x2c/0x40 [fcst]
[<ffffffffa023e249>] fc_lport_iterate+0x49/0x80 [libfc]
[<ffffffffa029d804>] ft_module_exit+0x36/0x832 [fcst]
[<ffffffff810cd3f2>] SyS_delete_module+0x152/0x1f0
[<ffffffff815664a9>] system_call_fastpath+0x16/0x1b
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0 CPU1
---- ----
lock(ft_lport_lock);
lock(scst_tgt_kref);
lock(ft_lport_lock);
lock(scst_tgt_kref);
*** DEADLOCK ***
2 locks held by rmmod/8653:
#0 : (fc_prov_mutex){+.+.+.}, at: [<ffffffffa023e222>] fc_lport_iterate+0x22/0x80 [libfc]
#1 : (ft_lport_lock){+.+.+.}, at: [<ffffffffa029d3db>] ft_lport_del+0x1b/0x40 [fcst]
stack backtrace:
CPU: 0 PID: 8653 Comm: rmmod Tainted: G W O 3.13.0-rc6-debug+ #5
Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
ffffffff8222ce70 ffff88002efdbb70 ffffffff8155551c ffffffff8222ce70
ffff88002efdbbb0 ffffffff81552248 ffff88002efdbc00 ffff88002ed0ed88
ffff88002ed0e6d0 0000000000000002 0000000000000002 ffff88002ed0ed88
Call Trace:
[<ffffffff8155551c>] dump_stack+0x4e/0x7a
[<ffffffff81552248>] print_circular_bug+0x200/0x20f
[<ffffffff8109a95b>] __lock_acquire+0x17ab/0x1b10
[<ffffffff8109b4b4>] lock_acquire+0xa4/0x1e0
[<ffffffffa03375b9>] scst_kobject_put_and_wait+0x99/0x260 [scst]
[<ffffffffa033de6f>] scst_tgt_sysfs_put+0x10f/0x190 [scst]
[<ffffffffa03053dc>] scst_unregister_target+0x15c/0x3c0 [scst]
[<ffffffffa029c69c>] ft_tport_delete+0x2c/0xa0 [fcst]
[<ffffffffa029d3ec>] ft_lport_del+0x2c/0x40 [fcst]
[<ffffffffa023e249>] fc_lport_iterate+0x49/0x80 [libfc]
[<ffffffffa029d804>] ft_module_exit+0x36/0x832 [fcst]
[<ffffffff810cd3f2>] SyS_delete_module+0x152/0x1f0
[<ffffffff815664a9>] system_call_fastpath+0x16/0x1b
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5196 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-16 15:23:45 +00:00
Bart Van Assche
6d7fb6343d
fcst: Avoid that "rmmod fcst" hangs
...
Make sure that SCST sessions get unregistered when scst_unregister_target()
is invoked. This change is necessary because of r5083 ("Disable automatic
sessions unregistration").
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5195 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-16 15:22:00 +00:00
Bart Van Assche
0e99ba02b5
qla2x00t: SLES 11 SP3 build fix
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5190 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-10 07:54:10 +00:00
Bart Van Assche
f0b1893e71
nightly build: Update kernel versions
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5189 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-10 07:52:24 +00:00
Bart Van Assche
9690e0f1c3
fcst: SLES 11 SP3 build fix
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5188 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-10 07:50:10 +00:00
Bart Van Assche
54cbef15e8
nightly build: Update kernel versions
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5187 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-08 19:38:41 +00:00
Bart Van Assche
a0bc415649
ib_srpt, ib_srpt.h: Fix kernel-doc warnings
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5186 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-07 14:26:25 +00:00
Bart Van Assche
3fe1a7f5d4
ib_srpt, README: Document how to detect excessive packet loss
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5185 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-07 14:13:49 +00:00
Bart Van Assche
922a8f8178
ibmvstgt: Add #include <linux/module.h> in libsrp.c
...
Include <linux/module.h> in order to fix the following errors:
ibmvstgt/src/libsrp.c:477:20: error: expected declaration specifiers or ?...? before string constant
MODULE_DESCRIPTION("SCSI RDMA Protocol lib functions");
^
ibmvstgt/src/libsrp.c:478:15: error: expected declaration specifiers or ?...? before string constant
MODULE_AUTHOR("FUJITA Tomonori");
^
ibmvstgt/src/libsrp.c:479:16: error: expected declaration specifiers or ?...? before string constant
MODULE_LICENSE("GPL");
^
Signed-off-by: Sebastian Herbszt <herbszt@gmx.de >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5184 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-04 14:06:02 +00:00
Bart Van Assche
828fcc6fbd
ibmvstgt: Remove the obsolete __devinitdata attribute
...
See also upstream commit "Drivers: misc: remove __dev* attributes"
(0fe763c570ad2701c830b9e4e53c65ad89c11c32; kernel 3.8).
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5183 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-04 14:03:56 +00:00
Bart Van Assche
53c344a10e
iscsi-scst: Kernel 3.13 build fix
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5182 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-02 17:20:00 +00:00
Bart Van Assche
f371a10df0
scst_lib: Kernel 3.13 build fix
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5181 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-02 17:19:42 +00:00
Bart Van Assche
1814d2777c
nightly build: Update kernel versions
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5180 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-12-24 13:51:34 +00:00
Bart Van Assche
1f2df6eb44
nightly build: Update kernel versions
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5179 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-12-24 11:01:08 +00:00
Bart Van Assche
d482d1752f
scst_mem: Suppress recently introduced sparse warnings
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5178 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-12-24 10:43:06 +00:00
Bart Van Assche
4bdc945cdd
scripts/run-regression-tests: Add 'make rpm' test
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5177 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-12-24 10:42:22 +00:00
Bart Van Assche
65bfdc746d
scst_mem: Build fix for kernel versions before 2.6.35 (see also r5163)
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5174 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-12-22 10:15:08 +00:00
Bart Van Assche
cd16bfdf42
scripts/rebuild-rhel-kernel-rpm: Embed '.scst' in the generated kernel RPM names
...
An example for RHEL 6.5:
kernel-2.6.32-431.1.2.0.1.el6.scst.x86_64.rpm
kernel-debuginfo-2.6.32-431.1.2.0.1.el6.scst.x86_64.rpm
kernel-debuginfo-common-x86_64-2.6.32-431.1.2.0.1.el6.scst.x86_64.rpm
kernel-devel-2.6.32-431.1.2.0.1.el6.scst.x86_64.rpm
kernel-firmware-2.6.32-431.1.2.0.1.el6.scst.x86_64.rpm
kernel-headers-2.6.32-431.1.2.0.1.el6.scst.x86_64.rpm
perf-2.6.32-431.1.2.0.1.el6.scst.x86_64.rpm
perf-debuginfo-2.6.32-431.1.2.0.1.el6.scst.x86_64.rpm
python-perf-2.6.32-431.1.2.0.1.el6.scst.x86_64.rpm
python-perf-debuginfo-2.6.32-431.1.2.0.1.el6.scst.x86_64.rpm
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5173 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-12-22 10:05:02 +00:00
Bart Van Assche
320d2c42d2
scripts/rebuild-rhel-kernel-rpm: Add RHEL 6.4 and RHEL 6.5 support
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5172 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-12-22 10:03:41 +00:00
Bart Van Assche
1e897454b2
iscsi-scst/kernel/patches/rhel/put_page_callback-2.6.32-431.patch: put_page_callback patch for RHEL 6.5
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5171 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-12-22 10:02:54 +00:00
Bart Van Assche
d94f6b40e5
scripts/rebuild-rhel-kernel-rpm, log(): Interpret control characters correctly
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5170 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-12-21 20:06:52 +00:00
Vladislav Bolkhovitin
3d8f34c50a
Fix hang under load + avoid unneeded logging
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5169 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-12-21 05:08:26 +00:00
Vladislav Bolkhovitin
6cfeda64ca
Cleanup and clarification of allocation masks handling
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5166 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-12-20 03:41:44 +00:00
Bart Van Assche
4b48ce668b
nightly build: Add kernel 3.12
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5165 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-12-19 08:09:15 +00:00
Bart Van Assche
f5a8248cb7
nightly build: Add kernel 3.12 build infrastructure
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5164 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-12-19 08:07:15 +00:00
Vladislav Bolkhovitin
60d49c8451
Update for kernel 3.12
...
May be not completed, because this kernel has too many internal issues
reported after enabling "Kernel hacking" config options
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5163 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-12-19 05:15:48 +00:00
Bart Van Assche
7a82927e0a
scripts/rebuild-rhel-kernel-rpm: Add RHEL 6.4 support
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5162 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-12-18 16:23:34 +00:00
Bart Van Assche
7c4a91a517
scripts/rebuild-rhel-kernel-rpm: Fix a comment
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5161 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-12-18 16:22:24 +00:00
Bart Van Assche
5d9cbdabf6
scripts/rebuild-rhel-kernel-rpm: Add support for Oracle Linux 6
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5160 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-12-18 14:57:21 +00:00
Vladislav Bolkhovitin
81349d12a7
scst: Kernel >= 3.10 procfs build fix
...
The following procfs-related changes have been included in kernel 3.10:
- The PDE() macro has been removed from <linux/proc_fs.h>.
- The create_proc_entry() function has been removed.
- The proc_info field has been removed from struct scsi_host_template.
Unbreak the procfs build for kernel versions >= 3.10
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5148 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-12-18 05:58:09 +00:00
Vladislav Bolkhovitin
d2976ad7ce
scst: set_cpus_allowed_ptr() workaround for RHEL 5.10
...
Apparently RHEL 5.9 has an implementation of set_cpus_allowed_ptr()
but RHEL 5.10 not. Work around this by providing an implementation.
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5147 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-12-18 05:56:14 +00:00
Vladislav Bolkhovitin
b628b36da3
scst: RHEL 5 build fixes
...
Avoid that compilation fails on RHEL 5.9. In the RHEL 5.9 kernel headers
neither __printf() nor sg_is_last() has been defined. Additionally, the
variable 'fd' in vdisk_unmap_range() is only defined when building against
kernel version > 2.6.27.
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5146 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-12-18 05:55:31 +00:00
Bart Van Assche
bea15720dc
scst_vdisk, procfs mode: Rework r5111
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5145 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-12-17 16:17:42 +00:00
Bart Van Assche
06a3995b01
scstadmin/scstadmin.procfs/Makefile: Fix installation path
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5144 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-12-17 11:40:50 +00:00
Bart Van Assche
506a3fd76e
scripts/run-regression-tests: Detect compilation failures properly
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5143 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-12-17 08:15:33 +00:00
Vladislav Bolkhovitin
ea4a132a4b
scst: Remove the unused variable scst_main_lock
...
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5142 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-12-14 05:51:37 +00:00
Vladislav Bolkhovitin
98a22c124e
Fix currently disabled setting of LBPRZ in INQUIRY
...
Reported by Steve Looby <slooby@permabit.com >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5141 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-12-14 05:50:25 +00:00
Bart Van Assche
82dcd52240
nightly build: Update kernel versions
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5140 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-12-05 13:30:43 +00:00
Vladislav Bolkhovitin
70ce10d351
Follow up for the previous commit
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5139 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-12-05 04:15:42 +00:00
Vladislav Bolkhovitin
26b9e5eaad
Fix write resuduals handling on data receive error
...
By default data receive error it should be assumed that no data
received, not that all data received as it is currently
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5138 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-12-05 04:05:49 +00:00