Commit Graph
343 Commits
Author SHA1 Message Date
Bart Van Assche c16b9c2b3d Change version 2.2.1-pre into 2.2.1
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4731 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-01-12 15:31:48 +00:00
Bart Van Assche fe7faf0e24 Make ib_srpt build with OFED 1.5.3.1 (merge r3519 from trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4719 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-01-06 17:27:37 +00:00
Bart Van Assche 68edb1a296 Copyright updates + iscsi-scst bug fix (merge r4216 from trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4704 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-01-06 14:03:57 +00:00
Bart Van Assche fa8479a821 iscsi-scst: Do not clear reservations during nexus loss (merge r4546 from trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4701 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-01-06 13:41:22 +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 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 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 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 31331411e1 Avoid that the compiler warns about READ_ATTRIBUTE and WRITE_ATTRIBUTE
already being defined in <scsi/scsi.h> on RHEL 6.0, 6.1 and 6.2 (merge r4032
from trunk).


git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4359 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-06-18 16:36:05 +00:00
Vladislav Bolkhovitin ccffee2682 Version updated to 2.2.1-pre
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.x@4103 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-01-26 05:43:06 +00:00
Bart Van Assche bdbcebf0ec Only include <linux/version.h> if necessary (merge r3517 from trunk)
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.0.x@3992 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-15 10:39:40 +00:00
Bart Van Assche b3c1abf165 Change version number from 2.1.0-pre into 2.2.0-pre
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.0.x@3988 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-15 10:22:15 +00:00
Bart Van Assche 500d36d1eb Change version number from 2.1.0-pre into 2.2.0-pre
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.0.x@3987 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-15 10:18:53 +00:00
Bart Van Assche 497712d087 Change version number from 2.1.0-pre into 2.2.0-pre
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.2.0.x@3984 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-15 10:01:04 +00:00
Vladislav Bolkhovitin 98a7e0e8b0 Version changed to 2.1.1-pre
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.1.0.x@3862 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-09-18 00:25:52 +00:00
Vladislav Bolkhovitin 8099d0ae77 2.1.0 release
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.1.0.x@3837 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-09-01 19:01:25 +00:00
Vladislav Bolkhovitin 2e0329c2d2 Merged revisions 3799-3800,3818-3819,3823-3825,3828,3831,3833 via svnmerge from
https://vlnb@scst.svn.sourceforge.net/svnroot/scst/trunk

........
  r3799 | vlnb | 2011-08-04 22:07:35 -0400 (Thu, 04 Aug 2011) | 37 lines
  
  Modified patch from Bart Van Assche <bvanassche@acm.org>:
  
  The range unmapped by the scst_vdisk handler when processing an UNMAP command
  is not correct. The patch below fixes that and also prevents that the following
  kernel crash can be triggered on the target:
  
  Call Trace:
   [<ffffffffa06b5350>] ? srpt_post_send+0xd0/0x140 [ib_srpt]
   [<ffffffff811bb595>] ? cpumask_next_and+0x35/0x50
   [<ffffffff810e6296>] shmem_truncate_range+0x7a6/0xa50
   [<ffffffffa0612ceb>] ? scst_get_buf_full+0x16b/0x270 [scst]
   [<ffffffffa069beb6>] vdisk_exec_unmap+0x1d6/0x4b0 [scst_vdisk]
   [<ffffffff813c0cb6>] ? _raw_spin_unlock+0x16/0x40
   [<ffffffffa069dadc>] vdisk_do_job+0x5fc/0x950 [scst_vdisk]
   [<ffffffffa0605402>] scst_do_real_exec+0xb2/0x400 [scst]
   [<ffffffffa06076a7>] scst_exec+0xd7/0x240 [scst]
   [<ffffffffa06079b6>] scst_send_for_exec+0x1a6/0x2f0 [scst]
   [<ffffffffa06086f8>] scst_process_active_cmd+0x4f8/0x790 [scst]
   [<ffffffffa0608a29>] scst_do_job_active+0x99/0x170 [scst]
   [<ffffffffa060a3da>] scst_cmd_thread+0x15a/0x3b0 [scst]
   [<ffffffff81047470>] ? default_wake_function+0x0/0x20
   [<ffffffffa060a280>] ? scst_cmd_thread+0x0/0x3b0 [scst]
   [<ffffffff8106dc26>] kthread+0x96/0xa0
   [<ffffffff81003cd4>] kernel_thread_helper+0x4/0x10
   [<ffffffff8103db01>] ? finish_task_switch+0x51/0xb0
   [<ffffffff813c0c7c>] ? _raw_spin_unlock_irq+0x1c/0x40
   [<ffffffff813c18b1>] ? restore_args+0x0/0x30
   [<ffffffff8106db90>] ? kthread+0x0/0xa0
   [<ffffffff81003cd0>] ? kernel_thread_helper+0x0/0x10
  
  Invoking truncate_range() with an end len that is not page-size aligned
  triggers it. In other words, with a block size that is below
  PAGE_CACHE_SIZE some UNMAP commands could trigger a kernel bug. I think
  it's better to print an error message and to skip an UNMAP command
  instead of triggering a kernel oops.
........
  r3800 | vlnb | 2011-08-08 21:04:57 -0400 (Mon, 08 Aug 2011) | 3 lines
  
  Update of SCST_Gentoo_HOWTO.txt to SCST 2.x. Thanks to Willem Boterenbrood <w.boterenbrood@gmail.com>!
........
  r3818 | vlnb | 2011-08-17 20:17:06 -0400 (Wed, 17 Aug 2011) | 3 lines
  
  Fix for forgotten devt initialization in preparing internal commands
........
  r3819 | vlnb | 2011-08-17 20:27:12 -0400 (Wed, 17 Aug 2011) | 6 lines
  
  Disable accepting initiator mode commands if initiator mode not enabled
  for 23xx- chips as well as suggested by ido benda <idombd@gmail.com>.
  
  This is extension of r3261 to qla2x00_queuecommand().
........
  r3823 | vlnb | 2011-08-19 19:20:22 -0400 (Fri, 19 Aug 2011) | 3 lines
  
  Update of SCST_Gentoo_HOWTO.txt from Willem Boterenbrood <w.boterenbrood@gmail.com>
........
  r3824 | vlnb | 2011-08-19 19:55:31 -0400 (Fri, 19 Aug 2011) | 3 lines
  
  Fix for one more forgotten initialization in preparing internal commands spotted by kordex@gmail.com
........
  r3825 | bvassche | 2011-08-20 10:04:52 -0400 (Sat, 20 Aug 2011) | 1 line
  
  documentation, spelling: Change phisical into physical
........
  r3828 | bvassche | 2011-08-22 15:19:56 -0400 (Mon, 22 Aug 2011) | 11 lines
  
  scst: Avoid triggering BUG() on uniprocessor systems
  
  On uniprocessor systems with lock debugging disabled spin_is_locked()
  returns false. Disable the spin_is_locked() checks if CONFIG_SMP has not
  been defined.
  
  Reported-by: Frank <frank@debian-nas.org>
  Signed-off-by: Dave Carroll <dcarroll@astekcorp.com>
  Cc: scst-devel <scst-devel@lists.sourceforge.net>
  Cc: Frank <frank@debian-nas.org>
........
  r3831 | vlnb | 2011-08-25 14:08:45 -0400 (Thu, 25 Aug 2011) | 3 lines
  
  Fix possible crash on rel_tgt_id set on transports without is_target_enabled() defined.
........
  r3833 | vlnb | 2011-09-01 14:22:27 -0400 (Thu, 01 Sep 2011) | 5 lines
  
   - Fix possible deadlock between vdev_sysfs_process_get_filename() and vdisk_del_device()
  
   - Cleanups
........


git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.1.0.x@3836 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-09-01 18:49:22 +00:00
Bart Van Assche 2d400c4102 Add implicit ALUA support (merged r3446, r3451, r3457 and r3513 from the trunk).
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.1.0.x@3634 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-27 16:16:03 +00:00
Vladislav Bolkhovitin fa37fa3f1b Merge of the missed commits r3447,3452,3458 from the trunk.
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.1.0.x@3559 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-06-08 21:27:00 +00:00
Bart Van Assche 7004bdfb75 Removed a superfluous line in scst.h (Backported r3484 from the trunk).
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.1.0.x@3485 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-05-27 10:37:09 +00:00
Vladislav Bolkhovitin 0bfa54bfb8 Merge the trunk's rrs 3438:3445, 3447:3450, 3452:3456 and 3458:3466
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.1.0.x@3470 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-05-20 23:02:07 +00:00
Vladislav Bolkhovitin ef3019b48b Merge of the trunk's r3428-3435:
- Don't allow to create targets with the same names

 - Remove "unused variable" warning on old kernels

 - Fix a compiler warning on pre-2.6.35 non-RHEL systems.

 - Bug fix: do not try to apply patch readahead-2.6.32.below11.patch on kernel 2.6.32.11 or any later 2.6.32 kernel.

 - Removed the constant REPORT_DEVICE_IDENTIFIER from scst/include/scst_const.h because it is not used anywhere in the SCST source tree.

 - Expand CONFIG_SCST_PROC too.

 - Added #include <linux/slab.h> for kmem_cache_free().

 - MultiP must be 1 and HiSup 0



git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.1.0.x@3437 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-05-03 21:13:08 +00:00
Vladislav Bolkhovitin 8c8aadaa6d Merge of the trunk's r3400-3401:
- Full buffers must always be processed, otherwise bad things could happen

 - Make scst_get_full_buf and scst_put_full_buf consistent with the naming convention



git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.1.0.x@3415 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-04-26 00:20:26 +00:00
Vladislav Bolkhovitin 2369ef6097 Version changed to 2.1.0-rc1
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/2.1.0.x@3391 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-04-16 16:11:28 +00:00
Bart Van Assche 09e34c0500 Removed spaces in front of tabs.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3383 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-04-13 17:54:15 +00:00
Vladislav Bolkhovitin d0928114c0 Commands ordering/serialization improvements
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3382 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-04-13 17:18:27 +00:00
Vladislav Bolkhovitin 03c8f6fcd7 Fix compilations problems with gcc 4.6 reported by Bart Van Assche <bvanassche@acm.org>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3367 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-04-08 17:50:39 +00:00
Vladislav Bolkhovitin b4200acdaf Possibility to specify human readable comments to targets (for instance, to specify which target maps to which port) added
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3357 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-04-05 19:56:01 +00:00
Vladislav Bolkhovitin 4539005d7c Patch from Alexey Obitotskiy <alexeyo1@open-e.com> making get_initiator_port_transport_id() more flexible
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3322 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-03-29 14:30:01 +00:00
Bart Van Assche a078a269f3 Complain if it is attempted to use the sysfs interface on a pre-2.6.26 kernel.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3285 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-03-20 09:26:34 +00:00
Vladislav Bolkhovitin 5cd8982545 Custom parse improvements
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3281 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-03-15 13:09:13 +00:00
Bart Van Assche 1a3b890e8f Build fixes for kernel 2.6.38.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3239 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-01-29 11:23:25 +00:00
Vladislav Bolkhovitin a31a60aebf Minor versions handling improvements
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3227 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-01-17 12:44:34 +00:00
Vladislav Bolkhovitin cbb7de538f More performance and scalability improvements
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3222 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-01-14 21:05:25 +00:00
Vladislav Bolkhovitin 9a2c977e68 Per sessions commands stats implemented based on patch from Steven Umbehocker <steven.umbehocker@osnexus.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3218 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-01-14 11:51:22 +00:00
Vladislav Bolkhovitin dfa288aaa0 Cleanup
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3212 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-01-13 12:47:36 +00:00
Vladislav Bolkhovitin e6d32fb639 Cleanup
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3211 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-01-13 12:41:02 +00:00
Vladislav Bolkhovitin cf12f93cd3 Cleanup: CONFIG_SCST_ORDERED_READS removed
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3206 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-01-12 13:05:45 +00:00
Vladislav Bolkhovitin f15f2cdd5f - Making scst_local be safe with BLOCKIO and pass-through.
- Docs update



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3205 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-01-11 13:39:27 +00:00
Vladislav Bolkhovitin 411fb4f623 - Update for 2.6.37
- Docs updated
 - Returning of DIRECT contexts by scst_estimate_context() disabled (see comment in the patch why)



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3203 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-01-10 18:34:29 +00:00
Vladislav Bolkhovitin f3238333dd Copyrights updated
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3200 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-01-06 20:02:04 +00:00
Vladislav Bolkhovitin 7bf6429246 Let's not crash if BUG triggered with IRQs or BHs disabled. At least, in the debug build.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3198 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-01-06 18:29:17 +00:00
Vladislav Bolkhovitin a16d010935 Comment extended
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3162 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-12-21 11:51:10 +00:00
Vladislav Bolkhovitin 25dd5b2e2e I/O context creation and cleanup in SCST command-processing threads is
protected by io_context_mutex. The patch below changes that mutex from a
single mutex for all command threads to one mutex per thread pool.

+

Two quickly succeeding command thread management actions, e.g. setting both
threads_num and threads_pool_type via scst.conf, can trigger the bug mentioned
below. That bug can be triggered because kthread_stop() can stop a thread
before it has started. So it can happen that an I/O context is created inside
scst_cmd_thread() but not cleaned up because the thread for which
p_cmd_threads->nr_threads == 1would evaluate to true is never started. The
patch below fixes this by guaranteeing that if an I/O context has been created
for a thread pool that it gets cleaned up too.

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

with fixes/cleanups



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3152 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-12-20 19:03:49 +00:00
Bart Van Assche 6028abbb99 Added definition of macro scst_assert_activity_suspended().
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3103 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-12-16 13:10:09 +00:00
Bart Van Assche 49e8bb1aea Fixed a <=2.6.29 compiler warning.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3020 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-12-11 11:14:11 +00:00
Bart Van Assche 3fb6b9e6e7 scst_disk builds again on kernel 2.6.30 and before (was broken by r2836).
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2965 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-12-07 17:30:09 +00:00
Bart Van Assche 1633190a4a scst: Only enable sysfs-specific variables in the sysfs build and not in the procfs build. This commit does not change any behavior of SCST.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2731 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-17 14:18:31 +00:00
Bart Van Assche b28125eb9e Fixed more spelling errors in source code comments and logging statements.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2708 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-14 16:02:55 +00:00