Commit Graph

554 Commits

Author SHA1 Message Date
Vladislav Bolkhovitin
45d7f40ec1 Improve release logging
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6478 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-08-25 02:57:51 +00:00
Vladislav Bolkhovitin
90ad49cbae scst_user: optimize performance by exchanging multiple commands/responses per IOCTL
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6466 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-08-08 02:57:14 +00:00
Bart Van Assche
ae9de304c4 scst: Several RHEL 5 build fixes
Move the get_unaligned_*() functions up such that these occur
before the T10-PI functions. Backport the definition of
VARIABLE_LENGTH_CMD. Make scst_dif_crc_fn() build on RHEL 5
systems.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6415 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-07-10 22:26:43 +00:00
Bart Van Assche
84d90ac96e scst.h: Backport more cpumask.h functions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6413 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-07-10 16:04:27 +00:00
Bart Van Assche
ac156d84c0 scst.h: Add cpumask_var_t for kernel versions before 2.6.28
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6412 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-07-09 19:12:09 +00:00
Bart Van Assche
502aef7b1b scst: Rename SERVICE_ACTION_IN into SERVICE_ACTION_IN_16
Rename this constant because it has been renamed in the Linux
kernel.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6335 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-06-16 20:16:19 +00:00
Bart Van Assche
1d58f5fd14 scst_local: RHEL 5 build fix
Add a definition of scsi_bidi_cmnd() for older kernel versions.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6333 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-06-16 20:14:10 +00:00
Bart Van Assche
7566e2ed71 Avoid that compiler warnings depend on the build mode
It is annoying that some warnings are only reported in release mode.
Modify scst_debug.h such that the compiler does not report variables
that are only used in debug builds as unused.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6315 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-06-15 22:15:07 +00:00
Bart Van Assche
b7ec40e6a7 scst: RHEL 5 build fix for file_inode()
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6238 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-06-11 04:19:47 +00:00
Bart Van Assche
4117f30c06 scst: Allow compiling iSER/SRP against OFED/MLNX_OFED
Both OFED/MLNX_OFED compat and scst define file_inode.
This causes a compilation error. Fix this by detecting
that backports are in effect.

Signed-off-by: Yan Burman <yanb@mellanox.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6236 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-06-10 16:01:24 +00:00
Bart Van Assche
cd429f04e5 scst.h: Use tabs for indentation
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6228 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-06-09 13:49:06 +00:00
Bart Van Assche
253da8189d scst.h: Spelling fix: overriden -> overridden
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6227 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-06-09 13:36:45 +00:00
Vladislav Bolkhovitin
a4fc2e5638 scst: use t10_pi_tuple
Use t10_pi_tuple instead of scst_dif_tuple.

Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6215 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-06-05 02:15:09 +00:00
Vladislav Bolkhovitin
c236c36778 Microoptimizations
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6210 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-05-21 01:38:55 +00:00
Vladislav Bolkhovitin
e0887beef6 Forwarding targets attribute added
See the patch for description



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6209 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-05-21 01:36:34 +00:00
Vladislav Bolkhovitin
a422ba3cc9 Unaligned I/O statistics added
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6208 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-05-21 01:28:58 +00:00
Vladislav Bolkhovitin
e919c5bb20 Cleanup
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6199 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-05-06 00:47:22 +00:00
Vladislav Bolkhovitin
80be46ae7b scst_targ: Avoid incorrect block size changes
The scst_block_generic_dev_done() function parses the READ CAPACITY
response without checking whether the response buffer has been
initialized. This can lead to incorrect block size changes and also
to the following kernel warning:

WARNING: at scst/src/scst_lib.c:7353 scst_calc_block_shift+0x7f/0xb0 [scst]()
1 << 23 != 12595456
 [<ffffffff816071e3>] dump_stack+0x19/0x1b
 [<ffffffff8106e23d>] warn_slowpath_common+0x7d/0xc0
 [<ffffffff8106e336>] warn_slowpath_fmt+0x46/0x50
 [<ffffffffa0712e2f>] scst_calc_block_shift+0x7f/0xb0 [scst]
 [<ffffffffa072dbd7>] scst_block_generic_dev_done.part.39+0x6a/0x7d [scst]
 [<ffffffffa07162a4>] scst_block_generic_dev_done+0x34/0x40 [scst]
 [<ffffffffa0066205>] dev_user_disk_done+0x15/0x20 [scst_user]
 [<ffffffffa070c119>] scst_dev_done+0x49/0x150 [scst]
 [<ffffffffa070e1a0>] scst_process_active_cmd+0x240/0x390 [scst]
 [<ffffffffa070e7e1>] scst_process_redirect_cmd+0x121/0x1e0 [scst]
 [<ffffffffa070e916>] scst_cmd_done_local+0x76/0x120 [scst]
 [<ffffffffa006843a>] dev_user_process_reply_exec+0x8a/0x370 [scst_user]
 [<ffffffffa00699e2>] dev_user_process_reply+0x242/0x2e0 [scst_user]
 [<ffffffffa0069b80>] dev_user_reply_get_cmd.isra.17+0x100/0x2d0 [scst_user]
 [<ffffffffa0069ea7>] dev_user_ioctl+0x157/0x428 [scst_user]
 [<ffffffff811d999a>] do_vfs_ioctl+0x7a/0x2e0
 [<ffffffff811d9c91>] SyS_ioctl+0x91/0xb0
 [<ffffffff8161b269>] system_call_fastpath+0x16/0x1b

Avoid this by additionally checking cmd->completed

Reported-by: Gal Rosen <galr@storone.com>
Reported-by: Abacus Liang <abacusl@hotmail.com>
Reported-by: Shahar Salzman <shahar.salzman@kaminario.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6196 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-05-02 01:01:15 +00:00
Vladislav Bolkhovitin
906f4dfefb Merge t10-pi branch back
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6192 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-05-01 04:21:56 +00:00
Vladislav Bolkhovitin
0b4fe40d3e scst_lib: Improve WRITE SAME performance
Some storage devices have a block size of 512 bytes and a minimum
I/O size and/or optimal I/O size of 4096 bytes. Improve WRITE SAME
performance for such devices by increasing the I/O granularity from
512 bytes to 4096 bytes.

Based on a patch written by Vishal Tripathi <vishal.tripathi@calsoftinc.com>
and Sushil Sharma <sushil.sharma@calsoftinc.com>.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>

+ with some minor changes



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6189 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-05-01 02:04:39 +00:00
Bart Van Assche
c32f79f6c1 Revert T10-PI support
The T10-PI patch (r6162) increases the time needed to run mkfs.ext4
over iSCSI from less than a second to several minutes. This is a
regression so revert the T10-PI patch until there is sufficient time
to find the root cause of this regression and to fix this regression.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6171 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-03-31 09:51:24 +00:00
Bart Van Assche
2dc5f994cf scst.h: Address recently introduced checkpatch complaints about whitespace
Address the following checkpatch complaints:

ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
ERROR:SPACING: space required before the open parenthesis '('


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6169 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-03-30 14:56:42 +00:00
Vladislav Bolkhovitin
a3ad8d1832 T10-PI support
Thanks to SanDisk and Emulex for supporting this work!

Tested with Emulex SDK Release 5.2.1



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6162 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-03-28 05:22:47 +00:00
Vladislav Bolkhovitin
fe38e4acb2 Copyrights updated
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6146 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-03-19 00:01:03 +00:00
Vladislav Bolkhovitin
4ac6d7a26d [PATCH] scst: Drop detect() method
There is no need for a detect() method - code that is present in such
a method can be moved to module_init(). Hence declare this method
obsolete. Leave the detect pointer member in the target template for
now for out-of-tree SCST drivers.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>

with some improvements



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6113 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-02-21 04:32:36 +00:00
Bart Van Assche
5019ae319e scst: Introduce file_inode()
Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
[bvanassche: Constified file_inode() argument / added iscsi-scst conversion]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6084 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-02-12 07:48:10 +00:00
Bart Van Assche
3bb41e9eca scst.h: Fix a sparse warning for kernels 2.6.29..2.6.31
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5983 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-01-21 13:11:56 +00:00
Bart Van Assche
628f3939bc scst: Rework SCSI pass-through support for kernel versions >= 2.6.30
Changes in this patch:
- Rework the SCSI pass-through code such that for kernel versions
  >= 2.6.30 the scst_exec_req_fifo patch is no longer needed.
- Modify the pass-through code such that blk_rq_append_bio() is only
  called for kernel version 2.6.30. For later kernel versions
  blk_make_request() is called instead.
- Rework scst_scsi_exec_async().
- Add debug tracing of SCSI pass-through result status.
- Add a lockdep_assert_held() call in scsi_end_async().



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5979 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-01-20 15:04:23 +00:00
Bart Van Assche
c46daa8368 Spelling fix: immediatelly -> immediately
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5956 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-12-22 13:15:55 +00:00
Bart Van Assche
a1ffc737c0 Source code comment spelling fix: hander -> handler
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5948 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-12-22 12:33:06 +00:00
Vladislav Bolkhovitin
94d1c2fc6c Replace in cases, where sporadic failures are possible, HARDWARE ERROR
by INTERNAL TARGET FAILURE, which is retriable (some OS'es don't retry
HARDWARE ERROR)

Reported and suggested by Shahar Salzman <shahar.salzman@kaminario.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5940 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-12-19 03:55:14 +00:00
Bart Van Assche
1657c7db3b scst.h: Add uintptr_t
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5891 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-11-27 15:18:58 +00:00
Vladislav Bolkhovitin
a42056e75a Cleanup
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5890 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-11-27 04:36:33 +00:00
Bart Van Assche
63810a1abb scst.h: Fix definition of __aligned()
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5762 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-09-03 14:00:14 +00:00
Bart Van Assche
3d7ecc4fe3 scst.h: RHEL 5.10 build fix
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5760 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-09-03 13:52:16 +00:00
Bart Van Assche
2cd5fb04fd scst.h: RHEL 5.10 build fix
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5758 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-09-03 13:43:23 +00:00
Bart Van Assche
811ff0f5a9 scst: Refine r5751, the hex_to_bin() build fix for RHEL >= 6.1
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5753 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-09-03 10:50:52 +00:00
Bart Van Assche
ad45c75be5 scst.h: Make vzalloc() available on RHEL 6.0
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5752 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-09-03 10:47:16 +00:00
Bart Van Assche
a0cc1707a1 scst: Build fix for hex_to_bin() for RHEL 6.1 and later
Reported-by: Yan Burman <yanb@mellanox.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5751 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-09-03 10:23:51 +00:00
Vladislav Bolkhovitin
5f14ef7a10 scst/include/scst.h: Document on_abort_cmd() further
Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5736 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-08-27 03:00:44 +00:00
Vladislav Bolkhovitin
dcd1f6b3cd scst_vdisk: Make EUI-64 and NAA IDs configurable
Make the SCSI device identification page (83h) EUI-64 and NAA
IDs configurable. If neither the eui64_id nor the naa_id sysfs
attribute has been set, export the first eight bytes of the
t10_dev_id as an EUI-64 ID. If the NAA ID but not the EUI-64 ID
has been set, report the NAA ID only. If both IDs have been set,
report both.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5730 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-08-26 03:44:23 +00:00
Bart Van Assche
a2b88e7894 Fix a kernel 3.16 checkpatch complaint about trailing semicolons
Avoid that the checkpatch tool included in Linux kernel v3.16 reports the
following warning:

    macros should not use a trailing semicolon

This patch does not change any functionality.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5724 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-08-22 07:19:55 +00:00
Vladislav Bolkhovitin
4d937c42ee Update for kernels 3.16
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5717 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-08-19 21:52:31 +00:00
Vladislav Bolkhovitin
6ab72405fa Review of host_status handling (pass-through mode)
Inspired by Dave Butler <tears.the@gmail.com> and Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5703 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-07-23 02:49:50 +00:00
Vladislav Bolkhovitin
209a825360 scst: Make scst_cmd_threads.threads_list locking more fine-grained
Introduce a new synchronization object, namely scst_cmd_threads.thr_lock,
to protect scst_cmd_threads.threads_list.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5701 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-07-22 00:22:06 +00:00
Vladislav Bolkhovitin
5a4571354b scst: Introduce scst_set_thr_cpu_mask()
This patch does not change any functionality.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5685 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-07-19 04:11:39 +00:00
Vladislav Bolkhovitin
3eb2b2bb7e Make SCST interface compatibility more robust
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5668 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-07-10 01:00:29 +00:00
Bart Van Assche
e70268341b scst: Build fix for kernel versions <= 2.6.31
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5648 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-06-30 07:28:18 +00:00
Bart Van Assche
4b192f7fa7 scst: Build fix for Linux kernel versions 2.6.33 and 2.6.34
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5647 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-06-30 07:18:53 +00:00
Vladislav Bolkhovitin
1450d90eac scst_debug.h: Make EXTRACHECKS_*_ON() statements visible to Coverity
Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5625 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-06-25 21:38:19 +00:00