Commit Graph

2802 Commits

Author SHA1 Message Date
Bart Van Assche
4fd2d32b80 scripts: Merge from trunk
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4659 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-12-20 17:57:25 +00:00
Bart Van Assche
6185ae237c Add kernel 3.7 support (merge r4645..4647 from trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4651 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-12-18 09:45:35 +00:00
Bart Van Assche
ae741601fb scst: Fix a recently introduced race condition (merge r4491 from trunk)
Make scst_unregister_target() wait again until the session
unregistration callbacks have finished instead of waiting only
until all sessions have been unregistered.


git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4650 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-12-18 09:39:17 +00:00
Bart Van Assche
6b93cb0155 scst: Make extra_tgt_dev_list_entry users hold scst_mutex (merge r4386 from trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4649 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-12-18 09:33:24 +00:00
Bart Van Assche
0f7423dca9 scst: Rename scst_session.tgt_priv into sess_tgt_priv to minimize diffs with the trunk
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4648 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-12-18 09:14:10 +00:00
Bart Van Assche
1f17f29658 qla2x00t: Remove a superfluous check from q2t_remove_target() (merge r4312 from trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4634 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-11-28 14:17:32 +00:00
Bart Van Assche
47f66b3bad qla2x00t: Correct q2t_abort_task() (merge r4457 from trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4633 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-11-28 14:07:13 +00:00
Bart Van Assche
caf9e827e9 qla2x00t: Eliminate double req_q_cnt checks when there is enough headroom (merge r4135 from trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4632 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-11-28 14:02:31 +00:00
Bart Van Assche
e0e724f022 qla2x00t: q2t_pci_map_calc_cnt() cleanup and microoptimization (merge r4273 from trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4631 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-11-28 14:00:16 +00:00
Bart Van Assche
2e53594570 qla2x00t: Remove a superfluous cast (merge r4487 from trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4630 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-11-28 13:57:51 +00:00
Bart Van Assche
77d2f1aaf0 qla2x00t: Keep smatch happy (merge r4486 from trunk)
Smatch reports two warnings on the qla2x00t code:
* sess->local being tested while sess can be NULL.
* The code after the out_unreg_target2x label is only necessary in the procfs build.


git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4629 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-11-28 13:41:44 +00:00
Bart Van Assche
f781ba691a Fix incorrect error handling (merge r4494 from trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4628 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-11-25 08:48:29 +00:00
Bart Van Assche
0544c28695 scst_sysfs: Fix a help text (see also trunk r4483)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4627 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-11-25 08:37:37 +00:00
Bart Van Assche
391ae47690 Increment session refcount in scst_pre_rx_mgmt_cmd() instead of scst_post_rx_mgmt_cmd() (merge r4423 from trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4626 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-11-25 08:12:26 +00:00
Bart Van Assche
7ba44bbc51 ib_srpt: Avoid that module unloading races with closing sessions (merge r4446 from trunk)
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/branches/2.2.x@4625 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-11-23 13:44:26 +00:00
Bart Van Assche
a646aba835 scst: Don't suspend activity during removal of a SCSI device (merge r4399 from trunk)
SCST allows SCSI pass-through to SCSI devices registered with the SCSI
initiator core. SCST I/O activity has to be suspended before a LUN
that corresponds to such a SCSI device can be removed safely. Do not
suspend I/O when a SCSI device is being removed that has not been
exported as an SCST LUN such that removal of such devices does not
slow down I/O.



git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4624 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-11-23 09:02:10 +00:00
Bart Van Assche
e7ccb78272 RHEL 5.6 build fix (merge r3408 from trunk).
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4599 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-11-03 19:37:37 +00:00
Bart Van Assche
4c2c2c10c1 scst: Build fix for r4573
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4598 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-11-03 15:57:48 +00:00
Bart Van Assche
780f46cef4 scstadmin: Only enable /etc/init.d/scst in runlevels 3 and 5 since networking is not available in runlevels 2 or 4 (merge r4152 from trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4597 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-11-03 15:12:31 +00:00
Bart Van Assche
c9f05992d3 scstadmin: Suggest the user to use systemctl (systemd) instead of the LSB installation script if available (merge r4153 from trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4596 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-11-03 15:08:58 +00:00
Bart Van Assche
737aa4e5c7 scstadmin: Make /etc/init.d/scst status work on RHEL 6.2 (merge r4163 from trunk).
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4595 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-11-03 14:55:13 +00:00
Bart Van Assche
2ab470f796 scstadmin, FC (NPIV): Make -write_config save the "node_name" and "parent_host" attributes (merge r4306 from trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4594 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-11-03 14:53:17 +00:00
Bart Van Assche
7cc3997fd5 scstadmin: Make -write_config save the scst_local session name (merge r4304 and r4305 from trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4593 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-11-03 14:49:46 +00:00
Bart Van Assche
bc6da2b006 scstadmin: Allow hash signs to be escaped (merge r4391 from trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4592 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-11-03 14:48:14 +00:00
Bart Van Assche
ff41d8c887 scstadmin: Make _syswrite() translate EBUSY into "writing failed" (merge r4400 from trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4591 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-11-03 14:45:49 +00:00
Bart Van Assche
e991bd4845 scstadmin: Use $(DESTDIR) when uninstalling SCST 2.x startup scripts (merge r4536 from trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4590 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-11-03 14:42:15 +00:00
Bart Van Assche
9430abe77c scstadmin: Create /etc/default if it does not yet exist (merge r4537 from trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4589 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-11-03 14:40:33 +00:00
Bart Van Assche
d96929b17d qla2x00t: Relax the severity level of a diagnostic message (r4497)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4588 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-11-03 14:39:06 +00:00
Bart Van Assche
e562179bab scstadmin: Handle -EAGAIN when reading from sysfs (merge r4498 from trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4587 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-11-03 14:37:21 +00:00
Bart Van Assche
c758bd4ebd scst: Fix a comment in scst/include/scst.h (merge r4503 from trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4586 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-11-03 14:33:51 +00:00
Bart Van Assche
b5325996cf qla2x00t: Display a clear error message if the kernel is too old (merge r4510 from trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4585 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-11-03 14:32:40 +00:00
Bart Van Assche
c9b55878ad qla2x00t: Send back proper task management response code (merge r4529 from trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4584 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-11-03 14:30:10 +00:00
Bart Van Assche
3e8f92d470 SCST README: Document the LUN addressing method (merge r4527 from trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4583 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-11-03 14:28:21 +00:00
Bart Van Assche
1b3287f042 scst_vdisk/procfs: Fix a copy/paste error (merge r4528 from trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4582 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-11-03 14:26:40 +00:00
Bart Van Assche
917b56374d iscsi-scstd: Fix code for replacing an attribute value (merge r4545 from trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4581 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-11-03 14:15:23 +00:00
Bart Van Assche
5b106ecf63 scst, procfs: Fix a potential out-of-range array access (merge r4555 from trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4580 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-11-03 14:12:45 +00:00
Bart Van Assche
48f5401f55 iscsi-scstd: Add missing list_del() in the session creation error path (merge r4569 from trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4579 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-11-03 14:11:04 +00:00
Bart Van Assche
24ca2b8076 nightly build: Merge up to and including r4569 from trunk
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4578 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-11-03 14:05:18 +00:00
Bart Van Assche
b8dcba41c7 scripts: Merge up to and including r4569 from trunk
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4577 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-11-03 14:03:32 +00:00
Bart Van Assche
f6afe9f3ff Update for 3.6 kernels (merge r4538 from trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4576 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-11-03 13:59:50 +00:00
Bart Van Assche
287def7141 scst_local: Avoid deadlock during module removal with kernel 3.6 (merge r4566 from trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4575 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-11-03 13:56:12 +00:00
Bart Van Assche
18196379a8 Update for 3.6 kernels (merge r4538 and r4539 from trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4574 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-11-03 13:54:51 +00:00
Bart Van Assche
043b678ef4 scst_vdisk: Build fix for kernel 3.5.0 and later. Unfortunately this means (for now) no thin provisioning support on the 2.2.x branch with kernel 3.5.0 or later. Such support is available on the SCST trunk though.
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4573 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-11-03 13:52:27 +00:00
Bart Van Assche
4efdfaf368 nightly build: Add kernel 3.5 build infrastructure (merge r4460 from trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4572 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-11-03 13:29:38 +00:00
Bart Van Assche
2ae9bb3655 Update for 3.5 kernel (merge r4458 from trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4571 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-11-03 13:27:32 +00:00
Bart Van Assche
2d2df09c5a scst: Move ioctx manipulation code (merge r4254 from trunk)
Move the code for obtaining and releasing an I/O context out of
scst_process_active_cmd() in order to improve source code
readability.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>


git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4570 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-11-03 13:22:29 +00:00
Bart Van Assche
a67be01951 scst: Fix race between closing a session and adding a LUN
Fixes this call stack (kernel 3.2.15):
WARNING: at lib/kref.c:34 kref_get+0x2d/0x30()
Hardware name: X8ST3
Modules linked in: scst_vdisk ib_srpt scst
Pid: 2159, comm: scst_uid Tainted: G W 3.2.15-07+ #2
Call Trace:
[<ffffffff81059cba>] warn_slowpath_common+0x7a/0xb0
[<ffffffff81059d05>] warn_slowpath_null+0x15/0x20
[<ffffffff812a5d7d>] kref_get+0x2d/0x30
[<ffffffff812a46ba>] kobject_get+0x1a/0x30
[<ffffffff812a471b>] kobject_add_internal+0x4b/0x240
[<ffffffff812a4bf3>] kobject_init_and_add+0x63/0x90
[<ffffffffa001082b>] ? scst_tgt_dev_setup_threads+0xab/0x310 [scst]
[<ffffffffa001a722>] scst_tgt_dev_sysfs_create+0x42/0x80 [scst]
[<ffffffffa0010e8c>] scst_alloc_add_tgt_dev+0x31c/0x4b0 [scst]
[<ffffffffa001362e>] scst_acg_add_lun+0xfe/0x230 [scst]
[<ffffffff812b4511>] ? _kstrtoull+0x31/0x90
[<ffffffffa001777c>] scst_luns_mgmt_store_work_fn+0x29c/0x6b0 [scst]
[<ffffffffa0019634>] sysfs_work_thread_fn+0xd4/0x2e0 [scst]
[<ffffffff8107a020>] ? wake_up_bit+0x40/0x40
[<ffffffffa0019560>] ? scst_tgt_cpu_mask_show+0x20/0x20 [scst]
[<ffffffff81079ab6>] kthread+0x96/0xa0
[<ffffffff8163d7b4>] kernel_thread_helper+0x4/0x10
[<ffffffff81079a20>] ? kthread_worker_fn+0x190/0x190
[<ffffffff8163d7b0>] ? gs_change+0x13/0x13

Reported-by: Sebastian Riemer <sebastian.riemer@profitbricks.com>

(Merge r4452:4456 and r4464 from trunk).


git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4506 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-09-07 10:03:02 +00:00
Bart Van Assche
23390aca64 scst: sysfs session creation error path fix
The attached patch prevents that a kernel oops is triggered if something
fails when adding a session to sysfs.

(Merge r4388 from trunk)


git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4451 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-07 13:01:19 +00:00
Bart Van Assche
fc8b2d910b scripts/rebuild-rhel-kernel-rpm: Add RHEL 6.3 support (merge from trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4444 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-07-29 16:54:53 +00:00
Bart Van Assche
c4c2555dc9 qla2x00t: Port to RHEL 6.1/6.2/6.3 (merge r4303 and r4419 from trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4442 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-07-29 16:46:58 +00:00