Bart Van Assche
255e3c3901
nightly build: Update kernel versions
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4916 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-07-22 18:29:21 +00:00
Bart Van Assche
339aa1b90d
ib_srpt/README: Update initiator-side performance notes section
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4915 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-07-11 11:41:06 +00:00
Vladislav Bolkhovitin
605c3c90e9
Simplify and optimize commands serialization/blocking
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4914 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-07-09 21:32:07 +00:00
Vladislav Bolkhovitin
48fe99f3c0
Logging cleanup
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4913 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-07-06 00:45:05 +00:00
Vladislav Bolkhovitin
0043f510cb
block shift cleanups and fixes
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4912 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-07-04 04:26:21 +00:00
Vladislav Bolkhovitin
6e31fd8306
Relax and cleanup HARDWARE ERROR sense usage
...
HARDWARE ERROR sense is very strong considered be "internal failure", so
might lead to serios initiator side issues up to disconnect from device. In
many cases WRITE or READ ERROR sense can be used instead. All remaining
usages must be logged.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4911 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-07-04 02:46:49 +00:00
Vladislav Bolkhovitin
2755c02421
scst: Introduce for_each_sg() in scst_adjust_sg()
...
Make scst_adjust_sg() slightly easier to read by using for_each_sg()
to iterate over the elements of the scatter/gather-list.
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4910 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-07-03 04:37:53 +00:00
Vladislav Bolkhovitin
cf43cffd81
scst_priv.h: Avoid that smatch complains about unreachable code
...
Move three lines of code such that these lines are only visible to
the compiler when these lines are relevant.
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4909 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-07-02 06:13:23 +00:00
Vladislav Bolkhovitin
bc2b2b1a84
Small logging cleanup
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4908 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-07-02 06:09:57 +00:00
Bart Van Assche
21c8cfa9f1
scstadmin: Escape special characters in initiator names in the LUN masking section
...
Write out e.g. "INITIATOR iqn.1994-05.com.redhat:29a5cc399d\#192.168.11.1"
instead of "INITIATOR iqn.1994-05.com.redhat:29a5cc399d#192.168.11.1" when
generating a config file such that the hash sign is read in properly when
rereading the SCST config file.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4907 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-07-01 11:57:19 +00:00
Bart Van Assche
8cf1f2afc6
nightly build: Update kernel versions
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4906 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-06-25 18:01:50 +00:00
Bart Van Assche
9998e002d8
nightly build: Update kernel versions
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4905 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-06-14 18:03:49 +00:00
Vladislav Bolkhovitin
8b8955d516
Minor logging improvements
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4904 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-06-13 02:52:32 +00:00
Vladislav Bolkhovitin
606af43444
scst_vdisk: Avoid triggering BUG() for large LBA's
...
The LBA field in READ(16) and READ(32) commands is 64 bits wide.
Hence it is possible for an initiator not only to specify an offset
that exceeds 2**63. Report an error to the initiator for such large
offsets instead of triggering a BUG(). This patch fixes the following bug:
BUG at scst/src/dev_handlers/scst_vdisk.c:1273 ((loff < 0) || __builtin_expect(!!(data_len < 0), 0))
------------[ cut here ]------------
kernel BUG at /home/bart/software/scst.git/scst/src/dev_handlers/scst_vdisk.c:1273!
invalid opcode: 0000 [#1 ] SMP
CPU: 0 PID: 2852 Comm: iscsird3 Tainted: G O 3.10.0-rc1-debug+ #1
Hardware name: Bochs Bochs, BIOS Bochs 01/01/2007
RIP: 0010:[<ffffffffa0309e76>] [<ffffffffa0309e76>] vdisk_parse_offset+0x3b6/0x490 [scst_vdisk]
Call Trace:
[<ffffffffa030dec9>] fileio_alloc_and_parse+0x69/0x130 [scst_vdisk]
[<ffffffffa030e08b>] vdisk_parse+0x3b/0xc0 [scst_vdisk]
[<ffffffffa0264a2e>] scst_parse_cmd+0x8e/0xd00 [scst]
[<ffffffffa029b953>] ? spin_unlock_irqrestore.constprop.0+0x13/0x20 [scst]
[<ffffffffa029bad5>] ? debug_print_with_prefix+0x165/0x1f0 [scst]
[<ffffffffa026c2a5>] scst_process_active_cmd+0x425/0x760 [scst]
[<ffffffffa026dc7a>] scst_cmd_init_done+0x2ea/0x5c0 [scst]
[<ffffffffa032aaa2>] scst_cmd_init_stage1_done.constprop.37+0x12/0x20 [iscsi_scst]
[<ffffffffa03317a4>] scsi_cmnd_start+0x1f4/0x550 [iscsi_scst]
[<ffffffffa0332298>] cmnd_rx_start+0x148/0x1a0 [iscsi_scst]
[<ffffffffa03353a8>] process_read_io+0x3c8/0x7f0 [iscsi_scst]
[<ffffffff81049929>] ? local_bh_enable_ip+0x89/0xf0
[<ffffffffa0335894>] scst_do_job_rd+0xc4/0x220 [iscsi_scst]
[<ffffffffa0335e65>] istrd+0x165/0x2e0 [iscsi_scst]
[<ffffffff8106da50>] ? wake_up_bit+0x40/0x40
[<ffffffffa0335d00>] ? iscsi_task_mgmt_affected_cmds_done+0x240/0x240 [iscsi_scst]
[<ffffffff8106d34b>] kthread+0xdb/0xe0
[<ffffffff8106d270>] ? kthread_create_on_node+0x120/0x120
[<ffffffff815357ac>] ret_from_fork+0x7c/0xb0
[<ffffffff8106d270>] ? kthread_create_on_node+0x120/0x120
---[ end trace c21ad13002ef1548 ]---
---
scst/src/scst_lib.c | 28 ++++++++++++++++++++++++++--
1 file changed, 26 insertions(+), 2 deletions(-)
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4903 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-06-12 04:33:45 +00:00
Bart Van Assche
489b7eea88
nightly build: Update kernel versions
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4902 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-06-08 10:20:20 +00:00
Vladislav Bolkhovitin
497d588551
READ CAPACITY(10): LBA is 32 bits, not 64
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4901 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-06-08 03:55:31 +00:00
Vladislav Bolkhovitin
430a71a87d
Post sf.net upgrade web updates
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4900 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-06-08 02:56:13 +00:00
Vladislav Bolkhovitin
12b205e5be
Add incorrectly removed in the previous patch code
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4898 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-06-07 06:03:01 +00:00
Vladislav Bolkhovitin
49619dfd77
scst: Fix scst_suspend_activity() timeout handling
...
Make sure that suspend_count is decremented if scst_suspend_activity()
times out. Also, if a timeout is encountered, clear SCST_FLAG_SUSPENDING
before waking up the command threads instead of after waking up these
threads.
Reported-by: Sergey Tashkinov <sergeyt1@open-e.com >
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
with some fixes and improvements
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4897 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-06-07 05:58:52 +00:00
Vladislav Bolkhovitin
b80431f327
scst_lib: Rework the CDB parsing routines
...
Factor out common code into a new function.
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
with some cleanups and improvements
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4896 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-06-07 04:43:51 +00:00
Bart Van Assche
c849ff05c6
nightly build: Translate svn+ssh URLs into svn URLs
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4895 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-06-06 08:53:17 +00:00
Bart Van Assche
6f19406b3c
nightly build: Make sparse check rcu-annotated pointers
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4894 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-06-05 18:28:48 +00:00
Bart Van Assche
067a3231f9
fcst: Fix a checkpatch complaint about whitespace
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4893 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-06-04 11:46:22 +00:00
Bart Van Assche
6a0c785160
nightly/bin/nightly: Add support for running the nightly build against another branch than the trunk
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4890 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-06-04 11:41:36 +00:00
Bart Van Assche
fda521f287
fcst: Follow-up for r4873
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4889 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-06-04 09:41:58 +00:00
Vladislav Bolkhovitin
a8dc08e462
scst_pres: Document the category of various persistent reservation constants
...
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4888 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-06-04 04:57:33 +00:00
Vladislav Bolkhovitin
52fe14394e
scst_pres: Fix PR key byte order in diagnostic messages
...
An example of the dump_prs output with this patch applied:
# sg_persist -n -o --register --param-sark 0x0123456789abcdef /dev/sda
# dmesg -c >/dev/null; echo 1 >/sys/kernel/scst_tgt/devices/disk01/dump_prs; dmesg -c
[2802]: scst: scst_pr_dump_prs:220:Persistent reservations for device disk01:
[2802]: scst: scst_pr_dump_prs:234: [0] registrant 5f:ee:de:40:0f:ad:e0:50/8, key 0123456789abcdef (reg ffff880036d25d00, tgt_dev ffff880014a18000)
[2802]: scst: scst_pr_dump_prs:253:Not reserved
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4887 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-06-04 04:56:26 +00:00
Bart Van Assche
095813cc56
fcst: RHEL 6 build fix
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4886 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-06-03 15:41:09 +00:00
Vladislav Bolkhovitin
29ff2f8c23
Cleanup: spin_is_locked() makes no sense on UP systems
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4885 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-05-28 03:59:57 +00:00
Bart Van Assche
60b478742f
nightly build: Update kernel versions
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4877 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-05-25 08:55:10 +00:00
Vladislav Bolkhovitin
e77d31da4b
Minor logging cleanup
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4876 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-05-24 01:17:39 +00:00
Vladislav Bolkhovitin
abb54b51d9
Small followup for previous commit
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4875 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-05-22 04:37:07 +00:00
Vladislav Bolkhovitin
84f6cb5dae
scst_vdisk: Add support for nullio "dummy" LUNs
...
While the SCSI specifications require presence of LUN 0 it is not always
desirable to associate storage with LUN 0. Hence allow LUN 0 (or any
other LUN) to be configured such that it does not appear at the
initiator side. This is realized by adding a "dummy" attribute in to
NULLIO vdisk devices. If that attribute is set, the PERIPHERAL QUALIFIER
field in the INQUIRY response is set to 1 and the PERIPHERAL DEVICE TYPE
is set to 0x1f. Add an example in the scst.conf(5) man page that shows
how to use the new attribute.
Signed-off-by: Bart Van Assche <bvanassche@acm.org > with some fixes and simplifications
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4874 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-05-22 03:48:26 +00:00
Bart Van Assche
b0133418e3
fcst: Fix a bug in a pre-2.6.36 error path. This was spotted by both sparse and smatch.
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4873 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-05-21 18:18:37 +00:00
Bart Van Assche
88762d3574
fcst: Fix WRITE SAME handling
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4872 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-05-20 18:35:24 +00:00
Bart Van Assche
351be8d158
nightly build: Update kernel versions
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4871 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-05-20 18:34:09 +00:00
Bart Van Assche
33c0e52b93
fcst: Fix two sparse warnings
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4870 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-05-20 06:39:24 +00:00
Bart Van Assche
8c3fc40784
fcst: Fix build on pre-2.6.36 kernels
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4869 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-05-20 06:37:55 +00:00
Bart Van Assche
8614645098
nighty build: Add kernel 3.9
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4868 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-05-20 06:22:01 +00:00
Bart Van Assche
2c01ef207f
fcst: Avoid invoking ft_cmd_done(NULL)
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4867 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-05-19 18:10:20 +00:00
Bart Van Assche
aec51e803c
fcst: Kernel 3.9 build fix
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4866 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-05-19 16:58:52 +00:00
Bart Van Assche
1ed1f3fda7
fcst: Eliminate ft_sess_lookup_delete()
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4865 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-05-19 16:57:57 +00:00
Bart Van Assche
c4b720647c
fcst: Move the ft_prov data structure
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4864 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-05-19 16:56:42 +00:00
Bart Van Assche
06141fe25d
fcst: Minimize comment diffs with upstream
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4863 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-05-19 16:54:34 +00:00
Bart Van Assche
f5fd68200e
fcst: Introduce function ft_sess_hash()
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4862 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-05-19 16:53:24 +00:00
Bart Van Assche
55084ba194
fcst: Minimize diffs of ft_send_read_data() and ft_recv_write_data() with upstream
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4861 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-05-19 16:51:52 +00:00
Bart Van Assche
58aceecbff
fcst: Move ft_recv_write_data()
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4860 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-05-19 16:50:02 +00:00
Bart Van Assche
a4851afe2d
fcst: Change exch_done() into frame_send() to minimize diffs with upstream
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4859 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-05-19 16:47:50 +00:00
Bart Van Assche
14a9a7a39d
fcst: Move an fr_seq() call to minimize diffs with upstream
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4858 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-05-19 16:27:18 +00:00
Bart Van Assche
7d9b329342
fcst: Move a declaration
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4857 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-05-19 15:23:18 +00:00