Commit Graph

3333 Commits

Author SHA1 Message Date
Vladislav Bolkhovitin
cdb13cfc5f Cleanups
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4456 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-08 18:00:51 +00:00
Bart Van Assche
b958a82132 scst: Fix a recently introduced checkpatch complaint
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4455 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-08 07:02:36 +00:00
Bart Van Assche
46a3540873 scst: Make sure that scst_get_unique_sess_name() is called under scst_mutex
such that session names are again guaranteed to be unique (follow-up for r4452).


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4454 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-07 18:06:37 +00:00
Bart Van Assche
239d6243ec 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>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4453 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-07 17:29:58 +00:00
Bart Van Assche
736b99485d scst: Move the code for computing a unique session name
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4452 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-07 17:28:34 +00:00
Bart Van Assche
e81d1b552b nightly build: Factor out shared code into a new function
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4450 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-07 12:00:41 +00:00
Bart Van Assche
8df49947fa nightly build: Move shell code for listing files under source control into a separate file
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4449 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-07 11:40:09 +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
Bart Van Assche
0a1bb6e997 nightly build: Report smatch informational messages too
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4445 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-01 09:45:40 +00:00
Bart Van Assche
fe9902a67a scripts/rebuild-rhel-kernel-rpm: Add RHEL 6.3 support
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4443 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-07-29 16:50:00 +00:00
Bart Van Assche
ad8aea579b nightly build: Kernel version update
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4431 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-07-29 09:51:16 +00:00
Bart Van Assche
5e12b3e480 scripts/run-regression-tests: Run smatch too
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4430 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-07-29 08:28:56 +00:00
Vladislav Bolkhovitin
fabf9fceda Avoid that removing the scst_local kernel module triggers a deadlock
when one of its LUNs is a CD-ROM device. sr_block_release() invokes
scst_local_release_adapter() indirectly with sr_mutex held. So if 
scst_local_release_adapter() blocks until the scst_local session has
been freed a deadlock may be triggered if another CD-ROM device has
to be closed in order to free that session. Fix this by changing
scst_local_release_adapter() such that it does not wait until the
session unregistration has finished.

Call stacks obtained with echo w > /proc/sysrq-trigger:

SysRq : Show Blocked State
  task                        PC stack   pid father
scst_mgmtd      D ffffffff812f979d     0  5552      2 0x00000000
 ffff88003c335b30 0000000000000046 ffffffff812f979d 0000000000000002
 ffff8800171d47a0 ffff88003c335fd8 ffff88003c335fd8 ffff88003c335fd8
 ffff88003d1b0000 ffff8800171d47a0 ffff88003c335b60 ffff88003c334000
Call Trace:
 [<ffffffff812f979d>] ? sr_block_release+0x2d/0x60
 [<ffffffff812f979d>] ? sr_block_release+0x2d/0x60
 [<ffffffff814a9b19>] schedule+0x29/0x70
 [<ffffffff814a9e57>] schedule_preempt_disabled+0x27/0x40
 [<ffffffff814a79b7>] mutex_lock_nested+0x187/0x390
 [<ffffffff812f979d>] ? sr_block_release+0x2d/0x60
 [<ffffffff812f979d>] sr_block_release+0x2d/0x60
 [<ffffffff8118a1ec>] __blkdev_put+0x19c/0x1d0
 [<ffffffff8118a27d>] blkdev_put+0x5d/0x180
 [<ffffffff8118a3c8>] blkdev_close+0x28/0x30
 [<ffffffff81153633>] fput+0x103/0x280
 [<ffffffff8114fad9>] filp_close+0x69/0x90
 [<ffffffffa022ec24>] vdisk_detach_tgt+0x134/0x150 [scst_vdisk]
 [<ffffffffa02d8f2f>] scst_free_tgt_dev+0xdf/0x220 [scst]
 [<ffffffffa02d949f>] ? scst_free_session_callback+0x7f/0x170 [scst]
 [<ffffffffa02d90eb>] scst_sess_free_tgt_devs+0x7b/0x110 [scst]
 [<ffffffffa02d91de>] scst_free_session+0x5e/0x2a0 [scst]
 [<ffffffffa02d94be>] scst_free_session_callback+0x9e/0x170 [scst]
 [<ffffffffa02c6a05>] scst_global_mgmt_thread+0x2e5/0x580 [scst]
 [<ffffffff8105e850>] ? __init_waitqueue_head+0x60/0x60
 [<ffffffffa02c6720>] ? scst_register_session_non_gpl+0x20/0x20 [scst]
 [<ffffffff8105dd77>] kthread+0xb7/0xc0
 [<ffffffff814b50b4>] kernel_thread_helper+0x4/0x10
 [<ffffffff814abb30>] ? retint_restore_args+0x13/0x13
 [<ffffffff8105dcc0>] ? __init_kthread_worker+0x70/0x70
 [<ffffffff814b50b0>] ? gs_change+0x13/0x13
iscsi-scstd     D ffffffffa02b1b1f     0  5567      1 0x00000004
 ffff88003c2f59a8 0000000000000046 ffffffffa02b1b1f 0000000000000002
 ffff8800173b23d0 ffff88003c2f5fd8 ffff88003c2f5fd8 ffff88003c2f5fd8
 ffff88003d198000 ffff8800173b23d0 ffff88003c2f59d8 ffff88003c2f4000
Call Trace:
 [<ffffffffa02b1b1f>] ? scst_unregister_target+0x8f/0x450 [scst]
 [<ffffffffa02b1b1f>] ? scst_unregister_target+0x8f/0x450 [scst]
 [<ffffffff814a9b19>] schedule+0x29/0x70
 [<ffffffff814a9e57>] schedule_preempt_disabled+0x27/0x40
 [<ffffffff814a79b7>] mutex_lock_nested+0x187/0x390
 [<ffffffffa02b1b1f>] ? scst_unregister_target+0x8f/0x450 [scst]
 [<ffffffffa025c7ba>] ? __iscsi_del_attr+0xea/0x190 [iscsi_scst]
 [<ffffffffa02b1b1f>] scst_unregister_target+0x8f/0x450 [scst]
 [<ffffffffa025c7ba>] ? __iscsi_del_attr+0xea/0x190 [iscsi_scst]
 [<ffffffffa026249f>] target_destroy+0x5f/0xc0 [iscsi_scst]
 [<ffffffffa02631f2>] target_del_all+0xf2/0x2d0 [iscsi_scst]
 [<ffffffffa025c8aa>] release+0x4a/0xe0 [iscsi_scst]
 [<ffffffff81153633>] fput+0x103/0x280
 [<ffffffff8114fad9>] filp_close+0x69/0x90
 [<ffffffff8103e533>] put_files_struct+0x103/0x1c0
 [<ffffffff8103e478>] ? put_files_struct+0x48/0x1c0
 [<ffffffff8103e6b2>] exit_files+0x52/0x60
 [<ffffffff8103eb80>] do_exit+0x180/0x8e0
 [<ffffffff8104ef87>] ? get_signal_to_deliver+0xe7/0x6e0
 [<ffffffff8103f631>] do_group_exit+0x51/0xc0
 [<ffffffff8104f0bf>] get_signal_to_deliver+0x21f/0x6e0
 [<ffffffff8100223c>] do_signal+0x3c/0x580
 [<ffffffff81002805>] do_notify_resume+0x65/0xa0
 [<ffffffff812149de>] ? trace_hardirqs_on_thunk+0x3a/0x3f
 [<ffffffff814b4122>] int_signal+0x12/0x17
rmmod           D ffffffffa02b1b70     0  5714   5681 0x00000000
 ffff88000b497d48 0000000000000046 ffffffffa02b1b70 0000000000000002
 ffff88003920a3d0 ffff88000b497fd8 ffff88000b497fd8 ffff88000b497fd8
 ffff88003d17a3d0 ffff88003920a3d0 ffff88000b497d78 ffff88000b496000
Call Trace:
 [<ffffffffa02b1b70>] ? scst_unregister_target+0xe0/0x450 [scst]
 [<ffffffffa02b1b70>] ? scst_unregister_target+0xe0/0x450 [scst]
 [<ffffffff814a9b19>] schedule+0x29/0x70
 [<ffffffff814a9e57>] schedule_preempt_disabled+0x27/0x40
 [<ffffffff814a79b7>] mutex_lock_nested+0x187/0x390
 [<ffffffffa02b1b70>] ? scst_unregister_target+0xe0/0x450 [scst]
 [<ffffffffa02b1b70>] scst_unregister_target+0xe0/0x450 [scst]
 [<ffffffffa0287e51>] ? scst_local_exit+0x6b/0x21a [scst_local]
 [<ffffffff812c2d37>] ? put_device+0x17/0x20
 [<ffffffff812c3efa>] ? device_unregister+0x2a/0x60
 [<ffffffffa0285108>] __scst_local_remove_target+0xa8/0x130 [scst_local]
 [<ffffffffa0287e6a>] scst_local_exit+0x84/0x21a [scst_local]
 [<ffffffff810a40c6>] sys_delete_module+0x1a6/0x2b0
 [<ffffffff812149de>] ? trace_hardirqs_on_thunk+0x3a/0x3f
 [<ffffffff814b3de9>] system_call_fastpath+0x16/0x1b
ata_id          D ffff88003920c7a0     0  5715   5195 0x00000000
 ffff880015e97818 0000000000000046 0000000000000000 0000000000000046
 ffff88003920c7a0 ffff880015e97fd8 ffff880015e97fd8 ffff880015e97fd8
 ffff880021788000 ffff88003920c7a0 ffff880015e977f8 7fffffffffffffff
Call Trace:
 [<ffffffff814a9b19>] schedule+0x29/0x70
 [<ffffffff814a7355>] schedule_timeout+0x315/0x390
 [<ffffffff814a98e3>] ? wait_for_common+0x43/0x170
 [<ffffffff814a98e3>] ? wait_for_common+0x43/0x170
 [<ffffffff814a99c2>] wait_for_common+0x122/0x170
 [<ffffffff810705b0>] ? try_to_wake_up+0x2f0/0x2f0
 [<ffffffff814a9aed>] wait_for_completion+0x1d/0x20
 [<ffffffffa02bfad3>] scst_unregister_session+0x1a3/0x320 [scst]
 [<ffffffffa0284990>] scst_local_release_adapter+0xa0/0x140 [scst_local]
 [<ffffffff812c2f87>] device_release+0x27/0xa0
 [<ffffffff81209abb>] kobject_release+0x8b/0x1d0
 [<ffffffff8120993c>] kobject_put+0x2c/0x60
 [<ffffffff812c2d37>] put_device+0x17/0x20
 [<ffffffff812e1850>] scsi_host_dev_release+0xc0/0xe0
 [<ffffffff812c2f87>] device_release+0x27/0xa0
 [<ffffffff81209abb>] kobject_release+0x8b/0x1d0
 [<ffffffff8120993c>] kobject_put+0x2c/0x60
 [<ffffffff812c2d37>] put_device+0x17/0x20
 [<ffffffff812ea0c2>] scsi_target_dev_release+0x22/0x30
 [<ffffffff812c2f87>] device_release+0x27/0xa0
 [<ffffffff81209abb>] kobject_release+0x8b/0x1d0
 [<ffffffff8120993c>] kobject_put+0x2c/0x60
 [<ffffffff812c2d37>] put_device+0x17/0x20
 [<ffffffff812ed818>] scsi_device_dev_release_usercontext+0x118/0x130
 [<ffffffff812ed700>] ? scsi_device_cls_release+0x20/0x20
 [<ffffffff81056576>] execute_in_process_context+0x86/0xa0
 [<ffffffff812ed6dc>] scsi_device_dev_release+0x1c/0x20
 [<ffffffff812c2f87>] device_release+0x27/0xa0
 [<ffffffff81209abb>] kobject_release+0x8b/0x1d0
 [<ffffffff8120993c>] kobject_put+0x2c/0x60
 [<ffffffff812c2d37>] put_device+0x17/0x20
 [<ffffffff812df594>] scsi_device_put+0x44/0x60
 [<ffffffff812f974d>] scsi_cd_put+0x4d/0x70
 [<ffffffff812f97b1>] sr_block_release+0x41/0x60
 [<ffffffff8118a1ec>] __blkdev_put+0x19c/0x1d0
 [<ffffffff8118a27d>] blkdev_put+0x5d/0x180
 [<ffffffff8118a3c8>] blkdev_close+0x28/0x30
 [<ffffffff81153633>] fput+0x103/0x280
 [<ffffffff814a93b3>] ? __schedule+0x3c3/0x820
 [<ffffffff8114fad9>] filp_close+0x69/0x90
 [<ffffffff8114fba0>] sys_close+0xa0/0x100
 [<ffffffff814b3de9>] system_call_fastpath+0x16/0x1b

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Cc: Richard Sharpe <realrichardsharpe@gmail.com>




git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4425 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-07-27 01:14:55 +00:00
Vladislav Bolkhovitin
b1e0e7ef19 Web updates
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4424 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-07-26 01:45:57 +00:00
Vladislav Bolkhovitin
0601427337 scst_sess_get() should be done in scst_pre_rx_mgmt_cmd() instead of scst_post_rx_mgmt_cmd()
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4423 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-07-25 18:48:06 +00:00
Vladislav Bolkhovitin
55fc545848 Docs updates
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4422 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-07-24 19:35:04 +00:00
Vladislav Bolkhovitin
1cb6932eb4 Web updates
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4421 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-07-24 19:33:23 +00:00
Vladislav Bolkhovitin
3d2959d5bf Fix for qla2x00t deadlock crash
The symptom of the crash is that one finds the system deadlocked
spinning on scsi_qla_host_t.hardware_lock in qla2x00_enable_tgt_mode
with a stack something like this:

crash> bt
PID: 6155   TASK: ffff88006e4bc3c0  CPU: 1   COMMAND: "scst_uid"
 #0 [ffff88007b915b28] machine_kexec at ffffffff8103163b
 #1 [ffff88007b915b88] crash_kexec at ffffffff810b8e52
 #2 [ffff88007b915c58] panic at ffffffff814ed0ab
 #3 [ffff88007b915cd8] spin_bug at ffffffff8127cd46
 #4 [ffff88007b915d18] _raw_spin_lock at ffffffff8127d015
 #5 [ffff88007b915d68] _spin_lock_irqsave at ffffffff814f02e4
 #6 [ffff88007b915d88] qla2x00_enable_tgt_mode at ffffffffa047b672 [qla2xxx]
 #7 [ffff88007b915db8] q2t_host_action at ffffffffa06db6a6 [qla2x00tgt]
 #8 [ffff88007b915df8] q2t_enable_tgt at ffffffffa06db6ea [qla2x00tgt]
 #9 [ffff88007b915e18] scst_process_tgt_enable_store at ffffffffa04f102e [scst]
#10 [ffff88007b915e48] scst_tgt_enable_store_work_fn at ffffffffa04f1176 [scst]
#11 [ffff88007b915e58] scst_process_sysfs_works at ffffffffa04e8bbe [scst]
#12 [ffff88007b915e78] sysfs_work_thread_fn at ffffffffa04e8db5 [scst]
#13 [ffff88007b915ed8] kthread at ffffffff8108f976
#14 [ffff88007b915f48] kernel_thread at ffffffff8100c20a

I was pulling my hair out on this one, because with the spinlock
debugging (enhanced to capture the PID along with the task pointer), I
figured out that the task (and process) that originally locked the lock
was gone!  It got really confusing when I added more spinlock debug code
to the kernel to detect locks held in the task switching and
task/process termination paths -- and didn't catch anything terminating
with locks held!

I finally tracked the problem down to two things:

1.  When qla24xx_create_vhost creates a new virtual scsi_qla_host_t it
does it by copying the physical (aka parent) scsi_qla_host_t.  Under the
right unlucky conditions, this can happen with the hardware_lock held
(the spinlock is embedded in the structure).

2.  The code should only be locking the hardware_lock of the physical
scsi_qla_host_t, because the lock is associated with the hardware.
Unfortunately, quite a few places are not using to_qla_parent to make
sure they lock the correct lock.  One of those places is
qla2x00_enable_tgt_mode.  Along with the deadlock, this has the
potential to leave the hardware and driver structures in unpredictable
states, because the lock isn't always providing serialization.

The fix entails two things:

1. Zeroing the lock after copying the scsi_qla_host_t structure:  This
won't stop the deadlock, but will enable the spinlock debug code to
easily catch anything that misbehaves and locks the wrong lock.  I also
initialized the other locks because they could have the same problem.  I
also initialized the list heads, because they could end up holding
dangling references.  I did not initialize all pointers, because there
are quite a few that point to read only data and are OK (and I didn't
have time to research all of them).

2.  Using to_qla_parent everywhere when locking and the scsi_qla_host_t
structure might be virtual.  This is a lot of changes, but they are the
same thing over and over again.

I did not make an effort to look for scalar or pointer fields that are
being picked from the wrong structure.  That's getting to be as much
pain as merging up to the latest QLogic driver (which would have gotten
rid of this problem).

From "Robinson, Herbie" <Herbie.Robinson@stratus.com>




git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4420 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-07-24 19:01:47 +00:00
Vladislav Bolkhovitin
94fbc49091 Fix qla2x00t compilation warnings on RHEL 6.1
The attached patch fixes compilation warnings for the qla2x00t driver
when compiled by RHEL 6.1, kernel version 2.6.32-131.0.15.el6. I
believe this is the second kernel version for RHEL 6.1.

From "Robinson, Herbie" <Herbie.Robinson@stratus.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4419 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-07-24 18:50:59 +00:00
Vladislav Bolkhovitin
bb4e5eec24 Add q2t_pre_xmit_response comment
The fix for the locking bug I found in q2t_pre_xmit_response has already
been added, but I had some comments in my copy that couldn't hurt.

From "Robinson, Herbie" <Herbie.Robinson@stratus.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4418 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-07-24 18:48:03 +00:00
Vladislav Bolkhovitin
e70b729707 Skip waiting for internal commands after abort.
Waiting for their parent commands is required and sufficient.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4417 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-07-23 19:39:33 +00:00
Bart Van Assche
aa57dbd8e8 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4416 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-07-21 03:28:57 +00:00
Vladislav Bolkhovitin
e8612a432c More cleanups
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4415 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-07-20 23:53:22 +00:00
Vladislav Bolkhovitin
04040543ce Cleanup
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4414 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-07-20 23:41:05 +00:00
Vladislav Bolkhovitin
159c54c67e Improve handling of zero len unmap descriptors
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4413 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-07-20 22:05:22 +00:00
Vladislav Bolkhovitin
45e50e12b0 Zero size descriptor are possible, so we have to add cmd_data_descriptors_cnt to track their count.
+ small cleanup



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4412 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-07-20 21:58:45 +00:00
Bart Van Assche
b19227e809 scst: Remove a trailing whitespace because checkpatch complains about it
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4411 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-07-20 02:51:23 +00:00
Vladislav Bolkhovitin
6d13026f05 Default logging improvements
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4410 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-07-19 19:13:28 +00:00
Vladislav Bolkhovitin
a3c5648b29 Introduce scst_get_buf_full_sense() instead of open coded scst_get_buf_full() + setting sense on errors
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4409 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-07-19 02:36:32 +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
Vladislav Bolkhovitin
408b67c80f Make invalid LUN message more comprehensive
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4407 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-07-17 20:09:37 +00:00
Bart Van Assche
6cfe427617 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4406 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-07-14 15:03:21 +00:00
Vladislav Bolkhovitin
7cde5841a8 Cleanup
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4405 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-07-13 21:53:44 +00:00
Vladislav Bolkhovitin
260c6cb1f8 Fix incorrect completion function dereference.
Reported by Thomas Lau <Thomas.Lau@principleone.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4404 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-07-13 21:39:30 +00:00
Bart Van Assche
bbc726fdea nightly build: Update Linux kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4403 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-07-12 05:54:27 +00:00
Bart Van Assche
d0745d1a16 scst: Fix WRITE FILEMARKS parsing
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4402 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-07-09 06:22:48 +00:00
Bart Van Assche
bcc952a765 scst: Add support for SECURITY PROTOCOL IN and OUT
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4401 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-07-09 06:19:38 +00:00
Bart Van Assche
95246ee9d7 scstadmin: Make _syswrite() translate EBUSY into "writing failed"
_syswrite() callers check whether writing into an SCST sysfs attribute
succeeded by checking whether the value returned by this function is
defined(). Return undef (failed) instead of -1 (success) if syswrite()
returned error code EBUSY (found this through source reading). Return
$length instead of length($cmd) if the initial write triggered EAGAIN.
Remove a superfluous $bytes = undef statement. Eliminate the variable
$wait.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4400 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-07-09 06:12:47 +00:00
Vladislav Bolkhovitin
39e304dc76 scst: Don't suspend activity during removal of a SCSI device
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.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4399 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-07-09 00:24:51 +00:00
Vladislav Bolkhovitin
68662e9fbd Fix data direction of RECEIVE COPY RESULT command
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4398 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-07-09 00:21:40 +00:00
Bart Van Assche
ac2a3aad90 scst: Remove spaces in front of tabs because checkpatch complains about these. This is a whitespace-only change.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4397 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-07-07 06:33:46 +00:00
Bart Van Assche
d89d3fae83 Follow-up for r4395: Make SCST build again on pre-2.6.38 kernels
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4396 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-07-07 06:30:50 +00:00
Vladislav Bolkhovitin
df4d0f9dad Fix ALLOW COMMANDS field of PERSISTENT RESERVE IN REPORT CAPABILITIES handling according to SPC-4 suggestions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4395 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-07-06 19:57:48 +00:00
Vladislav Bolkhovitin
64be93db95 scst: Fix sysfs code for parsing parameters when adding or replacing a LUN
Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4394 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-07-06 03:02:42 +00:00
Vladislav Bolkhovitin
a17349c566 scst: Parse REQUEST VOLUME ELEMENT ADDRESS correctly
Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4393 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-07-06 02:44:53 +00:00
Vladislav Bolkhovitin
16d0b30bc8 Cleanup: let's have a dedicate CDB flag to mark CDBs without LBA instead of relying on lba_off = 0.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4392 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-06-29 22:31:13 +00:00
Bart Van Assche
db5b92274a scstadmin: Allow hash signs to be escaped
Hash signs have to be specified in scst.conf when using the per_portal_acl=1
feature of iSCSI-SCST in combination with LUN masking. Make scstadmin not
consider hash signs preceded by a backslash as the start of a comment. Escape
backslashes and hash signs when writing out scst.conf.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4391 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-06-29 13:43:36 +00:00
Bart Van Assche
d811c1374c nightly build: Disable x86_32 mode in kernel config
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4390 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-06-29 06:25:16 +00:00