Commit Graph

3662 Commits

Author SHA1 Message Date
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
Bart Van Assche
029dc3a2e4 fcst: Declare a variable const
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4856 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-05-19 15:15:59 +00:00
Bart Van Assche
11fdb1bf29 nightly build: Add kernel 3.9 build infrastructure
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4855 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-05-18 16:04:24 +00:00
Bart Van Assche
88ae3b7c78 iSCSI-SCST: Fix a sparse warning introduced via r4852
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4854 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-05-18 15:48:17 +00:00
Vladislav Bolkhovitin
9b674796d6 Update to kernel 3.9
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4853 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-05-18 03:41:04 +00:00
Vladislav Bolkhovitin
2093dd7561 Make it possible to forcibly close SRP and FC sessions via sysfs
That patch contains the following changes:
* Move the code for creating a "close_sess" sysfs attribute from iscsi-scst to
  the SCST core such that it becomes available for other target drivers. This
  does not change the functionality of iscsi-scst.
* Add code in ib_srpt and qla2x00t to allow a session to be forcibly closed from
  user space.

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




git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4852 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-05-18 00:52:46 +00:00
Vladislav Bolkhovitin
90222db2ac ALUA README fix
Bring the SCST README again in sync with the implementation

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4851 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-05-15 05:45:17 +00:00
Vladislav Bolkhovitin
59c3619e85 ALUA checkpatch fix
Avoid that checkpatch complains about strict_strtoul().

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4850 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-05-15 05:43:24 +00:00
Bart Van Assche
aa837abf0f nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4849 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-05-13 06:46:31 +00:00
Vladislav Bolkhovitin
12abbb8e40 Add ALUA command filtering
From Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4848 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-04-30 04:27:53 +00:00
Bart Van Assche
d9591083cb nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4847 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-04-29 19:35:57 +00:00
Bart Van Assche
63bbba8b50 ib_srpt: Source code cleanup
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4846 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-04-28 19:48:50 +00:00
Bart Van Assche
c927e1dd73 ib_srpt: Fix another bug that was introduced in r4784
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4845 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-04-28 19:48:06 +00:00
Bart Van Assche
1a4aa10db8 ib_srpt: Fix a bug that was introduced in r4784
Reported by: Matteo Tescione <matteo@rmnet.it>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4844 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-04-27 19:05:22 +00:00
Vladislav Bolkhovitin
4ce549b875 qla2x00t: Avoid dereferencing a NULL pointer
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4843 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-04-27 05:11:17 +00:00
Bart Van Assche
28a66d7a0d scst/ToDo: "rotational" has already been implemented (r3830), so remove it from the to-do list
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4842 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-04-25 13:13:53 +00:00
Vladislav Bolkhovitin
40e8a76637 Add possibility to specify local compilation flags
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4841 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-04-23 03:21:39 +00:00
Bart Van Assche
ed288ba7ea nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4839 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-04-13 06:55:58 +00:00
Vladislav Bolkhovitin
08c2ffa9ee Small logging improvement
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4838 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-04-12 04:45:21 +00:00