Commit Graph
328 Commits
Author SHA1 Message Date
Vladislav Bolkhovitin e1447ae241 Add implicit ALUA support. On a setup with more than one target port
(sometimes called storage head) this patch makes it possible to tell the
initiator which port to use. Since that information can be specified per LUN,
with this patch it is not only possible to tell the initiator which path to
choose but also to balance the load over target ports. Target port attributes
can not only be defined for target ports that exist on the system on which
SCST is running but also for target ports present on other nodes of the same
HA setup. As far as I know this feature is unique among open source storage
target implementations.

Note: with this patch SCSI target port attributes can be defined for each LUN
defined on each SCST target individually. Such an SCST target is either a
physical entity (e.g. a HCA for the ib_srpt driver) or a logical entity (e.g.
an iSCSI target for the iscsi_scst driver). In the last case it is up to the
user to make sure that there is a one-to-one relationship between SCST target
and SCSI target port.

This patch is based on the specifications in the ANSI T10 spc4r30 document.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3446 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-05-11 02:22:48 +00:00
Vladislav Bolkhovitin 70eb596f60 Rework iSCSI aborts to make them more correct and remove recent workarounds (one more post-IET cleanup)
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3444 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-05-09 23:07:23 +00:00
Bart Van Assche e47c6eb768 scst.h: Avoid that including scst.h before <linux/slab.h> triggers a warning about a preprocessor symbol redefinition.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3441 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-05-08 11:55:43 +00:00
Bart Van Assche e6a6bf11e6 Removed the constant REPORT_DEVICE_IDENTIFIER from scst/include/scst_const.h because it is not used anywhere in the SCST source tree.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3432 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-05-01 07:43:18 +00:00
Bart Van Assche a1e077cdd4 RHEL/CentOS 5.6 build fix.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3408 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-04-25 17:33:00 +00:00
Bart Van Assche e2f411fdde Reverted r3404 because it's not a complete fix for RHEL / CentOS 5.6.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3407 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-04-25 17:24:50 +00:00
Bart Van Assche 3231e80995 RHEL / CentOS 5.6 build fix.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3404 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-04-25 09:42:03 +00:00
Vladislav Bolkhovitin cefe58871a Attached is a patch to make the names scst_get_full_buf and
scst_put_full_buf consistent with the naming convention. That is,
change them to scst_{get,put}_buf_full.

Signed-off-by: Richard Sharpe <realrichardsharpe@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3401 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-04-24 00:12:01 +00:00
Vladislav Bolkhovitin 7078c0b26b Full buffers must always be processed, otherwise bad things could happen
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3400 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-04-23 21:13:50 +00:00
Vladislav Bolkhovitin 8560366536 Version changed to 3.0
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3392 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-04-16 16:18:48 +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
Vladislav Bolkhovitin 9ecf46038d Small optimization: there's no point to keep full kobj completion.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2665 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-11 13:02:00 +00:00
Vladislav Bolkhovitin 0463afc282 Patch from Bart Van Assche <bvanassche@acm.org> with some changes implementing additional hooks to allow target drivers to override INQUIRY responses and support for LUNs addressing method.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2649 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-09 21:01:21 +00:00
Vladislav Bolkhovitin 0754629ea6 Partially remove implicit ordered commands as a nonsense. It will be replaced by a common waiting facility to wait on depending previous commands to complete.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2604 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-05 11:54:22 +00:00
Bart Van Assche 28f40bb2ff Fixed those spelling errors in source code comments that were detected by ispell.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2518 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-10-31 09:28:14 +00:00
Vladislav Bolkhovitin e9a57cd875 Enforce max LUNs limitation
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2490 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-10-29 18:34:48 +00:00
Vladislav Bolkhovitin 499da51437 Revert r2446 as wrong
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2461 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-10-25 13:00:20 +00:00
Vladislav Bolkhovitin 86814a9503 Changing SCST objects freeing to be done in their kobjects release() functions as requested by Greg KH in http://lkml.org/lkml/2010/10/14/299
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2446 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-10-22 17:21:47 +00:00
Vladislav Bolkhovitin c966f14eae scst_pre_parse() must be called before scst_cmd_set_sn() to correctly process implicit HQ and ORDERED commands, so move it to __scst_init_cmd(). As consequence, SCST_CMD_STATE_PRE_PARSE state isn't needed anymore, hence remove it.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2420 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-10-18 18:23:08 +00:00
Bart Van Assche 26f9165b48 Made sure that sparse can process scst.h. Apparently there is a bug in sparse which makes sparse interpret single quotes in preprocessor statements as character delimiters.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2378 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-10-08 19:40:18 +00:00
Vladislav Bolkhovitin cef1b4cdff The changes included in the patch below are:
- If someone tries to build SCST on an RHEL 5 system without having
run 'make enable_proc' first, complain.
- Do not define set_cpus_allowed_ptr() on RHEL 5 since RHEL 5 does
have a declaration for this function.
  The function itself is not exported from the kernel however (this is probably a bug). Because of that, replace
the call to set_cpus_allowed_ptr() in scst_main.c by a call to set_cpus_allowed().
- Do not define the variable 'err' on kernels where that variable is
not used in order to avoid a compiler warning.
- Also in scst_vdisk.c, pass a 16-bit value as the first argument of
put_unaligned() when writing to a 16-bit variable in order to avoid a compiler warning.

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

with fixes and additions:

 - In scst_vdisk.c we need 32-bit values, not 16, fixed
 - Optimal UNMAP granuality changed to 1.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2377 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-10-08 19:30:39 +00:00
Vladislav Bolkhovitin f245543a36 Cleanup of support of kernels prior 2.6.18
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2368 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-10-08 13:01:15 +00:00
Vladislav Bolkhovitin d7e087e3b2 Minor extended CDBs handling cleanups and fixes
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2351 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-10-05 20:06:54 +00:00
Vladislav Bolkhovitin 2370609897 Minor cleanups
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2349 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-10-05 18:45:20 +00:00
Vladislav Bolkhovitin 929b4db422 Slightly modified patch from Bart Van Assche <bvanassche@acm.org> fixing build breakage on not too recent kernels introduced by r2317
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2324 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-10-01 12:09:26 +00:00
Vladislav Bolkhovitin ff2c24c1c3 Assigning CPU affinity to threads and connections
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2317 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-09-30 18:07:27 +00:00