Commit Graph

642 Commits

Author SHA1 Message Date
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
Vladislav Bolkhovitin
3ee7fc1e44 .26 changed to .27 to stop confusing too observant people :)
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@617 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-12-11 14:30:40 +00:00
Vladislav Bolkhovitin
de25580abb Checkpatch fix
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@616 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-12-10 15:55:16 +00:00
Vladislav Bolkhovitin
30e75c38b3 Trailing whitespace fixed
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@615 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-12-10 12:05:17 +00:00
Vladislav Bolkhovitin
41c3515516 - Memory barriers cleanup. Comments for them improved
- Small docs update
 - srpt/README_in-tree added



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@614 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-12-10 10:55:01 +00:00
Mark Buechler
76d0a69737 - Added patch my Witold Kowolik to allow enable/disable of qla_isp cards.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@613 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-12-09 18:57:32 +00:00
Mark Buechler
d530e39e3a - Applied patch from Witold Kowolik with modifications,
simplifies/fixes option parsing.
- Added new REMOVABLE option.
- Allow options to be specified in lowercase.
- Misc. fixes.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@612 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-12-09 18:28:29 +00:00
Bart Van Assche
4a0a3e01e9 Split generated patch files further:
- Left out iscsi_scst_itf_ver.h since it is a generated file.
- README.qla2x00t has been put in a separate patch, qla2x00t-doc.diff.
- scst_proc.diff has been scst_core.diff.
- scst_vdisk.diff has been split from scst_dev_handlers.diff.
- scst_dev_handlers.diff has been renamed into scst_passthrough.diff.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@611 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-12-09 07:50:44 +00:00
Bart Van Assche
d7d7dc7af6 Cleanup.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@610 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-12-08 12:58:09 +00:00
Bart Van Assche
8dadf2c789 Made "make htmldocs" the last step.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@609 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-12-06 16:28:05 +00:00
Bart Van Assche
e2ef5de20c Option -p now generates three extra patches: scst_debug.diff, scst_sgv.diff and scst_user.diff.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@608 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-12-06 16:27:19 +00:00
Bart Van Assche
f1b811e8dc Fixed typo.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@607 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-12-06 14:04:29 +00:00
Bart Van Assche
a4f41bca01 Added 'make htmldocs'. Changed default kernel version from 2.6.27.7 into 2.6.27.8.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@606 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-12-06 13:39:16 +00:00
Bart Van Assche
86d4199dcb Modified the way in which the dummy mpt patch is suppressed, such that the run-regression-tests script works again.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@605 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-12-06 13:37:43 +00:00
Vladislav Bolkhovitin
0e845189f9 Cleanup
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@604 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-12-05 13:56:43 +00:00