Commit Graph

708 Commits

Author SHA1 Message Date
Vladislav Bolkhovitin
643c7ab2d1 Patch from Ruben Laban <r.laban@ism.nl>:
I replaced all occurences of DISTDIR with DESTDIR and also introduced SBINDIR (and friends) to some other Makefiles. 



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@719 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-03-25 19:33:10 +00:00
Vladislav Bolkhovitin
8ff3e56ef6 Fixes deadlock on iSCSI session freeing. Reported by andy yan <andyysj@gmail.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@718 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-03-25 13:03:29 +00:00
Vladislav Bolkhovitin
bc96b052d5 The patch below adds support for the 2.6.29 kernel and also fixes the
checkpatch issues reported by the checkpatch script included with the 2.6.29
kernel and that were not yet reported by the 2.6.28 checkpatch script
(trailing statements should be on the next line / struct should normally be
const).
The patch below has been tested as follows:
- Reran scripts/run-regression-tests -k 2.6.24.7 -k 2.6.25.20 -k 2.6.26.8 -k 2.6.27.21 -k 2.6.28.9 -k 2.6.29 and verified the output.
- Rebuilt, installed and loaded scst, iscsi-scst and srpt as follows:
make -s clean && make -s -C scst install && make -s -C iscsi-scst install && make -s -C srpt install && cd scstadmin && make -s && make -s install && modprobe scst_vdisk && modprobe iscsi-scst && dmesg

Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com>

with minor cleanups and corrections in put_page_callback-2.6.29.patch



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@717 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-03-25 12:55:27 +00:00
Bart Van Assche
9e5f29c3f6 - Added command-line option -d, which allows to specify a directory for
temporary regression test files.
- Added workaround for the problem that the branch profiling code in the
  2.6.29 kernel triggers a huge number of sparse warnings.
- Made sure that all tests print some output, even if successful.
- Improved summarizing of sparse warnings.
- Command-line option -j now works.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@716 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-03-24 19:08:29 +00:00
Vladislav Bolkhovitin
2f9f473cde - Fixes broken build if io_context patch not applied
- #warning's cleanup



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@715 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-03-24 10:43:55 +00:00
Bart Van Assche
1f2cbd53bb - Added command-line option -j (number of jobs that make should run
simultaneously).
- scripts/generate-kernel-patch is now only run once instead of three
  times per kernel version.
- Context imbalance warnings are no longer filtered from the output of
  sparse.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@714 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-03-23 19:58:18 +00:00
Bart Van Assche
addb8c5698 Finished renaming of export_alloc_io_context patch into io_context performed in revision r710.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@713 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-03-23 19:44:42 +00:00
Vladislav Bolkhovitin
9c552a9b60 The patch below fixes the following recently introduced checkpatch complaints:
* use tabs not spaces

and the following recently introduced sparse warnings:

* drivers/scst/scst_lib.c:437:6: warning: symbol 'scst_queue_report_luns_changed_UA' was not declared. Should it be static?
* drivers/scst/scst_lib.c:3909:21: warning: symbol 'tm_dbg_tgt_dev' was not declared. Should it be static?
* drivers/scst/iscsi-scst/session.c:170:9: warning: cast to non-scalar
* drivers/scst/iscsi-scst/session.c:180:24: warning: cast to non-scalar
The patch below has been verified by reviewing it carefully and by verifying the output of the following command: scripts/run-regression-tests -k 2.6.28.8

Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@712 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-03-23 19:32:32 +00:00
Vladislav Bolkhovitin
177824fe91 Unsupported patch from Krzysztof Błaszkowski <kb@sysmikro.com.pl>:
I prepared it for kernel 2.6.27.7-9 which is used by openSuSE11.1-0 but it can 
also be applied to 2.6.27.19-3.2.1 (with some offset/fuzz) which is going to 
be deployed in SLE11.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@711 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-03-23 19:25:38 +00:00
Vladislav Bolkhovitin
acbfc9a0d2 - Make dynamic io_context assignment complete. Old export_alloc_io_context patch should be reverted and new io_context patch applied instead.
- Make BLOCKIO io_contex be per-(device,session)
 - Cleanups



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@710 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-03-23 19:19:56 +00:00
Bart Van Assche
a7efed3caf Changes:
- Added command-line option -f, which enables a full check. Changed
  behavior when -f has not been specified to running checkpatch, sparse
  and headers_check only. This makes the script complete a lot faster.
- A summary of the errors and warnings reported by checkpatch, sparse
  and make headers_check is now printed.
- Made the functions kernel_version and patchlevel more robust.
- The function duplicate_source_tree now only copies the files
  administered by Subversion. Other files, e.g. .o files, are skipped.
- Moved the make flag -j3 from individual make commands to a single
  assignment to the variable MAKEFLAGS, such that the make flags are
  easier to modify.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@709 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-03-21 10:21:26 +00:00
Vladislav Bolkhovitin
94ae1d6db9 Fixes possible oopses on scst_cmd dereference.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@708 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-03-20 18:40:55 +00:00
Vladislav Bolkhovitin
27c5d8dcdf The patch below fixes the following recently introduced checkpatch complaints:
* use tabs not spaces
* Macros with complex values should be enclosed in parenthesis.
* printk() should include KERN_ facility level.
The patch below has been verified by reviewing it carefully and by verifying the output of the following command: scripts/run-regression-tests -k 2.6.28.8

Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@707 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-03-20 12:36:01 +00:00
Vladislav Bolkhovitin
a20e32ad33 Fixing NULL pointer dereferences accessing dev->d_sense
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@706 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-03-20 12:29:20 +00:00
Vladislav Bolkhovitin
071e0a720c Support for descriptor sense format added
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@705 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-03-20 12:07:48 +00:00
Vladislav Bolkhovitin
988f8d98fc Patch from Ruben Laban <r.laban@ism.nl> to make the Makefiles more packager friendly with some modifications.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@704 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-03-19 14:20:07 +00:00
Vladislav Bolkhovitin
43ee898fa6 Remove sg_init_one() definition, because it was added in the kernel prior 2.6.16.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@703 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-03-19 14:00:15 +00:00
Vladislav Bolkhovitin
341f592a4a Support for variable lenght CDB added
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@702 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-03-18 19:36:01 +00:00
Vladislav Bolkhovitin
3fe295f5c1 Better version of r696
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@701 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-03-17 18:47:05 +00:00
Vladislav Bolkhovitin
a1acc1bc78 - scst_user docs updated
- Added notification about device change in fileio_tgt



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@700 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-03-17 18:07:36 +00:00
Vladislav Bolkhovitin
159ef466dc - Support for SCSI AENs added
- Now sense data are sent without additional memory allocation and copy

 - Sending and receiving padding bytes reimplemented

 - Cleanups



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@699 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-03-17 18:05:19 +00:00
Vladislav Bolkhovitin
e252aadf35 - Fixed problems in reading iscsi-scst.conf
- Cleanups



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@698 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-03-17 18:00:26 +00:00
Vladislav Bolkhovitin
019760a88c - Support for Async. Event Notifications added
- Implemented "plug-and-play" notifications about new devices in security groups and changed size of a device both through AENs and Unit Attentions

 - New command SCST_USER_DEVICE_CAPACITY_CHANGED added to scst_user interface to notify SCST core that the corresponding device has changed its capacity

 - New command "resync_size" added to scst_vdisk proc interface to tell scst_vdisk to reread size of the corresponding device.

 - Docs update

 - Minor fixes and cleanups



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@697 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-03-17 17:56:28 +00:00
Vladislav Bolkhovitin
244775bb35 Increase size of struct scst_dev_type.name to match scst_user's requirements
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@696 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-03-16 18:46:17 +00:00
Vladislav Bolkhovitin
06a6ae94e6 Heavily modified patch from Gennadiy Nerubayev <parakie@gmail.com>.
Adds a pattern matching for initiator names to SCST access control.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@695 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-03-09 20:05:15 +00:00
Vladislav Bolkhovitin
271b6887d9 Add handling of non-NONE data transfer direction commands with 0 buffer length in scst_user module.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@694 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-03-09 19:24:32 +00:00
Vladislav Bolkhovitin
04cb6b446a Fixes in debug/release/perf switching patches
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@693 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-03-06 19:06:32 +00:00
Vladislav Bolkhovitin
f9b9d824c6 Session and connection reinstation fixes for cases when they are shutting down and request for reinstation comes.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@692 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-03-06 19:04:48 +00:00
Vladislav Bolkhovitin
707c68abe9 - Now only sent for execution commands are counted to wait for in TM commands
- TM debug fixes and cleanups



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@691 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-03-06 19:01:16 +00:00
Vladislav Bolkhovitin
868223a3a5 Forgotten chunk in previous commit
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@690 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-03-06 10:26:39 +00:00
Dotan Barak
6291409b82 Use inline numbers for masks rather than assume peace
and goodwill and basic sensible cooperation.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@689 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-03-04 18:38:48 +00:00
Vladislav Bolkhovitin
ea244c7da7 Fexes for processing internal REQUEST SENSE with scst_user handler
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@688 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-03-04 18:33:50 +00:00
Vladislav Bolkhovitin
bda620b65a - Connection reinstatement fixes
- Minor cleanups



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@687 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-03-04 18:31:35 +00:00
Vladislav Bolkhovitin
485c9c7f29 Fixes possible crash on BUG_ON (or memory leak without it), if REQUEST SENSE was issued on a command, in which empty sense was returned.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@686 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-03-03 18:17:36 +00:00
Vladislav Bolkhovitin
bc7c69bfc4 - Fixed a major IET-derived iSCSI RFC violation: sessions and connections were not working
- A lot of cleanups and minor fixes, mostly IET-derived



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@685 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-03-03 18:13:23 +00:00
Vladislav Bolkhovitin
aaa11b710b - Cleanups
- scst_set_initial_UA() added. It sets initial Unit Attention for session, replacing default scst_sense_reset_UA
 - task_mgmt_affected_cmds_done() callback added in struct scst_tgt_template. It's informs target driver that a received task management fun
ction has been completed.
 - Now devices blocked only in reset TM commands. ABORTs, etc. now done without devices blocking
 - scst_unregister_session_ex() removed, since there are no users of it



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@684 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-03-03 18:02:25 +00:00
Vladislav Bolkhovitin
982e4d1938 Bufflen can be changed after scst_get_cdb_info(), so for bufflen = 0 data_direction should be changed to SCST_DATA_NONE not in scst_get_cdb_info(), but in the end of parsing.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@683 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-03-03 17:04:12 +00:00
Vladislav Bolkhovitin
d3d5666f5d Cleanups
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@682 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-03-03 17:00:53 +00:00
Vladislav Bolkhovitin
250929b448 Patch from Gal Rosen <galr@storwize.com>:
There are 16 characters of the port_name + 7 characters of ":" + "\0" of
sprintf = total 24 bytes.
wwn_str has only 16 bytes.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@681 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-02-26 20:02:43 +00:00
Dotan Barak
8f6b4e5b99 Put some limit checking on dma segments so that
we don't, somehow, inadvertantly overrun the total
number of queue entries for a command + continuation
segments.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@680 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-02-23 23:18:25 +00:00
Dotan Barak
6880b800ef Major rewrite of DMA mapping code to reduce code duplication
and to allow some debug and enhancements that will be easier
soon.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@679 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-02-23 00:13:25 +00:00
Vladislav Bolkhovitin
3f355da360 Fix for bug reported by Gennadiy Nerubayev <parakie@gmail.com>. In some cases, e.g. with DRBD, bio->bi_end_io() can be called with IRQs disable which isn't appropriate for direct processing in SCST core. Switch to one of internal SCST threads in such cases.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@678 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-02-20 18:04:11 +00:00
Vladislav Bolkhovitin
0cf7566b93 Patch from Krzysztof Blaszkowski with some cleanups:
I realized yesterday that the fix missed one rare case 
still. if the hiwmk_check() returned with error and no_fail override was set 
then the counter would still cross 0 on free.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@677 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-02-19 19:06:13 +00:00
Vladislav Bolkhovitin
3499e33e6b Patch from Krzysztof Blaszkowski:
i noticed this issue running simple iscsi connection test to a few targets.
without included patch the active_pages_total counter wraps around 0 thus it 
breaks logic for releasing memory on "hi watermark" just like it is depicted 
in:

Inactive/active pages                      18/-25
Hi/lo watermarks [pages]                   119808/0
Hi watermark releases/failures             4/0



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@676 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-02-18 19:17:29 +00:00
Vladislav Bolkhovitin
e8b67bb755 - Docs updates
- Minor cleanups



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@675 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-02-18 18:52:35 +00:00
Vladislav Bolkhovitin
fe1a79f012 Fixes negotiation breakage, introduced by r667
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@674 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-02-16 18:46:00 +00:00
Dotan Barak
3ab0a8972a Fix patching that I broke.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@673 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-02-13 18:02:48 +00:00
Dotan Barak
97abf4d107 Merge in work from Feral into this branch. The
recovery from not being able to push a ctio
fix is in. Various task management fixes are
also in. Other work in progress.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@672 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-02-11 18:55:43 +00:00
Dotan Barak
5e1547134a Broaden tags target.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@671 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-02-11 18:54:17 +00:00
Mark Buechler
36db05162a Re-order Makefile install and uninstall a bit. Specifically
for the install so lsb commands come last should lsb not exist
on the system, at least the rest of install works.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@670 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-02-11 16:16:53 +00:00