Commit Graph

1065 Commits

Author SHA1 Message Date
Vladislav Bolkhovitin
83dbc69d4e scst: Fix debug_print_with_prefix()
Terminate lines passed to debug_print_with_prefix() with a newline. Make
sure that a formatting specification in an argument past "fmt" is printed
literally instead of being interpreted as a format specification.

The newlines are only missing when sending kernel logging to a remote
system via netconsole and not when using local logging

Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4199 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-04-10 02:26:25 +00:00
Vladislav Bolkhovitin
a0e7676e9c Cleanup
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4190 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-04-05 02:13:36 +00:00
Vladislav Bolkhovitin
8a52742410 scst: make scst_cmd_threads_list more fine grained
Avoid that suspending activity causes scst_init_threads() to delay.
That delay has been observed to cause "task blocked for more than ...
seconds" complaints.

Reported-by: yangfanlinux <yangfanlinux@gmail.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4189 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-04-05 02:05:51 +00:00
Vladislav Bolkhovitin
1ecdf9770f Add __printf annotation to debug_print_with_prefix()
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4188 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-04-04 23:34:54 +00:00
Vladislav Bolkhovitin
7525815852 Note from Alexander Lyakas <alex.bolshoy@gmail.com> about errors caching by FILEIO handler
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4176 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-03-29 02:21:37 +00:00
Vladislav Bolkhovitin
8c7ead1b49 scst: Add a clarification about how conflicting commands are processed
Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4175 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-03-27 01:59:13 +00:00
Vladislav Bolkhovitin
159448f746 Use page_count() since that is recommended over using atomic_read() directly.
Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4174 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-03-27 01:50:30 +00:00
Vladislav Bolkhovitin
8517d9da8a scst: Introduce scst_find_free_slot()
This patch fixes some occurrences of the following 3.3 checkpatch warning:
WARNING: Too many leading tabs - consider code refactoring

Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4173 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-03-27 01:49:10 +00:00
Vladislav Bolkhovitin
5a6928fc2b scst.h: Clarify a comment
Make it more clear that scst_mgmt_cmd.tag refers to the tag of the
command to abort and not to the tag of the ABORT TASK command itself.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4171 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-03-27 01:44:59 +00:00
Vladislav Bolkhovitin
62cc777905 scst: Don't specify a LUN when issuingSCST_UNREG_SESS_TM
The LUN argument is ignored while processing SCST_UNREG_SESS_TM, so don't
pass LUN information when issuing that task management function.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4170 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-03-27 01:43:28 +00:00
Vladislav Bolkhovitin
90670b1c83 scst_rx_mgmt_fn_lun(): Change 3rd arg from u8 * into void *
This change allows to remove several casts and hence improves
source code readability.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4169 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-03-27 01:40:45 +00:00
Bart Van Assche
968d3b17fe nightly build: Add 3.3 support patches
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4167 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-03-24 07:12:56 +00:00
Vladislav Bolkhovitin
8fe9f04789 Debug logging improvements
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4166 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-03-24 03:09:49 +00:00
Vladislav Bolkhovitin
d5ffb2234b Cleanup mgmt parameters initialization.
It's better to do it via a single function.

Patch from Alexey Obitotskiy <alexeyo1@open-e.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4165 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-03-23 22:03:22 +00:00
Vladislav Bolkhovitin
937b2d550d Update for kernel 3.3
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4164 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-03-23 21:48:11 +00:00
Bart Van Assche
39b6c43d45 scst: Fix value of FMTDATA bitmask
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4159 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-03-08 08:24:12 +00:00
Vladislav Bolkhovitin
cc07f3904e The FORMAT UNIT has an optional data-out buffer with unspecified length.
Make sure that SCST parses this command correctly.

Reported-by: Leonid Podolny <leonid.podolny@xtremio.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4158 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-03-07 19:52:50 +00:00
Vladislav Bolkhovitin
a095641495 Make LUN removal work again. This is a fix for r4137.
Reported-by: Riccardo <r.bicelli@gmail.com>

Signed-off-by: Bart Van Assche <bvanassche@acm.org>




git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4157 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-03-07 19:51:15 +00:00
Vladislav Bolkhovitin
7d1ba6a2b0 VERIFY(6) is a tape command. T10 has never defined a VERIFY(6) command
for disk or CD-ROM devices, so make sure scst_vdisk rejects it.

+

added the corresponding cleanups in scst_lib.c and fileio/common.c + updated scst_scsi_op_table

Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4156 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-03-07 19:50:10 +00:00
Vladislav Bolkhovitin
91a790b57d Eliminate three data members from struct vdisk_cmd_params.
Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4155 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-03-07 19:34:27 +00:00
Vladislav Bolkhovitin
c83af071b6 Looks like current kernels are more fair, so we can try to increase SCST_MAX_TGT_DEV_COMMANDS to please QD hungry initiators
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4154 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-03-05 21:21:22 +00:00
Vladislav Bolkhovitin
6f228ecb71 Correct misleading SCST_CMD_ABORTED description.
Noticed by Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4148 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-27 22:59:10 +00:00
Vladislav Bolkhovitin
50120c37b3 scst_cmd_aborted() is a bad and ambiguous name. Rename it to scst_cmd_aborted_on_xmit() and create a new version, which truly reflects its semantic.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4143 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-24 02:24:06 +00:00
Vladislav Bolkhovitin
f2387d7956 Convert strict_strtoul() and simple_strtoul() into kstrtoul() or sscanf()
Recent versions of the checkpatch script complain about strict_strtoul()
and simple_strtoul(), so convert calls to these functions into a call to
kstrtoul() or sscanf(). Convert loops that scan for the
next-(non-)whitespace character into a call to scst_get_next_lexem().
Make __scst_process_luns_mgmt_store() a little more strict by checking
for extraneous parameters past the last argument. Fix the value "res"
returned for the SCST_TRACE_ACTION_VALUE processing code.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4137 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-18 03:01:43 +00:00
Vladislav Bolkhovitin
ab25cb45dc Micro-optimize scst_calc_block_shift()
Replace a loop by a single instruction, namely bsr (bit scan reverse).
From the disassembler output of scst_calc_block_shift() on an x86_64
system:

   0x0000000000001493 <+35>:    bsr    %edx,%ecx

Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4134 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-17 01:43:21 +00:00
Bart Van Assche
5eb3a85948 scst/src/scst_lib.c: Remove a trailing whitespace
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4132 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-16 10:27:18 +00:00
Vladislav Bolkhovitin
293c2f3abd Slightly modified patch from Bart Van Assche <bvanassche@acm.org> cleaning VERIFY commands processing
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4131 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-15 22:32:05 +00:00
Vladislav Bolkhovitin
c9b149c5ce Let's stay on the safe side away from gcc bugs and separate ints and bitfields with another access rules
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4127 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-13 22:35:52 +00:00
Vladislav Bolkhovitin
6a34f10d81 Cleanup suggested by Bart Van Assche <bvanassche@acm.org>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4118 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-10 02:12:15 +00:00
Bart Van Assche
c31ac7c591 scst: Port to RHEL 5.7
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4111 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-04 16:40:33 +00:00
Bart Van Assche
10bcf70cc6 Add files necessary for 3.2 nightly build
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4078 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-01-19 07:58:37 +00:00
Vladislav Bolkhovitin
9da517bae1 Update for kernel 3.2. Netlink part in iSCSI-SCST done by Bart Van Assche <bvanassche@acm.org>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4077 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-01-18 23:48:02 +00:00
Vladislav Bolkhovitin
f9126313e8 Better don't decode vendor opcode 0x24 for block devices, because the
current decoding is incorrect anyway.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4072 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-01-15 00:09:03 +00:00
Vladislav Bolkhovitin
9e8b08cd40 Avoid that the compiler warns about READ_ATTRIBUTE and WRITE_ATTRIBUTE
already being defined in <scsi/scsi.h> on RHEL 6.0, 6.1 and 6.2.

BSD-signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4032 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-28 03:54:03 +00:00
Vladislav Bolkhovitin
76dc7d207a Improve release mode TM logging to simplify imvestigations
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4017 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-19 21:30:18 +00:00
Bart Van Assche
ccb249a8cd Spelling fix: change one occurrence of "ratational" into "rotational".
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3991 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-15 10:33:27 +00:00
Bart Van Assche
4dbdee210d Spelling fix: change one occurrence of "ratational" into "rotational".
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3990 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-15 10:32:24 +00:00
Bart Van Assche
64a9ec4768 Spelling fix: change one occurrence of "ritational" into "rotational".
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3989 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-15 10:31:26 +00:00
Vladislav Bolkhovitin
5dea6c0aa6 Minor addition recommended by Daniel Fernandes <dfernandes1978@hotmail.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3980 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-13 02:13:56 +00:00
Vladislav Bolkhovitin
7872837b6b Replace list_entry((a)->next, b, c) by list_first_entry(a, b, c).
BSD-signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3965 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-10 03:50:24 +00:00
Vladislav Bolkhovitin
fda3b6b327 Minor logging improvement
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3964 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-08 23:49:52 +00:00
Vladislav Bolkhovitin
f173a9133c Micro-optimize the page count computations in scst_mem.c by
rewriting these computations such that branch instructions are avoided.

BSD-signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3963 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-08 00:06:24 +00:00
Vladislav Bolkhovitin
cd2d549a0b Avoid converting back and forth between int and enum
BSD-signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3962 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-08 00:00:06 +00:00
Vladislav Bolkhovitin
882d414719 Makes scst_vdisk build again on RHEL 5.x.
BSD-signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3961 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-07 23:58:59 +00:00
Vladislav Bolkhovitin
63a6094cad Eliminate the blockio / fileio / nullio if-statements in
vdisk_do_job() and the READ/WRITE functions called from that
function. Convert the opcode switch in vdisk_*do_job() to an
array with function pointers.

The function vdisk_exec_verify() only works for file I/O, so
rename it into fileio_exec_verify().

BSD-signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3957 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-07 02:29:14 +00:00
Vladislav Bolkhovitin
69d8c2fbd7 Change __attribute__((packed)) into __packed and
__attribute__((aligned(x))) into __aligned(x) in kernel code since
checkpatch complains about the former.

BSD-signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3952 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-06 03:02:13 +00:00
Vladislav Bolkhovitin
5cc78efff5 According to SPC-4 in the PERSISTENT RESERVE IN full status descriptor
the format of byte 13 is defined as follows:
- The most significant four bits are SCOPE field.
- The least significant four bits are the TYPE field.
Make sure that that byte is filled in according to the specification.

BSD-Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3950 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-02 02:46:33 +00:00
Vladislav Bolkhovitin
ae55aa9e36 The only two values passed into the last two arguments of blockio_exec_rw()
are 0 and 1. Change their argument type from int to bool.

BSD-signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3949 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-02 02:42:21 +00:00
Vladislav Bolkhovitin
0af423256f Micro-optimize the code for CDB parsing in several device handlers.
BSD-signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3948 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-02 02:41:15 +00:00
Vladislav Bolkhovitin
4a3988e274 Use get_unaligned_be16() for reading the two bytes specifying the buffer length
to allow the compiler to generate better code for reading these two bytes.

BSD-signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3947 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2011-12-02 02:39:43 +00:00