Commit Graph

4219 Commits

Author SHA1 Message Date
Bart Van Assche
dc869faeca ib_srpt: Make non-OFED build work again
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5595 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-06-12 13:38:38 +00:00
Bart Van Assche
c7f9bcd1c0 ib_srpt: Set MOFED include path correctly if MOFED has been installed with --add-kernel-support
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5594 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-06-12 11:33:00 +00:00
Bart Van Assche
2faf5417be nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5593 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-06-12 09:15:50 +00:00
Bart Van Assche
7294df5dc4 scst.h: Move definition of swap()
Make sure that the definition of swap() is guarded by
"#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29)" only instead
of "#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 28)" and
"#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29)".


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5592 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-06-12 08:38:45 +00:00
Vladislav Bolkhovitin
905ffef345 scst: Introduce scst_lookup_tgt_dev()
This patch does not change any functionality.

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

with some improvements



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5590 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-06-11 22:07:00 +00:00
Vladislav Bolkhovitin
763de61f23 scst: Clean up __scst_resume_activity()
Move all management commands from scst_delayed_mgmt_cmd_list to the
active command list during resume instead of only the first one.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5589 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-06-11 21:42:08 +00:00
Vladislav Bolkhovitin
a2feffdcfe scst_local: Support LUN numbers >= 16384
Add support for 32-bit LUN numbers. As soon as the patches that add
64-bit LUN support are upstream this patch will also make 64-bit
LUN support available in scst_local.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5588 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-06-11 21:00:16 +00:00
Vladislav Bolkhovitin
3f2485ede0 scst: Add support for 64-bit LUNs
The datatype of scsi_device.lun will be changed from u32 into u64
in the near future. Update SCST accordingly. These changes have
been implemented such that these are compatible with 32-bit and
64-bit LUNs.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5587 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-06-11 20:57:03 +00:00
Vladislav Bolkhovitin
325efae944 scst_lib: Introduce additional temporary variables
Make the code slightly easier to read by introducing temporary
variables for the expressions 'tgt_dev->sess' and 'sess->tgt->tgtt'.
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@5586 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-06-11 19:39:51 +00:00
Vladislav Bolkhovitin
1b95b72af6 scst: Remove unused variables
Avoid that building scst with W=1 triggers compiler warnings about
variables that are set but not used. See also the documentation of
the gcc compiler flag -Wunused-but-set-variable.

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@5585 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-06-11 19:38:10 +00:00
Vladislav Bolkhovitin
c237fa24d9 scst: RHEL 5 build fix
Avoid that building the scst kernel module fails on RHEL 5 due to
a missing kvasprintf() implementation.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5584 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-06-11 19:33:18 +00:00
Bart Van Assche
27477a769b nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5583 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-06-11 15:41:01 +00:00
Bart Van Assche
08c5b47ce0 regression tests: Sort hash keys before comparing
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5582 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-06-11 15:27:48 +00:00
Bart Van Assche
730f2ee268 regression tests: Sync with a recent sysfs change
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5581 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-06-11 15:27:06 +00:00
Bart Van Assche
60a8326a28 ib_srpt: RHEL 5 build fix
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5579 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-06-11 10:02:15 +00:00
Bart Van Assche
a941f47817 ib_srpt: Make IB_EVENT_GID_CHANGE test independent of the OFED detection code
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5578 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-06-10 14:49:59 +00:00
Bart Van Assche
007e3dfbbf ib_srpt: Make the test for IB_EVENT_GID_CHANGE support more robust
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5577 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-06-10 14:16:14 +00:00
Bart Van Assche
003b0f46ac nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5575 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-06-07 10:46:49 +00:00
Vladislav Bolkhovitin
b27e4d04a3 Use limits.discard_zeroes_data to set LBPRZ
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5574 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-06-06 21:59:24 +00:00
Vladislav Bolkhovitin
97167af582 scst: Make lockdep_assert_held() easier to use
The lockdep_assert_held() macro is a convenient debugging tool.
However, it is inconvenient to surround each invocation of that
macro by an #ifdef/#endif pair. Hence make it easier to use this
macro with older kernel versions.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5573 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-06-06 03:26:55 +00:00
Vladislav Bolkhovitin
6dab45204c scst: Leave out FSF mail address
This avoids that the following checkpatch complaint is triggered:

Do not include the paragraph about writing to the Free Software Foundation's
mailing address from the sample GPL notice. The FSF has changed addresses in
the past, and may do so again. Linux already includes a copy of the GPL.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5572 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-06-06 03:24:03 +00:00
Vladislav Bolkhovitin
27fbb23518 nullio_exec_read(): Fix kunmap() argument
The argument of kunmap() is of type struct page *. Detected by smatch.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5571 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-06-06 03:22:14 +00:00
Vladislav Bolkhovitin
44d8f75edb scst_lib: Fix a compiler warning triggered by the WRITE SAME implementation
Avoid for release builds that the compiler reports that the variable
'ws_sg_cnt' is not used.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5570 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-06-06 03:20:26 +00:00
Bart Van Assche
375443a442 scst_vdisk: Fix a kernel version < 2.6.38 compiler warning
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5569 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-06-05 06:46:57 +00:00
Bart Van Assche
f2ba108911 scst_vdisk: Build fix for kernel versions <= 2.6.32
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5568 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-06-05 06:34:19 +00:00
Bart Van Assche
a7648c418e ib_srpt: Avoid triggering a SCSI command timeout after login
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5567 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-06-04 15:17:59 +00:00
Bart Van Assche
fbbb9f05a1 ib_srpt: Fix an error message
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5566 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-06-04 15:14:22 +00:00
Vladislav Bolkhovitin
4840ad3f1d Enforce limit on max unmap LBAs
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5563 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-06-04 02:16:51 +00:00
Vladislav Bolkhovitin
4d735aaf77 Decrease max WRITE SAME length for better latencies
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5562 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-06-04 01:54:21 +00:00
Bart Van Assche
0815ef529b nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5561 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-06-03 06:04:47 +00:00
Bart Van Assche
4792feae74 Makefile: Only report which RPMs have been built if "make rpm" is run as a non-privileged user
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5560 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-06-02 15:31:50 +00:00
Vladislav Bolkhovitin
91b077aa8c Logging fixes
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5558 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-05-30 03:00:07 +00:00
Vladislav Bolkhovitin
6ef356ce70 Small code reorganization.
No functionality changed



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5557 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-05-30 00:42:34 +00:00
Bart Van Assche
f5ab9ef30a qla2x00t: Documentation / source code comment / log messages spelling fix
Change a few occurrences of "conformation" into "confirmation". See also the
QLogic 2500 Series Firmware Interface Specification.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5555 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-05-27 11:59:11 +00:00
Vladislav Bolkhovitin
31f663c101 Optimize read_zero functionality
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5547 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-05-24 03:10:34 +00:00
Bart Van Assche
2edd052785 scripts/rebuild-rhel-kernel-rpm: Add RHEL 7 RC support
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5545 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-05-23 08:36:36 +00:00
Bart Van Assche
0880cbf0cf RHEL 7 build fixes
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5543 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-05-23 07:33:53 +00:00
Vladislav Bolkhovitin
a3c9a05113 vdisk_nullio: Add "read_zero" attribute
Add an attribute called "read_zero" to vdisk_nullio devices that
controls whether or not READs from a vdisk_nullio device return
zeroed data buffers.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5539 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-05-23 02:20:35 +00:00
Bart Van Assche
a3a3e76ce3 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5538 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-05-22 07:16:04 +00:00
Vladislav Bolkhovitin
64aa41b738 Web updates
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5537 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-05-22 03:18:27 +00:00
Vladislav Bolkhovitin
7d75a40089 Version changed to 3.1.0-pre1
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5536 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-05-22 03:06:46 +00:00
Vladislav Bolkhovitin
3a4a5eceb2 Improve handling of aborted internal commands
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5533 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-05-22 02:56:20 +00:00
Vladislav Bolkhovitin
e49da284e9 Prevent potential deadlock between scst_del_threads() and commands taking scst_mutex
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5532 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-05-20 23:39:57 +00:00
Bart Van Assche
e6fda471d9 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5527 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-05-18 16:27:01 +00:00
Bart Van Assche
d615f4ade7 scst_vdisk: Handle attach failures properly (follow-up for r5525)
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5526 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-05-18 11:26:42 +00:00
Vladislav Bolkhovitin
42a37efa55 scst_vdisk: Introduce vdisk_reexamine() and vdisk_close_fd()
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@5525 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-05-17 01:16:33 +00:00
Vladislav Bolkhovitin
b39b5d8502 scst_main: Fix race between scst_resume_activity() and scst_init_thread()
After SCST_FLAG_SUSPENDED has been cleared it is essential that
scst_do_job_init() reexamines scst_init_cmd_list to avoid that
commands get stuck in the command init list. This patch fixes the
following race condition that can occur if SCST_FLAG_SUSPENDED
has been set and if scst_init_cmd_list is not empty:
* scst_do_job_init() returns to scst_init_thread() and leaves the
  commands that were on the init list on that list.
* scst_init_thread() invokes test_init_cmd_list().
* test_init_cmd_list() returns false because SCST_FLAG_SUSPENDED
  has been set.
* scst_resume_activity() clears SCST_FLAG_SUSPENDED and invokes
  wake_up_all(&scst_init_cmd_list_waitQ). However, since
  scst_init_thread() has not yet added the init thread back to
  scst_init_cmd_list_waitQ this wake_up_all() call doesn't do
  anything.
* scst_init_thread() adds the init thread to scst_init_cmd_list_waitQ
  and unlocks scst_init_lock.

Additionally, remove an unneeded smp_mb__after_clear_bit() call.
wake_up_all() guarantees that if it wakes up a thread that that
thread sees all store operations that were performed by the thread
that invoked wake_up_all() and that preceeded the wake_up_all()
invocation.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5524 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-05-17 01:04:08 +00:00
Vladislav Bolkhovitin
0bf5a3ca92 scst_lib: Clarify scst_init_cmd() documentation
The possible return values of scst_init_cmd() are -1, 0 and 1. Mention
this in the comment header above that function.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5523 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-05-17 00:18:42 +00:00
Vladislav Bolkhovitin
3613f37413 Cleanup
Those functions might be called on some corner cases without pr_mutex held



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5522 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-05-16 02:37:29 +00:00
Vladislav Bolkhovitin
36f98ec6df Cleanups
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5521 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-05-16 02:05:38 +00:00