* 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
- 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
- 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
- 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
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
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
- 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
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
- 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
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
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
- "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
- 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
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
- 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
- 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
- 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