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
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
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
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
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
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
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
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
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
__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
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