Eliminate three data members from struct vdisk_cmd_params.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
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>
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>
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>
scst: Fix value of FMTDATA bitmask
Cleanup: move misc routines in misc.c

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>
Cleanup + implement conditional logging

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>
nightly build: Update kernel versions
scstadmin: Make /etc/init.d/scst status work on RHEL 6.2. Apparently RHEL 6.2 doesn't define the function rc_status in /lib/lsb/init-functions.
Update for kernel 3.3
Cleanup mgmt parameters initialization.

It's better to do it via a single function.

Patch from Alexey Obitotskiy <alexeyo1@open-e.com>
Debug logging improvements
nightly build: Add 3.3 support patches
nightly build: Add kernel version 3.3 and update other kernel versions
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>
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>
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>
Fix 3.3 checkpatch warnings about min()and max()

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>
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>
Use page_count() since that is recommended over using atomic_read() directly.

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