Commit Graph

689 Commits

Author SHA1 Message Date
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
Mark Buechler
b0a902a6a1 Add lsb support for init.d scripts. Patch from Bart Van Assche.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@669 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-02-11 16:09:45 +00:00
Vladislav Bolkhovitin
0319c5c81c Fixes checkpatch errors notices by Bart Van Assche <bart.vanassche@gmail.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@668 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-02-09 20:08:14 +00:00
Vladislav Bolkhovitin
293c0ee1a3 - Iscsi-scst-adm fixes. It should be fully functional now.
- Other iSCSI-SCST user space fixes, improvements and cleanups.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@667 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-02-06 19:52:34 +00:00
Vladislav Bolkhovitin
689bcbc261 Cleanups
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@666 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-02-06 19:46:57 +00:00
Vladislav Bolkhovitin
5a9a0ad491 2 missed functions added to scst_user interface:
- SCST_USER_UNREGISTER_DEVICE - to unregister device, flush mem reuse (SGV) cache and send UCMD_STATE_ON_CACHE_FREEING notifications for all freed buffers to the user space handler. Simple device close doesn't allow that, so all the cached buffers might look as "leaked" from the user space handler POV.

 - SCST_USER_FLUSH_CACHE - to flush mem reuse (SGV) cache and send UCMD_STATE_ON_CACHE_FREEING notifications for all freed buffers to the user space handler

+ some cosmetics

Docs update is coming



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@665 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-02-05 18:30:50 +00:00
Vladislav Bolkhovitin
45fd88076c - Fix typo in scst_rx_mgmt_fn_tag() call for task abort
- Cosmetics



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@664 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-02-05 18:23:28 +00:00
Vladislav Bolkhovitin
c10ae6b32d Clustering of scst_user pages added
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@663 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-02-05 18:07:51 +00:00
Vladislav Bolkhovitin
a34ec0f7ff A bunch of pending fixes/cleanups:
- Docs about limitation of having initiator and target on the same host updated + cleanups
 - Minor local thread storage improvements
 - TRACE_MGMT_MINOR excluded from the default set of trace flags to not confuse people
 - Dedicated kmem_cache for blockio created



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@662 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-02-04 18:45:32 +00:00
Dotan Barak
e4d19dd1da Remove some misleading and dead files.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@661 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-02-03 06:32:12 +00:00
Dotan Barak
75561e4790 Update some firmware sets.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@660 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-02-03 06:31:27 +00:00
Vladislav Bolkhovitin
b237ddf08f In the header file scst.h scst_cmd::sg_cnt and tgt_sg_cnt::sg_cnt are declared
as signed integers, while some inline functions in the same header file treat
these as unsigned integers. The patch below converts all uses to signed
integer. 

The patch below has been verified by checking the output files generated by
the following command:
  scripts/run-regression-tests -k 2.6.24.7 -k 2.6.25.20 -k 2.6.26.8 -k 2.6.27.13 -k 2.6.28.2

Note: I do not expect that this patch changes the behavior of SCST in any way.
This patch is not a bug fix -- all it does is cleaning up an inconsistency.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@659 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-02-02 16:25:47 +00:00
Vladislav Bolkhovitin
d5322f10ad The patch below implements the following changes for the iSCSI-SCST HOWTO
document:
- Added RHEL / CentOS to the list of officially supported kernels.
- Mentioned that regenerating the initial RAM disk is an explicit step on many
  distro's.
- Replaced shell instructions for generating /etc/scst.conf by a sequence of
  scstadmin commands.
- Added note about insserv.

Also it adds small HOWTO how to recompile RHEL/CentOS kernel in README_RHEL.

Also it implements some docs cleanups.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@658 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-02-02 15:49:39 +00:00
Vladislav Bolkhovitin
dd1400dddc The patch below adds the following two RHEL 5 / CentOS 5 patches to the SCST
source tree:
- Support for zero-copy TCP transfer completion.
- An implementation of scsi_execute_async_fifo().
Except for the hunk headers, these patches are identical to similarly named
patches already present in the SCST source tree.

Additionally, implementations of seq_list_start() and seq_list_next() are
provided for those kernel versions that do not define these functions.

The patch below has been tested by verifying that iSCSI data transfer still
works OK on CentOS 5.2 (x86_64).

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@657 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-02-02 11:36:53 +00:00
Vladislav Bolkhovitin
ae5ec143aa The patch below is a minor correction for the 2.6.27 in-tree kernel patches
I submitted about three months ago: the patch headers now refer to the 2.6.27
kernel as they should instead of the 2.6.26 kernel. At least one user has been
confused by this. The patch below does not change any behavior of SCST.
The patch has been tested by verifying that the output of the following
command remained the same as before the modifications:
scripts/run-regression-tests -k 2.6.27

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@656 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-02-02 11:29:14 +00:00
Vladislav Bolkhovitin
52d7752136 - Removed artificial limitation on sg_tablesize. It isn't needed, because the regular iSCSI negotiated MaxRecvDataSegmentLength-related facilities do all the job pretty well.
- Cleanups



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@655 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-02-02 11:16:38 +00:00
Vladislav Bolkhovitin
b240091109 Final merge with IET (r201-204):
- 2.6.25 introduced netlink_socket_release(), to be used to clean up netlink sockets correctly (taking care of namespaces).

 - New more scalable proc seq_file implementation

+ minor signess cleanups

+ version updated



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@654 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-01-30 17:47:31 +00:00
Vladislav Bolkhovitin
ff10abd363 Merge with IET r196:
- Allow removal of kernel target objects if the user space object does not exist

Based on a patch by Lars Ellenberg.

Signed-off-by: Arne Redlich <agr@powerkom-dd.de>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@653 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-01-30 16:49:01 +00:00
Vladislav Bolkhovitin
922c377cd2 Merge with IET r195:
From: Lars Ellenberg <lars.ellenberg@linbit.com>

Ignore SIGPIPE in ietd

Otherwise we would die in some later write() during the event_loop
instead of getting EPIPE!



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@652 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-01-30 16:41:22 +00:00
Vladislav Bolkhovitin
0f68fb5b58 Merge of IET r194:
- Add support for Reject PDUs and make use of them in appropriate places.

Signed-off-by: Arne Redlich <agr@powerkom-dd.de>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@651 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-01-30 16:36:39 +00:00