Commit Graph

706 Commits

Author SHA1 Message Date
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
Vladislav Bolkhovitin
4a7cdb58b4 Merge with IET r192-193:
- Introduce min*/max*() and more list_* macros

 - Multipart PDU support for discovery sessions

The conn's response buffer is now replaced with a list of buffers and
all users are updated accordingly. Discovery sessions can make use of
this mechanism, if the list of targets + addresses does not fit into a
single text PDU, the initiator may now retrieve subsequent parts.

This also fixes the data segment handling for discovery sessions.

Based on a patch originally provided by Shreyansh Jain <shrey.linux@gmail.com>

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@650 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-01-30 16:25:52 +00:00
Vladislav Bolkhovitin
684719c66e Merge with IET r170-191:
- Update MaxConnections documentation
 - Remove isns config description from man page
 - Check return values of chdir(), ftruncate() and write(), because recent versions of the glibc insist on the return value being checked by
introducing __attribute__((warn_unused_result)) to these functions.
 - Fix snprintf use in isns.c
 - Take \0-termination into account when passing strings to isns_tlv_set() to solve incompatibility with MS iSNS 3.0 as IQN length is multiple of 4
 - Fix list corruption if SCST target registration fails
 - Register the target port actually used instead of the default iSCSI port.
 - Remove unused connection->pad
 - Refactor cmnd_execute()
 - Version changed



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@649 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-01-29 19:10:10 +00:00
Vladislav Bolkhovitin
ba698dbdd5 - Fix for iSCSI RFC violation: TARGET COLD RESET must close all connections/sessions, not only the current one
- Cleanups



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@648 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-01-29 18:25:45 +00:00
Vladislav Bolkhovitin
a03936f3bc Merge with IET r169:
From:  Shreyansh Jain <shrey.linux at gmail.com>
Subject: [Patch 1/1] Segfault in ietd buffer overrun in dump_line

Fix a buffer overrun problem in __dump_line function in log.c file.
It also removes a stray 'return' call in log_pdu function which was
restricting a PDU dump call to complete log_pdu operation.

Also, in log_pdu function, the first check for log_level against
passed parameter for log was incorrect and would have forced a return
even when the caller has set the logging level to acceptable level.

Signed-off-by: Shreyansh Jain <shrey.linux at gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@647 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-01-29 12:19:22 +00:00
Vladislav Bolkhovitin
04041fa3f1 Merge with IET r160-168: add iscsi-scst-adm support to display list of CHAP accounts and their data
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@646 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-01-29 12:12:42 +00:00
Vladislav Bolkhovitin
2f392619fb Make USN related stuff completed. Unfortunately, it can break existing cluster setups, but it's better to make it now, then later.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@645 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-01-28 18:44:59 +00:00
Vladislav Bolkhovitin
467b075b57 Sync with IET revisions 156-159: fix for compilation on glibc 2.8
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@644 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-01-27 18:50:33 +00:00
Vladislav Bolkhovitin
9ab503a347 - Add autogenerated USN
- Sync fileio_tgt with scst_vdisk



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@643 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-01-27 18:09:24 +00:00
Vladislav Bolkhovitin
77d509b0f9 - Fixed race in scst_user, which can lead to usage of already freed command. A misbehaving user space handler can make ucmd to get dead
immediately after the lock is released and we should catch it.
 - Text in README about barriers usage updated
 - Minor cleanup with aim to have more robust code



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@642 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-01-26 18:08:07 +00:00
Vladislav Bolkhovitin
2482d19490 The patch below fixes most checkpatch and sparse issues that are reported by
the most recent versions (checkpatch 2.6.28 / latest sparse git version) and
that were not reported by previous versions (checkpatch 2.6.27 / sparse 0.4.1).
The patch below fixes the following issues:
* Removed trailing space in iscsi-scst/README_in-tree.
* Fixed sparse complaints about functions that were not declared static.
* Fixed sparse complaints about casts between address spaces: such casts are
   now either fixed or explicit (via the __force keyword).

The patch below has been verified by checking the output produced by:
scripts/run-regression-tests -k 2.6.28.1

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@641 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-01-26 17:32:50 +00:00
Vladislav Bolkhovitin
a5589e099a Recently (Subversion revision 633) code was added to scst_vdisk.c that
performs a.o. 64-bit division. While gcc supports 64-bit divisions on 32-bit
CPU's, gcc generates a function call for these 64-bit divisions (see also
http://gcc.gnu.org/onlinedocs/gccint/Integer-library-routines.html for the
entire list). Unfortunately there is no implementation available for these
functions in the Linux kernel. Which means that loading kernel modules
that contain 64-bit divisions on a 32-bit system will fail and that insmod/
modprobe will complain about undefined references to e.g. __umoddi3. AFAIK the
proper approach in the Linux kernel is to use the do_div() macro for
performing 64-bit divisions. This macro is defined in <asm/div64.h>. The patch
below converts the call to div_s64_rem() by a call to do_div().

The patch below has been verified 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.12 -k 2.6.28.1
  on a 64-bit system and verified that the output of the re*/sparse* files did
  not contain any compilation errors.
- Verified that the patched SCST source compiles fine on CentOS 5.2, 32-bit.
- Verified that the scst_vdisk module loads correctly on CentOS 5.2, 32-bit.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@640 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-01-26 17:23:46 +00:00
Vladislav Bolkhovitin
3943177f67 Fixes wrong usage of the last parameter of module_param_named()
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@639 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-01-26 12:57:22 +00:00
Vladislav Bolkhovitin
48addc3482 Modified patch from Bart Van Assche <bart.vanassche@gmail.com>
It, hopefully, fixes compilation problems on CentOS 5.2 as well as on vanilla kernels <2.6.28


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@638 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-01-23 19:51:54 +00:00
Bart Van Assche
c5faf6a7b4 - Fixed bug in evaluation of expressions containing '&&' or '||'.
- Added support for evaluating #ifdef and #ifndef.
- Added support for substituting the macro's RHEL_MAJOR, RHEL_MINOR and RHEL_RELEASE_CODE.
- Added more comments.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@637 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-01-19 19:07:42 +00:00
Bart Van Assche
553f1920e1 Bumped default kernel version to 2.6.28.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@636 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-01-17 10:34:48 +00:00
Vladislav Bolkhovitin
ae7345340c A bunch of minor fixes/improvements, cleanups and updates:
- In scst_local new experimental compile-time option to force direct processing added
 - Attempt in SCST structures to separate read-mostly from read-write data to decrease cache ping-pong between CPUs
 - In scst_vdisk new module parameter num_threads added to specify a number of threads for each vdisk/vcdrom. Default is 5.
 - Debug logging for failed digests in iSCSI-SCST improved
 - Docs updates/cleanups



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@635 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-01-16 20:56:06 +00:00
Vladislav Bolkhovitin
7a4e9129fc - Minor optimization
- New member target_name added to struct scst_user_sess
 - Docs updates



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@634 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-01-15 18:50:43 +00:00
Vladislav Bolkhovitin
5a9ff63133 Minor fixes for better Windows compatibility
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@633 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-01-15 16:14:57 +00:00
Vladislav Bolkhovitin
479a9d0a9f - Update for 2.6.28
- Small doc update in flow control area



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@632 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-01-12 18:55:08 +00:00
Bart Van Assche
e5caaf4548 Removed trailing whitespace. While the checkpatch script included with the 2.6.27 kernel did not complain on trailing whitespace in documentation and kbuild files, the checkpatch script included with the 2.6.28 kernel does.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@631 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-01-10 17:21:57 +00:00
Vladislav Bolkhovitin
606a02d963 Minor performance improvement
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@630 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-01-04 17:53:57 +00:00
Vladislav Bolkhovitin
c89d549bbe - Minor improvements
- Incorrect BUG_ON removed



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@629 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-01-04 16:14:33 +00:00
Vladislav Bolkhovitin
e7429fd16e Minor fixes
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@628 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-01-04 16:12:56 +00:00
Vladislav Bolkhovitin
9f2ac56d74 Fixed problem with KERN_CONT absent in some vendor kernels
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@627 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-12-30 10:37:07 +00:00
Vladislav Bolkhovitin
4d6896745e READ POSITION command's constants cleanup, since LONG_BIT conflicts with constant defined in /usr/include/bits/xopen_lim.h
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@626 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-12-26 17:49:27 +00:00
Vladislav Bolkhovitin
968475e2dc Obsolete TODO removed
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@625 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-12-26 17:42:21 +00:00
Vladislav Bolkhovitin
5026d92ad0 Access control docs updated
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@624 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-12-26 17:40:30 +00:00
Mark Buechler
b4c37abdb2 - Fixed a removeDevice() case when using -ForceConfig. Spotted by Ondrej Palkovsky.
- SCST.pm: Cosmetic changes to error messages - include the handler name.
- SCST.pm: Quote handlers, handler IOs, devices, users and groups in error messages.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@623 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-12-18 17:30:37 +00:00
Vladislav Bolkhovitin
d30fbf8e66 Set memory limits according to LOWMEM, not TOTALMEM
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@622 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-12-18 16:50:43 +00:00
Vladislav Bolkhovitin
c1fa6b6258 Cleanup: dev_serialized deleted, because it dublicates dev_double_ua_possible
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@621 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-12-18 16:41:26 +00:00
Mark Buechler
40e56edbbd - Cosmetic fixes by Witold Kowolik and increment version.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@620 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-12-18 16:11:32 +00:00
Mark Buechler
c7fafb82ab - Fixed enabling/disabling targets. Spotted by Witold Kowolik.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@619 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-12-18 16:05:55 +00:00
Mark Buechler
1d168fae23 - Fix a check in SCST::removeUser(), spotted by Witold Kowolik.
- Changed a few returns to 1 instead of $TRUE since really they're
  int returns and not boolean.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@618 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-12-18 16:00:34 +00:00