Commit Graph
863 Commits
Author SHA1 Message Date
Bart Van Assche 55eed60c59 Keep unit attention list empty flag and the list itself in sync.
Without this patch hundreds of "scst: scst_set_pending_UA:6216:Setting pending UA cmd ..." messages are logged after a LUN has been added or removed.

This patch fixes a bug that was reported by Ido Benda.

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3254 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-02-23 17:08:22 +00:00
Vladislav Bolkhovitin 7f0a738c11 Fix problem with handling internal commands reported by Hiroyuki Sato <hiroysato@gmail.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3248 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-02-13 17:01:19 +00:00
Vladislav Bolkhovitin b8ec247d29 Minor logging improvement
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3246 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-02-11 00:52:05 +00:00
Bart Van Assche 2b1e38261c scst core: Updated scst_unpack_lun() comment because of flat addressing support.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3242 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-01-29 14:27:48 +00:00
Bart Van Assche 8c61e470c8 Removed sg_copy() test again because it does not work reliably on all Linux distributions.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3240 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-01-29 11:35:11 +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 7cd41efffc Forgotten in the previous commit update of README_in-tree
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3232 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-01-27 23:15:44 +00:00
Vladislav Bolkhovitin 86d9db6a09 - Since max_tasklet_cmd is now per-CPU, it's better to decrease it to the value ksoftirqd has.
- Docs update



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3231 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-01-27 23:13:12 +00:00
Vladislav Bolkhovitin 8d0f61f71a Call of scst_nexus_loss() here is wrong and not needed, because it will be called later in scst_mgmt_affected_cmds_done()
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3228 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-01-18 14:05:56 +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 1bfe442750 Minor docs update
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3226 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-01-14 22:37:29 +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 79c658e0f1 More context fixes and cleanups
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3215 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-01-13 18:56:11 +00:00
Vladislav Bolkhovitin 3aee70c90f - Fix possible incorrect atomic context on exec stages
- Limit max tasklet commands via scst_max_tasklet_cmd global attribute to prevent possible starvation under heavy load and in some cases im
prove performance
 - Logging improvements
 - Docs update
 - Cleanups



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3214 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-01-13 14:25:09 +00:00
Vladislav Bolkhovitin dd9ca37b42 Now scst_pre_parse() called in __scst_init_cmd(), so there's no point to call scst_get_cdb_info() once again
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3213 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-01-13 12:49:33 +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
Bart Van Assche 6d977ab9e1 Added "const" to keep checkpatch happy.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3190 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-01-05 13:14:05 +00:00
Bart Van Assche 7e8b205bf1 Removed a superfluous hunk from a patch.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3189 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-01-05 13:13:11 +00:00
Vladislav Bolkhovitin ca08079b44 A typo making expression the opposite fixed. Reported by Bart Van Assche <bvanassche@acm.org>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3184 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-12-29 20:14:00 +00:00
Bart Van Assche 5fe037e5b9 Updated my e-mail address in copyright statements and README files.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3175 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-12-21 18:48:14 +00:00
Vladislav Bolkhovitin 698f4a967c Since algorithm to autogenerate t10_dev_id and usn is going to be changed, make usn user configurable and during transition period both t10_dev_id and usn always key to make scstadmin to always save them.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3163 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-12-21 12:24:44 +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 6ed490f251 Remove dead code. According to the Linux Device Drivers, 3rd Edition book,
alloc_pages() and free_pages() must be called with the same order, so
that optimization cannot work (and that why it's currently disabled).

From frank zago <fzago@systemfabricworks.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3157 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-12-20 20:04:51 +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
Vladislav Bolkhovitin b7212cf420 Cleanup: eliminate a superfluous cast and unnest an if-statement
Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3151 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-12-20 18:27:57 +00:00
Vladislav Bolkhovitin cb599510d6 Two local variables in scst_main.c can be eliminated by using appropriate
format specifiers.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3150 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-12-20 18:25:07 +00:00
Bart Van Assche 94b01ca7a3 Added 2.6.37-related files (svn merge -c3129 https://scst.svn.sourceforge.net/svnroot/scst/branches/sysfs-tree-changes).
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3146 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-12-20 14:12:44 +00:00
Vladislav Bolkhovitin 5b99207610 Fix minor issue when generating INQUIRY responses for not existing LUNs.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3121 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-12-17 14:35:09 +00:00
Vladislav Bolkhovitin 63811c3560 Let's not confuse booleans and integers.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3118 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-12-16 21:10:28 +00:00
Vladislav Bolkhovitin 7cf0816360 Reverted r3077: let's not confuse booleans and integers. I've seen enough subtlehard to track bugs from it.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3117 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-12-16 21:00:26 +00:00
Vladislav Bolkhovitin 977ff41b15 Revert r3045, because it isn't quite correct
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3116 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-12-16 20:48:45 +00:00
Bart Van Assche 178fd02ce9 Made error handling code in scst_main.c more consistent without changing its functionality and added a letter "s" in one error message.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3104 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-12-16 13:33:44 +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
Vladislav Bolkhovitin 8797dbd533 Cleanup. In scst_cmd_done_pr_preempt() cmd->pr_abort_counter and, hence, saved_cmd_done must be not NULL.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3100 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-12-15 20:45:13 +00:00
Vladislav Bolkhovitin e3241c4abb Fix wrong last_len computation reported by ido benda <idombd@gmail.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3094 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-12-15 16:44:37 +00:00
Bart Van Assche c46913f455 Removed superfluous casts.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3091 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-12-15 16:04:25 +00:00
Bart Van Assche 1c18e2faf2 scst/sysfs: Moved SGV sysfs implementation from source file scst_sysfs.c to scst_mem.c.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3081 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-12-15 14:36:00 +00:00
Bart Van Assche 2d141454c9 scst/sysfs: Renamed a variable.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3080 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-12-15 13:58:41 +00:00
Bart Van Assche 9383e778e6 scst/sysfs: Moved sysfs attribute definitions immediately after the corresponding method definitions.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3078 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-12-15 13:24:46 +00:00
Bart Van Assche 6e1e8656e1 scst/sysfs: Made error handling style consistent with upstream kernel code.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3077 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-12-15 13:13:17 +00:00
Bart Van Assche 896b616a37 Eliminated 11 more forward declarations.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3074 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-12-15 12:49:37 +00:00
Bart Van Assche e7fec9df35 Eliminated two more forward declarations.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3073 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-12-15 12:42:41 +00:00
Bart Van Assche 8ddea02f56 Eliminated five more forward declarations.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3072 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-12-15 12:34:43 +00:00