8786 Commits

Author SHA1 Message Date
Vladislav Bolkhovitin
f9d666ace2 Remove tgt->finished_cmds logic
1. It doesn't work well with NPIV-like targets
2. Without it struct scst_tgt is read-mostly



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4811 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-25 23:40:44 +00:00
Vladislav Bolkhovitin
82f7d66e5e Cleanup: remove unused variable
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4810 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-25 23:03:05 +00:00
Vladislav Bolkhovitin
2cadcc2c64 Cache alignment review
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4809 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-23 01:38:31 +00:00
Bart Van Assche
ab0b9743b4 scstadmin: Do not save duplicate target information in the ALUA sections
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4808 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-20 14:47:17 +00:00
Bart Van Assche
22c950246a scripts/generate-kernel-patch: Use the proper version of the put_page_callback patch for kernel 3.7.10
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4807 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-20 07:01:59 +00:00
Vladislav Bolkhovitin
65ada2c9f0 Fix crash if on 24xx+ handle can't be translated to cmd
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4806 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-19 23:49:56 +00:00
Vladislav Bolkhovitin
29993da5b0 REQ_META build fix for kernels 2.6.36..3.0
The SCST trunk currently doesn't build against any of the kernels in the range
2.6.36..3.0. The patch below fixes that.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4805 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-19 00:43:51 +00:00
Vladislav Bolkhovitin
8bea0e5b56 Cleanup
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4804 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-19 00:42:53 +00:00
Bart Van Assche
154cc8aa87 scripts/specialize-patch: Expand RHEL_RELEASE_VERSION()
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4803 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-16 11:37:39 +00:00
Bart Van Assche
f331a6e234 scripts/specialize-patch: Introduce [[:blank:]]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4802 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-16 11:35:32 +00:00
Bart Van Assche
199b9fad17 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4801 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-16 10:28:50 +00:00
Vladislav Bolkhovitin
82d055041c Improve automatic queue depth adjustment in scst_local for older kernels
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4800 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-16 02:02:55 +00:00
Vladislav Bolkhovitin
a1fde6a871 Boost priority of HEAD OF QUEUE requests
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4799 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-16 01:18:32 +00:00
Vladislav Bolkhovitin
3a84cb7baf Automatic queue depth adjustment in scst_local
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4798 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-16 01:10:43 +00:00
Vladislav Bolkhovitin
7ce3f66c1a scst_sysfs: Fix memory leaks in ALUA error paths
Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4797 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-15 01:24:18 +00:00
Vladislav Bolkhovitin
61192be2eb Cleanup: there's no point to count on_free latency, because those places are behind scst_update_lat_stats()
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4793 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-14 01:54:46 +00:00
Vladislav Bolkhovitin
b5eb13b50e Cleanup
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4792 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-13 02:44:53 +00:00
Vladislav Bolkhovitin
369863f015 Allow install SCST in any location
Currently the install location of SCST is pretty much hard coded into 
the Makefiles to be /usr/local.

I am custom building a system for ZFS & SCST and I want to install in 
/usr instead of /usr/local.

Currently I am doing a “find . -name Makefile -exec sed -i 's:/usr/local:/usr:g'
{} \;” to accommodate this.

This patch fixes it.

From Sietse van Zanen <sietse@wizdom.nu>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4791 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-08 21:25:45 +00:00
Vladislav Bolkhovitin
9ea9eec4ef Cleanups and minor fixes
Suggested by Manfred_Knick <Manfred.Knick@T-Online.de>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4790 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-08 21:00:09 +00:00
Vladislav Bolkhovitin
eb4d0f3cb9 Fix compilation breakage on older kernels
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4789 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-07 20:12:25 +00:00
Vladislav Bolkhovitin
41ec60e529 Cleanup
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4788 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-05 21:36:25 +00:00
Vladislav Bolkhovitin
c7f6a46905 Better to have those conditional defines in the head of the file, because #include's depend on them
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4787 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-05 21:25:54 +00:00
Vladislav Bolkhovitin
60cd734aef More micro-optimizations
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4786 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-05 01:23:48 +00:00
Vladislav Bolkhovitin
b9c0b9d92d Another micro-optimization: cache align all fast path structures
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4785 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-04 23:51:16 +00:00
Bart Van Assche
74eba54940 ib_srpt: Micro-optimize SCSI command processing
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4784 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-04 13:40:56 +00:00
Bart Van Assche
20b20c2769 ib_srpt: Minor source code cleanup
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4783 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-04 13:40:15 +00:00
Bart Van Assche
80ad5be94d nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4782 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-02 10:50:01 +00:00
Vladislav Bolkhovitin
d5d2065eca Post r4779 safety measure to ensure that SCST core and target drivers see the same size of SCST structures.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4781 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-02 04:36:53 +00:00
Vladislav Bolkhovitin
7e844f7dc0 Fix copy-paste error reported by julian freed <j321112@gmail.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4780 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-02 04:22:00 +00:00
Vladislav Bolkhovitin
ae8e9ef049 Micro-optimization: allow target drivers to prealloc scst_cmd + update qla2x00t to use this facility
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4779 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-02 00:52:26 +00:00
Vladislav Bolkhovitin
a0ee2a2396 qla2x00t: Clean up DMA address computation code
The expression "sg_dma_address(prm->sg)" occurs several times in several
pieces of code that compute a DMA address. Make these pieces of code
somewhat easier to read by storing the DMA address in a temporary variable
called "dma_addr".

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4778 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-02-28 20:29:11 +00:00
Vladislav Bolkhovitin
f86ee4d788 Minimize logging
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4777 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-02-28 20:20:56 +00:00
Bart Van Assche
1864d41919 scst_sysfs: Change one space into a tab because checkpatch complained about it
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4775 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-02-28 07:16:51 +00:00
Vladislav Bolkhovitin
0cc1cd07b9 Microoptimizations
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4774 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-02-27 21:53:46 +00:00
Vladislav Bolkhovitin
f5ed343084 trace_level help updated
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4773 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-02-27 02:56:32 +00:00
Vladislav Bolkhovitin
2c13f6b7e0 Logging cleanup: hide most verbose logs by default
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4772 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-02-27 02:50:14 +00:00
Bart Van Assche
58a9802366 nightly build: Add kernel 3.8
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4771 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-02-24 07:21:22 +00:00
Bart Van Assche
bf4e52170f scripts/run-regression-tests: Summarize 3.8+ CamelCase warnings
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4770 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-02-23 13:56:11 +00:00
Bart Van Assche
52f0d63ee6 nightly build: Add kernel 3.8 support files
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4769 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-02-23 13:47:51 +00:00
Vladislav Bolkhovitin
79bf4e77c6 Update for 3.8 kernels
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4768 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-02-23 00:44:56 +00:00
Vladislav Bolkhovitin
10ca1d2f20 Copyrights updated
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4767 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-02-20 02:05:29 +00:00
Vladislav Bolkhovitin
7e691681eb More Emulex resurrect + some iSCSI fixes
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4766 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-02-20 01:47:32 +00:00
Vladislav Bolkhovitin
d3813d3e1b Cleanups
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4765 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-02-20 01:20:56 +00:00
Vladislav Bolkhovitin
0252d5f9c9 Limit FirstBurstLength to improve TASK QUEUE FULL handling
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4764 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-02-19 01:17:33 +00:00
Vladislav Bolkhovitin
6eadaff9cb Cleanup
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4763 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-02-18 23:50:29 +00:00
Vladislav Bolkhovitin
5a6024c859 Follow-up for the previous commit
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4762 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-02-16 04:09:11 +00:00
Vladislav Bolkhovitin
8d32ad63a1 Performance micro-optimization: use sg_next_inline() instead of sg_next()
Now we have sg_next_inline(), so let's use it everywhere.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4761 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-02-16 04:03:58 +00:00
Vladislav Bolkhovitin
a98e10a13f Make qla2x00t support sg-chaining
Suggested by Nikolai Kopanygin <nikolai.kopanygin@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4760 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-02-16 03:55:11 +00:00
Vladislav Bolkhovitin
cd32115d6c Patch from Lukasz Jurewicz <lukasz.jurewicz@gmail.com> updating URL to QLogic firmware
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4759 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-02-16 03:23:32 +00:00
Vladislav Bolkhovitin
a327b6e700 scst: Avoid that INQUIRY of a non-existing LUN can trigger a NULL pointer dereference
This patch fixes the following kernel oops:

[7781]: scst: scst_translate_lun:3935:tgt_dev for LUN 1 not found, command to unexisting LU (initiator local3, target local3)?
BUG: unable to handle kernel NULL pointer dereference at 0000000000000500
IP: [<ffffffffa027662e>] scst_set_resp_data_len+0x17e/0x1c0 [scst]
PGD 2de7a067 PUD 2dd4d067 PMD 0
Oops: 0000 [#1] SMP
Modules linked in: scst_local(O) iscsi_scst(O) scst_vdisk(O) scst(O) brd netconsole configfs ib_iser rdma_cm ib_cm iw_cm ib_sa ib_mad ib_core ib_addr iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi joydev aesni_intel ablk_helper hid_generic cryptd lrw aes_x86_64 xts usbhid hid gf128mul intel_agp i2c_piix4 intel_gtt agpgart processor psmouse microcode button binfmt_misc lp parport ext4 mbcache jbd2 floppy ata_piix zlib_deflate libcrc32c [last unloaded: scst]
CPU 3
Pid: 7781, comm: kworker/u:5 Tainted: G           O 3.8.0-rc7-debug+ #1 Bochs Bochs
RIP: 0010:[<ffffffffa027662e>]  [<ffffffffa027662e>] scst_set_resp_data_len+0x17e/0x1c0 [scst]
Process kworker/u:5 (pid: 7781, threadinfo ffff88002dc18000, task ffff88003d306450)
Call Trace:
 [<ffffffffa027aa10>] scst_set_lun_not_supported_inquiry+0x140/0x400 [scst]
 [<ffffffffa027adbf>] scst_set_cmd_error+0xef/0x210 [scst]
 [<ffffffffa026aaa1>] __scst_init_cmd+0x1c1/0x250 [scst]
 [<ffffffffa026aefb>] scst_init_cmd+0x6b/0x320 [scst]
 [<ffffffffa026e914>] scst_cmd_init_done+0x124/0x5b0 [scst]
 [<ffffffffa0340a9e>] scst_local_queuecommand+0x1ae/0x3c0 [scst_local]
 [<ffffffff81323cd0>] scsi_dispatch_cmd+0x150/0x4b0
 [<ffffffff8132b091>] scsi_request_fn+0x361/0x530
 [<ffffffff812157b7>] __blk_run_queue+0x37/0x50
 [<ffffffff81221e01>] blk_execute_rq_nowait+0x81/0x100
 [<ffffffff81221fd2>] blk_execute_rq+0x152/0x200
 [<ffffffff8132a75e>] scsi_execute+0xee/0x180
 [<ffffffff8132b92d>] scsi_execute_req+0xbd/0x130
 [<ffffffff8132d647>] scsi_probe_and_add_lun+0x257/0xe10
 [<ffffffff8132ea73>] __scsi_scan_target+0x2a3/0x790
 [<ffffffff8132f0ee>] scsi_scan_target+0xfe/0x110
 [<ffffffffa033f81c>] scst_process_aens+0xcc/0x210 [scst_local]
 [<ffffffffa033fb39>] scst_aen_work_fn+0x79/0x140 [scst_local]
 [<ffffffff810630c8>] process_one_work+0x1a8/0x6e0
 [<ffffffff81063a3f>] worker_thread+0x15f/0x3e0
 [<ffffffff8106a17d>] kthread+0xed/0x100
 [<ffffffff815252ac>] ret_from_fork+0x7c/0xb0
---[ end trace b2eb71a8ecb7acf3 ]---

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4758 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-02-14 02:42:35 +00:00