Commit Graph

24 Commits

Author SHA1 Message Date
Vladislav Bolkhovitin
bc96b052d5 The patch below adds support for the 2.6.29 kernel and also fixes the
checkpatch issues reported by the checkpatch script included with the 2.6.29
kernel and that were not yet reported by the 2.6.28 checkpatch script
(trailing statements should be on the next line / struct should normally be
const).
The patch below has been tested 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.21 -k 2.6.28.9 -k 2.6.29 and verified the output.
- Rebuilt, installed and loaded scst, iscsi-scst and srpt as follows:
make -s clean && make -s -C scst install && make -s -C iscsi-scst install && make -s -C srpt install && cd scstadmin && make -s && make -s install && modprobe scst_vdisk && modprobe iscsi-scst && dmesg

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

with minor cleanups and corrections in put_page_callback-2.6.29.patch



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@717 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2009-03-25 12:55:27 +00:00
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
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
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
e7e7c386f9 Cleanups after "make namespacecheck"
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@593 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-12-03 11:59:41 +00:00
Vladislav Bolkhovitin
9013ab1315 Signed/unsigned cleanups
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@586 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-11-28 16:11:51 +00:00
Vladislav Bolkhovitin
b0c6d9a561 The patch below fixes many checkpatch warnings triggered by the iSCSI kernel
code, mainly about lines that exceeded 80 columns. As you can see in the patch
below most lines that were too long have been split, but some code has also
been moved into helper functions in order to keep the code readable. No
functionality has been changed.

This patch has been verified as follows:
- Reread the patch carefully.
- Verified that the iSCSI target kernel module still loads.
- Verified the output generated by scripts/run-regression-tests -k 2.6.27.5.

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

with some modifications



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@569 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-11-12 18:49:18 +00:00
Vladislav Bolkhovitin
0b55f587a0 Fix the following sparse warnings in several locations:
warning: incorrect type in argument 2 (different address spaces)
    expected void const [noderef] <asn:1>*from
    got void *<noident>

One more optional fix (that i didn't do) is instead of casting
arg in the ioctl() function before every call to function
is to do the casting only once to a temporary variable and
send this variable to every function.

Signed-off-by: Dotan Barak <dotanba@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@461 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-07-15 17:52:16 +00:00
Vladislav Bolkhovitin
cc28ddcdf2 Apparently the SCST code with debugging and/or tracing enabled compiles fine as
an external module. When applying the SCST kernel patch to the mainstream 
kernel tree with debugging and/or tracing enabled however, the resulting code
triggers a compiler error. This is because the symbols DEBUG and TRACING
conflict with symbols with the same named defined in unrelated kernel headers.
The patch below resolves these conflicts by renaming the following preprocessor 
symbols:
- DEBUG into CONFIG_SCST_DEBUG.
- DEBUG_DIGEST_FAILURES into CONFIG_SCST_ISCSI_DEBUG_DIGEST_FAILURES.
- DEBUG_OOM into CONFIG_SCST_DEBUG_OOM.
- DEBUG_RETRY into CONFIG_SCST_DEBUG_RETRY.
- DEBUG_SN into CONFIG_SCST_DEBUG_SN.
- DEBUG_TM into CONFIG_SCST_DEBUG_TM.
- EXTRACHECKS into CONFIG_SCST_EXTRACHECKS.
- SCST_HIGHMEM into CONFIG_SCST_HIGHMEM.
- STRICT_SERIALIZING into CONFIG_SCST_STRICT_SERIALIZING.
- TM_DBG_GO_OFFLINE into CONFIG_SCST_TM_DBG_GO_OFFLINE. Mapped 0/1 values
  into macro undefined / macro defined.
- TRACING into CONFIG_SCST_TRACING.
- USE_EXPECTED_VALUES into CONFIG_SCST_USE_EXPECTED_VALUES.
- In qla_isp/linux/isp_scst.c, renamed DEBUG into DEBUG_ISP_SCST.
- In qla_isp/..., renamed SCSI_TARGET in SCST_SCSI_TARGET.
- In qla_isp/..., renamed SCSI_TARGET_DEV in SCST_SCSI_TARGET_DEV.
Additionally, all CONFIG_SCSI_TARGET* macro's are renamed into CONFIG_SCST* in
order to avoid confusion between the STGT CONFIG-symbols and the SCST CONFIG-
symbols.

The following additional options are now configurable through Kconfig:
- CONFIG_SCST_ISCSI_DEBUG_DIGEST_FAILURES
- CONFIG_SCST_STRICT_SERIALIZING
- CONFIG_SCST_STRICT_SECURITY
- CONFIG_SCST_ALLOW_PASSTHROUGH_IO_SUBMIT_IN_SIRQ
- CONFIG_SCST_ABORT_CONSIDER_FINISHED_TASKS_AS_NOT_EXISTING
- CONFIG_SCST_USE_EXPECTED_VALUES
- CONFIG_SCST_DEBUG_OOM
- CONFIG_SCST_DEBUG_RETRY
- CONFIG_SCST_DEBUG_SN
- CONFIG_SCST_DEBUG_TM
- CONFIG_SCST_TM_DBG_GO_OFFLINE

The patch below has been verified as follows:
- Verified that the following command does not print any new warning messages:
  make -s clean && make -C srpt -s clean && make -s scst iscsi-scst && make -C srpt -s
- Verified as follows that the internal SCST patches still apply cleanly:
  for p in *patch; do patch -p0 --dry-run -f -s <$p; done
- Checked that the patch generated by generate-kernel-patch still applies
  cleanly to the 2.6.25.7 kernel, and that the patched kernel tree still
  compiles, installs and boots fine, that the iscsi-scst, ib_srpt,
  scst_disk and scst_vdisk modules still load, and that iSCSI communication
  still works fine. All SCST kernel configuration options that could be
  enabled have been enabled during this test.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@453 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-07-10 10:49:06 +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
f8521e2a68 Patch from Bart Van Assche <bart.vanassche@gmail.com>:
The patch below fixes all remaining checkpatch errors:
- ERROR: do not use assignment in if condition
- ERROR: that open brace { should be on the previous line
- ERROR: trailing whitespace
- ERROR: use tabs not spaces
The last three had already been fixed before, but some occurences were
reintroduced in r403. It would be great if new modifications could be checked
for checkpatch errors before being committed.

This patch has been tested as follows:
- Reread the patch below carefully.
- Verified that make -s clean && make -s iscsi scst && make -s -C srpt
  still works and does not trigger any compiler warnings.
- Verified that checkpatch does no longer report any errors.
- Checked that the patch generated by generate-kernel-patch still applies
  cleanly to the 2.6.25.4 kernel, and that the patched kernel tree still
  compiles, installs and boots fine, and that the iscsi-scst, ib_srpt,
  scst_disk and scst_vdisk modules still load.
- Tested that iSCSI login/logout still works from a remote system, and that
  iSCSI I/O still works.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@404 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-06-12 11:22:15 +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
73ea36593d Patch from Bart Van Assche <bart.vanassche@gmail.com>:
The patch below fixes the following categories of checkpatch complaints:
- ERROR: switch and case should be at the same indent
- ERROR: do not initialise statics to 0 or NULL
- ERROR: use tabs not spaces

I have verified that the SCST source code still compiles.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@398 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2008-05-27 14:26:15 +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
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
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
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
fb3a9201cc - Fixes hang in TCP CLOSE/CLOSE_WAIT stages
- Minor debug improvements


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@223 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2007-11-15 16:12:08 +00:00
Vladislav Bolkhovitin
71592f2cac Cleanups, debug imporvements and minor fixes
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@214 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2007-11-01 17:07:07 +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
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