Commit Graph

44 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
fdbe23b77c - Compiler made to show more warnings
- New warnings fixed



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@484 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-07-31 10:01:45 +00:00
Vladislav Bolkhovitin
70630a843b Fixes few harmless issues:
1. The #define on line 228 of iscsi-scst/usr/isns.c triggers a compiler
warning on ppc.
 2. make iscsi && sudo make iscsi_install triggers the following error
message (2.6.22.17 kernel, ppc), but doesn't break installation:
...
install: cannot stat `usr/iscsi-scst-adm': No such file or directory
...
 3. Unneeded "unlikely" removed

Issues 1 and 2 reported by Bart Van Assche <bart.vanassche@gmail.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@425 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-06-30 09:50:27 +00:00
Vladislav Bolkhovitin
9c1703ef3d - A complete fix for the problem when a command comes with zero transfer length and READ or WRITE data transfer direction
- Version changed to 1.0.0-rc2


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@423 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-06-26 16:39:05 +00:00
Vladislav Bolkhovitin
8b77aa8ad2 Minor cleanups and docs updates
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@422 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-06-26 16:35:10 +00:00
Vladislav Bolkhovitin
5b6ba1d246 Added error message for a kernel bug, which doesn't allow for poll() to work with >256 file descriptors and prevents iscsi-scstd to start.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@416 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-06-18 09:54:38 +00:00
Vladislav Bolkhovitin
20a2e4ae8d Copyrights updated
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@408 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-06-12 11:39:28 +00:00
Vladislav Bolkhovitin
994b72d114 The major TM processing cleanup in scst_user module which was possible after the recent SCST changes, to fix current problems. Also there are fixes for found during development/testing problems. Particularly:
- PRIO queue was removed from scst_user. Instead, all priority commands now queued in the head of the regular queue. The corresponding code was removed from fileio_tgt as well. It necessary, in the future the priority queue can be easily restored from this patch.

 - pre_unreg_sess() was removed from struct scst_dev_type. The corresponding code was removed from SCST core as well

 - Almost all /proc/scsi_tgt commands now can fail after timeout (90 seconds) with EBUSY

 - Fixed possible incorrect command's retry if double RESET UA is detected.

 - Many minor changes and cleanups

Also docs were updated.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@403 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-05-31 12:05:02 +00:00
Vladislav Bolkhovitin
dbf723a163 - Fixed one more 32/64 bits user/kernel incompatibility
- Minor fixes


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@396 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-05-26 11:00:19 +00:00
Vladislav Bolkhovitin
39e9127aaf Patch from Bart Van Assche <bart.vanassche@gmail.com>:
The patch below fixes the following checkpatch warning:
__func__ should be used instead of gcc specific __FUNCTION__

This patch has been tested as follows:
- Checked that make iscsi scst still works.
- Checked that after loading the scst module the kernel messages generated
  because of the shell command "echo all >/proc/scsi_tg/trace_level" still
  make sense. An example:
  [  646.408035] [5845]: scst: scst_proc_log_entry_write:346:Changed trace level for "scsi_tgt": old 0x80005f0e, new 0xffffffff
- Checked that the patch generated by generate-kernel-patch still applies
  cleanly to the 2.6.25.4 kernel, that the patched kernel still compiles,
  installs and boots and that the scst, iscsi-scst and ib_srpt modules still
  load (I performed rm -rf /lib/modules/2.6.25.4* before starting kernel
  compilation).

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@393 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-05-23 15:22:12 +00:00
Vladislav Bolkhovitin
2261eaec3e - Fixed problems with 64-bit platforms with 32-bit user space and with non-4K pages
- From the main Makefile all all LSI/MPT related targets are commented out, because the recent changes in its Makefile have broken them.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@391 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-05-23 15:12:34 +00:00
Vladislav Bolkhovitin
21cc5df121 Patch from Bart Van Assche <bart.vanassche@gmail.com>:
The patch below fixes the following class of checkpatch.pl errors:
  ERROR("(foo*)" should be "(foo *)".
Or: another whitespace-only change.

I have verified that the output of svn diff -w -x is empty for this patch.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@383 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-05-21 15:43:54 +00:00
Vladislav Bolkhovitin
1213800b2f Patch from Bart Van Assche <bart.vanassche@gmail.com>, except few chuncks from qla2x00t/ obviously not related to the target mode addon:
One of the Linux kernel patch submission requirements is that source files do
not contain trailing whitespace. The patch below removes trailing whitespace
from .c and .h source files.

Note: it might be more convenient to run the script I used to generate this
patch than to review and apply the patch below. This is how I generated and
verified the patch below:

cat <<EOF >./strip-trailing-whitespace
#!/bin/bash
trap "rm -f $t" EXIT
t=/tmp/temporary-file.$$
for f in "$@"
do
  sed 's/[	 ]*$//' <"$f" >"$t" && mv "$t" "$f"
done
EOF
chmod a+x ./strip-trailing-whitespace
find -name '*.[ch]' | xargs ./strip-trailing-whitespace
svn diff -x -w

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@377 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-05-19 10:21:41 +00:00
Vladislav Bolkhovitin
cc685733a5 Interface versioning between iSCSI-SCST kernel and user space parts, iscsi_u.h renamed to iscsi_scst.h. Property svn:ignore adjusted accordingly. Docs updated.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@371 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-05-14 17:20:20 +00:00
Vladislav Bolkhovitin
cf53d51733 - In "extraclean" target new autogenerated files added
- Don't automatically build iscsi-scst-adm anymore until it will be fixed


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@368 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-05-13 17:18:07 +00:00
Vladislav Bolkhovitin
925fbcdda3 The bunch of pending changes. Sorry, it's quite big.
- "RECEIVE DIAGNOSTIC RESULTS" command handling fixed
 - Obtaining device queue parameters in scst_obtain_device_parameters() changed to handle NOT READY sense
 - Fixed possible dev_cmd_count underflow
 - Minor iSCSI-SCST connection closing cleanups and fixes
 - Semantic of other *_atomic flags changed a bit. Now they are intended only to allow SCST to optimize execution context. The corresponing functions now can *always* be called on atomic context and, if necessary, should manually determine that using scst_cmd_atomic() function and restart using corresponding *_NEED_THREAD_* return value.
 - scst_cmd_get_tgt_resp_flags() and SCST_TSC_FLAG_STATUS flag made obsolete and replaced by scst_cmd_get_is_send_status(). All in-tree drivers updated accordingly
 - Cleanup: preprocessing_done_atomic removed, now preprocessing_done() callback always called on thread context
 - 64-bit cleanups
 - Documented that iscsi-scst-adm is currently broken and explained why
 - In user space Makefile's added possibility to specify external linker flags
 - Minor performance optimizations
 - Other minor cleanups


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@350 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-04-22 10:30:53 +00:00
Vladislav Bolkhovitin
3ddb4c7653 - Fixed race on TM processing leading to BUG()
- Fixed dev_cdrom and dev_modisk load failures if there are no media in the drives
 - Other minor fixes and cleanups


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@298 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-03-05 18:22:01 +00:00
Vladislav Bolkhovitin
d0dcc1a584 Patches from Arne Redlich <agr@powerkom-dd.de>:
1. The kernel's log level is a string, so strcmp needs to be used for
comparisons.

2. Svn HEAD doesn't compile against kernel versions < 2.6.19 because
"bool" had its debut only in 2.6.19. Here's a quick fix.

3. Iscsi-scstd dies with SIGPIPE if run in foreground mode because the reading
end of the init_report_pipe is already closed in this mode.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@238 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2007-12-24 10:20:18 +00:00
Vladislav Bolkhovitin
a59b9a0849 - Update to the latest IET r145
- TM fixes and improvements, particularly, TARGET RESET now resets only visible to the initiator devices
 - Logs improvements


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@237 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2007-12-21 19:10:40 +00:00
Vladislav Bolkhovitin
70f471427a Minor fixes and improvements
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@235 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2007-12-14 16:43:23 +00:00
Vladislav Bolkhovitin
1e18aabf3a - Implement SN based iSCSI IO flow control
- ABORT_CONSIDER_FINISHED_TASKS_AS_NOT_EXISTING compilation symbol added
 - TM fixes and cleanups
 - Fixes crash on modprobe with some real devices


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@233 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2007-12-13 18:28:34 +00:00
Vladislav Bolkhovitin
ffb60ac8fc Now if iSCSI daemon fails to load config file, it fails to load.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@221 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2007-11-13 17:28:28 +00:00
Vladislav Bolkhovitin
2de18c7c7a - Now iSCSI target service load considered successful if at least one listen socket was successfully open and setup
- Minor race on BLOCKIO requests submittion was fixed
 - Other minor fixes and cleanups


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@220 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2007-11-12 11:21:54 +00:00
Vladislav Bolkhovitin
9120a41d61 - Fixed ignoring errors on the service start. Reported by Tomasz Chmielewski <mangoo@wpkg.org>
- Minor fixes


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@212 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2007-10-25 16:19:40 +00:00
Vladislav Bolkhovitin
a8c124da1b - Fixes 2 shutdown problems
- Cosmetics


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@204 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2007-10-02 15:04:04 +00:00
Vladislav Bolkhovitin
5380955523 - Increased INCOMING_MAX as suggested in http://blog.wpkg.org/2007/09/09/solving-reliability-and-scalability-problems-with-iscsi/.
- Minor Makefile fixes


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@200 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2007-09-25 13:39:25 +00:00
Vladislav Bolkhovitin
918c113858 - Updated to the latest IET (r137)
- ToDo note added


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@167 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2007-08-23 15:29:44 +00:00
Vladislav Bolkhovitin
d224057476 Copyrights updated
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@166 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2007-08-23 15:28:18 +00:00
Vladislav Bolkhovitin
044a6987d9 "iSCSI Enterprise" ranamed to "iSCSI-SCST"
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@165 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2007-08-16 09:19:34 +00:00
Vladislav Bolkhovitin
e6a57baa14 The initial commit of iSCSI-SCST
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@162 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2007-08-15 09:28:54 +00:00