Commit Graph

3114 Commits

Author SHA1 Message Date
Bart Van Assche
f54a1e1c01 nightly build: Remove a kernel patch again
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4185 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-04-03 17:38:47 +00:00
Bart Van Assche
6a6fe9af43 nightly build: Build fcst against recent kernels too / fix a sparse warning
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4184 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-04-03 17:00:08 +00:00
Bart Van Assche
3e65060c5a fcst: Revert r4182 because it was wrong
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4183 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-04-03 16:58:59 +00:00
Bart Van Assche
f9d31e1f2f fcst: Port to kernel 3.3.x
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4182 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-04-03 10:39:07 +00:00
Bart Van Assche
b72ffcf4e3 scstadmin, scst.conf man page: Add example for fcst
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4181 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-04-03 06:58:03 +00:00
Bart Van Assche
f0d32375ed fcst: Eliminate ft_cmd.xfer_rdy_len
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4180 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-04-02 16:56:22 +00:00
Bart Van Assche
8d6b924765 fcst: Port to kernel 3.4.0
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4179 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-04-02 16:54:42 +00:00
Bart Van Assche
215b9be74d fcst: Handle command timeouts properly
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4178 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-04-02 16:53:22 +00:00
Vladislav Bolkhovitin
88881a1459 iSCSI resource agents written by Riccardo Bicelli <r.bicelli@gmail.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4177 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-03-30 20:59:48 +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
49c56244a1 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>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4172 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-03-27 01:46:51 +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
e275e68d49 nightly build: Add kernel version 3.3 and update other kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4168 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-03-24 07:41:39 +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
81fff819d6 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.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4163 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-03-18 12:05:45 +00:00
Bart Van Assche
8dc9d5c439 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4162 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-03-16 19:54:24 +00:00
Vladislav Bolkhovitin
7a87bf25a6 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>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4161 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-03-12 22:31:13 +00:00
Vladislav Bolkhovitin
5c2cde6757 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>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4160 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-03-12 21:52:35 +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
Bart Van Assche
87dd12ac73 scstadmin: Suggest the user to use systemctl (systemd) instead of the LSB installation script if available
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4153 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-03-04 14:17:53 +00:00
Bart Van Assche
3da8048c71 scstadmin: Only enable /etc/init.d/scst in runlevels 3 and 5 since networking is not available in runlevels 2 or 4
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4152 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-03-04 14:16:51 +00:00
Bart Van Assche
02b431ec24 scstadmin: Revert r4023 since bug https://bugzilla.novell.com/show_bug.cgi?id=738281 has been fixed
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4151 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-03-04 14:13:52 +00:00
Bart Van Assche
b07403a23d ib_srpt: Remove an obsolete patch
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4150 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-03-04 13:16:27 +00:00
Vladislav Bolkhovitin
e83c2ebe66 Gentoo HOWTO written by Jurie Botha <jurieb@taprojects.co.za>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4149 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-03-02 02:58:57 +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
Bart Van Assche
30615c003c ib_srpt: Clarify a comment
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4147 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-25 08:59:13 +00:00
Bart Van Assche
2553057f73 ib_srpt: Disallow new logins during module removal
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4146 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-25 08:58:50 +00:00
Bart Van Assche
2d12dae7b4 ib_srpt: Whitespace-only change
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4145 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-24 07:21:24 +00:00
Bart Van Assche
c4d91e67d9 ib_srpt: Follow-up for r4143
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4144 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-24 07:20:52 +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
Bart Van Assche
5160ddb148 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4142 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-19 08:32:26 +00:00
Bart Van Assche
440e1a405e ib_srpt: Document LUN masking
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4141 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-18 13:32:45 +00:00
Bart Van Assche
6e55334a9f ib_srpt: Fix QP use-after-free triggered by SRP logout.
Fixed this by destroying cm_id before QP instead of after. The following
messages were logged if the use-after-free occurred:

mlx4_core 0000:08:00.0: command 0x19 failed: fw status = 0x9
ib_srpt: ***ERROR***: srpt_init_ch_qp() failed (-9)
ib_srpt: ***ERROR***: rejected SRP_LOGIN_REQ because creating a new RDMA channel failed.
ib_srpt: Rejecting login with reason 0x10001


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4139 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-18 10:24:25 +00:00
Bart Van Assche
1a6c43b1bc ib_srpt: Revert r4123
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4138 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-18 07:03:41 +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
9367254fba Patch from Vladimir Shveidel <vladimir.shveidel@xtremio.com> removing excessive msleep() in term exchange path
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4136 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-17 21:50:34 +00:00
Vladislav Bolkhovitin
2d31b116b1 Eliminate double req_q_cnt checks for cases when there is enough head room.
Signed-off-by: Chetan Loke <loke.chetan@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4135 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-02-17 02:14:28 +00:00