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
This is a backport of commit e1c4038282c7586c3544542b37872c434669d3ac by
Mark Rustad <mark.d.rustad@intel.com>. This patch avoids that unregistering
a session hangs after an exchange timeout occurred.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4194 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
Fix three occurrences of the following warnings reported by the checkpatch
script included with Linux kernel version 3.3:
WARNING: min() should probably be min_t()
WARNING: max() should probably be max_t()
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4172 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
This patch:
* fixes signatures for log_debug and log_pdu macros
* collapses __log_<LEVEL> functions into one
* adds conditional logging
Here conditional logging means that the logging priority and logging level may
vary depending on some dynamic parameters. This is helpful when software is
able to recover from errors which occur periodically and hence, there is no
need to pollute system logs with tons of repetitive non-critical lines.
The following macros are added to support this feature:
* log_info_cond
* log_warning_cond
* log_error_cond
They take an additional first parameter called "level". If it is 0 then they
act as their non-cond counterparts, otherwise they act like log_debug with the
specified level.
Those who are not interested in conditional logging are not affected: they can
continue using plain old logging macros without any changes.
Signed-off-by: Sergey Myasnikov <tigra564@gmail.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4161 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This patch moves the following utility functions from iscsi_scstd.c to misc.c
and makes them public (i.e. non-static):
* set_non_blocking
* sock_set_keepalive
Signed-off-by: Sergey Myasnikov <tigra564@gmail.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4160 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