Commit Graph

569 Commits

Author SHA1 Message Date
Bart Van Assche
0fd03d44b1 srpt/Testing.txt: Limit to 80 columns
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4652 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-12-18 09:51:08 +00:00
Bart Van Assche
12313bf114 nightly build: Add kernel 3.7 patches
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4647 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-12-18 08:54:50 +00:00
Bart Van Assche
dc816a4a16 srpt/Testing.txt: Minor updates
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4618 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-11-14 08:25:53 +00:00
Bart Van Assche
edadea8fd0 ib_srpt: RHEL 5.3 build fix
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4603 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-11-05 08:53:35 +00:00
Bart Van Assche
9e1b02afa8 ib_srpt: Remove an unused variable
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4554 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-10-08 14:09:27 +00:00
Bart Van Assche
8801f5babf ib_srpt: Convert 'sizeof e' into 'sizeof(e)'
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4540 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-10-02 08:29:45 +00:00
Bart Van Assche
b2567396f8 nightly build: Add kernel 3.6 support patches
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4539 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-10-02 08:17:58 +00:00
Bart Van Assche
3d1468cfac ib_srpt: Convert two functions two single-exit style
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4516 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-09-13 08:15:23 +00:00
Vladislav Bolkhovitin
8ce28aaba2 Avoid that enabling a target too quickly triggers a crash
The sysfs attributes of a target can be accessed before scst_tgt.tgt_priv
has been set. Avoid that such an access triggers a crash.

Symptom:
BUG: unable to handle kernel NULL pointer dereference at 000000000000004c
IP: [<ffffffffa1345848>] iscsi_is_target_enabled+0x8/0x20 [iscsi_scst]
PGD 150a4c067 PUD 13cacb067 PMD 0
Oops: 0000 [#1] SMP
CPU 1
Modules linked in: zfs(P) iscsi_scst(O) scst_vdisk(O) scst(O) zcommon(P) znvpair(P) zavl(P) zunicode(P) spl(O) [last unloaded: zfs]
Pid: 3974, comm: scst_uid1864 Tainted: P           O 3.2.23-zfsiscsi-std-ipv6-64 #3 Supermicro X6DVA/X6DVA
RIP: 0010:[<ffffffffa1345848>]  [<ffffffffa1345848>] iscsi_is_target_enabled+0x8/0x20 [iscsi_scst]
RSP: 0018:ffff88015071ddc0  EFLAGS: 00010282
RAX: 0000000000000000 RBX: ffff880181fdaa00 RCX: ffff88012d41f380
RDX: ffff88015071c010 RSI: 0000000000000000 RDI: ffff880181fdaa00
RBP: ffff88015071ddc0 R08: 0000000000000000 R09: 0000000000000001
R10: 0000000000000001 R11: 0000000000000001 R12: ffffffffa134a608
R13: 0000000000000000 R14: 0000000000000129 R15: ffffffffa134a4c0
FS:  0000000000000000(0000) GS:ffff88019fc80000(0000)
knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 000000000000004c CR3: 0000000151927000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process scst_uid1864 (pid: 3974, threadinfo ffff88015071c000, task ffff880194d57500)
Stack:
 ffff88015071de10 ffffffffa12ee89a 00000000fffffffc 01ff88015071de98
 ffff88015071de80 ffff8801932a48d8 00000000fffffffc ffff88015071de98
 ffff88015071de80 ffff880194d57500 ffff88015071de30 ffffffffa12f582e
Call Trace:
 [<ffffffffa12ee89a>] __scst_is_relative_target_port_id_unique+0x6a/0xc0 [scst]
 [<ffffffffa12f582e>] gen_relative_target_port_id+0x6e/0xd0 [scst]
 [<ffffffffa12fdb8a>] scst_tgt_enable_store_work_fn+0x3a/0xe0 [scst]
 [<ffffffffa12f9397>] sysfs_work_thread_fn+0xc7/0x2e0 [scst]
 [<ffffffffa12f92d0>] ? scst_tgtt_release+0x20/0x20 [scst]
 [<ffffffffa12f92d0>] ? scst_tgtt_release+0x20/0x20 [scst]
 [<ffffffff810b44f6>] kthread+0x96/0xa0
 [<ffffffff81b8ed74>] kernel_thread_helper+0x4/0x10
 [<ffffffff810b4460>] ? kthread_worker_fn+0x180/0x180
 [<ffffffff81b8ed70>] ? gs_change+0xb/0xb
Code: 42 c8 74 0f 39 78 48 75 ea c9 c3 0f 1f 84 00 00 00 00 00 31 c0 c9 c3 66 66 66 2e 0f 1f 84 00 00 00 00 00 48 8b 47 48 55 48 89 e5 <0f> b6 40 4c c9 83 e0 01 c3 66 66 66 66 66 66 2e 0f 1f 84 00 00
RIP  [<ffffffffa1345848>] iscsi_is_target_enabled+0x8/0x20 [iscsi_scst]
 RSP <ffff88015071ddc0>
CR2: 000000000000004c
---[ end trace 6311d4069703be07 ]---

Reported-by: Etienne Dechamps <e-t172@akegroup.org>
Signed-off-by: Bart Van Assche <bvanassche@acm.org> with some modifications



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4515 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-09-12 22:13:43 +00:00
Bart Van Assche
14e29d815e ib_srpt README: Add more performance notes
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4514 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-09-12 14:06:47 +00:00
Bart Van Assche
d8b5dd28b4 ib_srpt README: Add more performance notes
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4511 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-09-11 15:58:29 +00:00
Bart Van Assche
1b9567a1cd srpt/README: Recommend to use SLAB instead of SLUB
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4508 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-09-07 12:36:15 +00:00
Bart Van Assche
ab28f2aaa3 srpt/README: Recommend to disable CONFIG_SCHED_DEBUG and CONFIG_SCHEDSTATS
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4507 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-09-07 12:20:05 +00:00
Bart Van Assche
b84cf67525 ib_srpt: Update README
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4502 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-31 14:59:16 +00:00
Bart Van Assche
e0f7025708 nightly build: Add kernel 3.5 build infrastructure
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4460 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-09 08:07:26 +00:00
Bart Van Assche
2df95bda26 ib_srpt: Document an additional test
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4448 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-05 09:26:24 +00:00
Bart Van Assche
123911a2c3 ib_srpt: Document impact of interrupt assignment on fairness
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4447 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-04 14:36:27 +00:00
Bart Van Assche
36a77c3708 ib_srpt: Avoid that module unloading races with closing sessions
Fixed issue:

BUG: unable to handle kernel paging request at ffffffffa04dc479
IP: [<ffffffffa04dc479>] 0xffffffffa04dc478
Oops: 0010 [#1] SMP
Pid: 29313, comm: srpt_mlx4_0-2 Tainted: G           O 3.6.0-rc1-debug+ #1
Process srpt_mlx4_0-2
Call Trace:
 [<ffffffff8106254e>] ? kthread+0xae/0xc0
 [<ffffffff81418464>] ? kernel_thread_helper+0x4/0x10
 [<ffffffff8140f080>] ? _raw_spin_unlock_irq+0x30/0x50
 [<ffffffff810983ad>] ? trace_hardirqs_on+0xd/0x10
 [<ffffffff8140f359>] ? retint_restore_args+0xe/0xe
 [<ffffffff810624a0>] ? __init_kthread_worker+0x70/0x70
 [<ffffffff81418460>] ? gs_change+0xb/0xb
Code:  Bad RIP value.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4446 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-04 08:36:57 +00:00
Vladislav Bolkhovitin
955113f493 Sense handling improvements
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4408 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-07-18 21:28:57 +00:00
Bart Van Assche
44df4a03b6 ib_srpt: Document InfiniBand partition key choice
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4373 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-06-22 11:58:43 +00:00
Bart Van Assche
47b2487b94 ib_srpt: Fix a checkpatch complaint
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4363 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-06-19 07:26:24 +00:00
Bart Van Assche
f53d181d40 ib_srpt: Fix procfs build
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4362 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-06-19 06:23:21 +00:00
Bart Van Assche
a951696f3c ib_srpt README: Fix a typo
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4355 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-06-18 12:11:34 +00:00
Bart Van Assche
bef07c9d31 ib_srpt: Add one target per port support. Makes it possible to configure LUN
masking per IB HCA port instead of per HCA, just like what is possible with FC.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4354 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-06-18 12:10:53 +00:00
Bart Van Assche
178d0bd692 ib_srpt: Remove a superfluous comparison statement
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4353 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-06-18 11:27:02 +00:00
Bart Van Assche
a30d8b64ac ib_srpt README: Bring in sync with scstadmin documentation
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4352 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-06-18 11:24:57 +00:00
Bart Van Assche
1b159eec24 nightly build: Add kernel 3.4 build infrastructure
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4321 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-24 19:52:39 +00:00
Bart Van Assche
065a1d7529 ib_srpt: Add a comment
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4315 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-23 08:24:05 +00:00
Bart Van Assche
907bc8222d ib_srpt: Make sure that a DREP is sent to the initiator if a DREQ is received while a session is being closed
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4313 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-23 07:32:02 +00:00
Bart Van Assche
d99379104b ib_srpt, procfs: Fix a compiler warning introduced in r4260
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4310 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-19 08:12:07 +00:00
Bart Van Assche
44978416d4 ib_srpt: Slightly reduce the CPU load caused by the srpt thread(s).
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4300 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-14 17:56:49 +00:00
Bart Van Assche
5256d37f42 ib_srpt: Make SCST I/O context configurable at compile time
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4299 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-14 17:42:37 +00:00
Bart Van Assche
ea47b3c059 ib_srpt: Fix spelling in a source code comment
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4298 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-14 15:09:36 +00:00
Bart Van Assche
7596ffd7dd ib_srpt: Reduce RDMA_COMPL_TIMEOUT_S back to its original value now that read and write processing happens again on the context of the SCST command threads instead of the srpt completion thread
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4289 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-07 14:59:57 +00:00
Bart Van Assche
48fc76ecb4 ib_srpt: Revert most of r4282 - a channel must be added to the channel list before unlocking the spinlock such that the completion thread can safely invoke list_del()
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4284 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-04 17:18:22 +00:00
Bart Van Assche
1baaaea48b ib_srpt: Test earlier during login whether a port has been disabled
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4282 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-04 13:49:04 +00:00
Bart Van Assche
4b47a45373 ib_srpt: Make the login log line easier to read
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4281 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-04 13:45:25 +00:00
Bart Van Assche
8f334bd78e ib_srpt: Fix a few (theoretical ?) race conditions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4278 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-03 11:00:39 +00:00
Bart Van Assche
30cfdfd079 ib_srpt, Testing.txt: Add a test
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4277 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-03 09:55:41 +00:00
Bart Van Assche
5496aa9c2d ib_srpt, Testing.txt: Add a test
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4276 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-03 09:03:09 +00:00
Bart Van Assche
5710833147 ib_srpt, Testing.txt: Minor corrections
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4275 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-03 08:48:43 +00:00
Bart Van Assche
1d6daae29e ib_srpt: Handle thread creation failure properly
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4270 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-02 15:19:40 +00:00
Bart Van Assche
dc94ba7d76 ib_srpt: Simplify login error handling code
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4269 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-02 15:18:24 +00:00
Bart Van Assche
08a2d59408 ib_srpt: Correct __srpt_close_ch() comments.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4268 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-02 15:16:40 +00:00
Bart Van Assche
c2cea7b776 ib_srpt: Handle thread creation failure properly
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4267 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-02 13:57:07 +00:00
Bart Van Assche
ac77b3110d ib_srpt: Rename a label
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4266 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-02 13:48:54 +00:00
Bart Van Assche
11f5cf447c ib_srpt: Add a comment
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4265 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-02 09:46:04 +00:00
Bart Van Assche
8d775b8f39 ib_srpt: Replace list_for_each_entry_safe() by list_for_each_entry() where this is safe
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4264 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-02 09:35:40 +00:00
Bart Van Assche
7937b1b5cb ib_srpt: Remove an unused variable
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4263 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-02 09:30:22 +00:00
Bart Van Assche
fcfe100b79 ib_srpt, procfs: Remove code that shows the login information - it is redundant to the ibsrpdm output anyway.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4260 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-05-01 18:22:30 +00:00