Commit Graph

3652 Commits

Author SHA1 Message Date
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
Vladislav Bolkhovitin
17fe37ecd1 scst: Fix scst_set_lun_not_supported_inquiry()
Avoid that the call stack below is triggered when an INQUIRY is sent
to an scst_local LUN that does not exist.

[2990]: scst: scst_set_resp_data_len:2870:***ERROR***: Too big response data len 36 (max 0), limiting it to the max (dev (no LUN))
Pid: 2990, comm: kworker/u:3 Tainted: G           O 3.9.0-rc4-debug+ #1
Call Trace:
 [<ffffffffa027cac1>] scst_set_resp_data_len+0x1b1/0x1d0 [scst]
 [<ffffffffa027ef20>] scst_set_lun_not_supported_inquiry+0x140/0x400 [scst]
 [<ffffffff81080f05>] ? sched_clock_local+0x25/0x90
 [<ffffffffa027f2cf>] scst_set_cmd_error+0xef/0x210 [scst]
 [<ffffffffa02650f5>] ? scst_translate_lun+0x125/0x320 [scst]
 [<ffffffffa026fd10>] __scst_init_cmd+0x1f0/0x270 [scst]
 [<ffffffffa027015b>] scst_init_cmd+0x6b/0x310 [scst]
 [<ffffffffa0273b94>] scst_cmd_init_done+0x124/0x5b0 [scst]
 [<ffffffffa026dcb8>] ? scst_rx_cmd+0xb8/0x220 [scst]
 [<ffffffff81081098>] ? sched_clock_cpu+0xa8/0x110
 [<ffffffffa02f3b5e>] scst_local_queuecommand+0x1ae/0x3c0 [scst_local]
 [<ffffffff8133870f>] ? scsi_request_fn+0x34f/0x530
 [<ffffffff81531de0>] ? _raw_spin_unlock_irq+0x30/0x50
 [<ffffffff81331320>] scsi_dispatch_cmd+0x150/0x4b0
 [<ffffffff81338721>] scsi_request_fn+0x361/0x530
 [<ffffffff8121be37>] __blk_run_queue+0x37/0x50
 [<ffffffff812294b1>] blk_execute_rq_nowait+0x81/0x100
 [<ffffffff8106cc46>] ? __init_waitqueue_head+0x46/0x60
 [<ffffffff81229682>] blk_execute_rq+0x152/0x200
 [<ffffffff811adb41>] ? bio_phys_segments+0x21/0x30
 [<ffffffff812243f0>] ? blk_rq_bio_prep+0x30/0xb0
 [<ffffffff81337de6>] scsi_execute+0xe6/0x180
 [<ffffffff81338fbd>] scsi_execute_req+0xbd/0x130
 [<ffffffff8133ace7>] scsi_probe_and_add_lun+0x257/0xe10
 [<ffffffff8152b18e>] ? __slab_free+0x2c0/0x311
 [<ffffffff8133c113>] __scsi_scan_target+0x2a3/0x790
 [<ffffffff8131fd09>] ? __pm_runtime_resume+0x69/0xa0
 [<ffffffff81531e3f>] ? _raw_spin_unlock_irqrestore+0x3f/0x80
 [<ffffffff8133c78e>] scsi_scan_target+0xfe/0x110
 [<ffffffffa02f281c>] scst_process_aens+0xcc/0x210 [scst_local]
 [<ffffffff815317f2>] ? _raw_spin_lock+0x72/0x80
 [<ffffffffa02f2669>] ? spin_lock+0x9/0x10 [scst_local]
 [<ffffffffa02f2b39>] scst_aen_work_fn+0x79/0x140 [scst_local]
 [<ffffffff810655ca>] process_one_work+0x1da/0x650
 [<ffffffff81065562>] ? process_one_work+0x172/0x650
 [<ffffffff81065df2>] worker_thread+0x112/0x330
 [<ffffffff81065ce0>] ? rescuer_thread+0x260/0x260
 [<ffffffff8106c15d>] kthread+0xed/0x100
 [<ffffffff810a0d75>] ? lock_release_holdtime.part.26+0x15/0x1a0
 [<ffffffff8106c070>] ? flush_kthread_worker+0x190/0x190
 [<ffffffff8153b92c>] ret_from_fork+0x7c/0xb0
 [<ffffffff8106c070>] ? flush_kthread_worker+0x190/0x190

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4837 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-04-11 03:14:57 +00:00
Vladislav Bolkhovitin
d926f1bfaa Small web corrections
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4836 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-04-11 02:54:44 +00:00
Vladislav Bolkhovitin
0488764a58 Web updates
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4835 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-04-09 23:41:23 +00:00
Bart Van Assche
34958f365f nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4834 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-04-08 16:50:08 +00:00
Bart Van Assche
f709ef3150 scstadmin: Speed up restoring a configuration about 40% by caching certain /sys/kernel/scst_tgt/ query results
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4833 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-04-08 07:30:06 +00:00
Vladislav Bolkhovitin
66b30be796 Resource agents git repository added
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4832 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-04-06 03:37:31 +00:00
Vladislav Bolkhovitin
9e3f255473 Web updates
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4831 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-04-05 03:04:59 +00:00
Vladislav Bolkhovitin
b67c05a974 Apparently sparse does not accept ifdef-ing macro arguments. It reports the
following error message for that construct:

scst/src/scst_main.c: error: directive in argument list

Make it again possible to verify the SCST source code with sparse.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4830 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-29 01:22:04 +00:00
Vladislav Bolkhovitin
0339bb8905 This change causes "make -C <dir> clean" to work. Also, use SUBDIRS=...
instead of M=... because of consistency with the rest of the Makefile.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4829 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-29 01:19:24 +00:00
Vladislav Bolkhovitin
e4fb5201e9 RHEL 5 does not support queue_flag_set_unlocked(). Hence disable the
queue_flag_set_unlocked() call on RHEL 5.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4828 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-29 01:18:09 +00:00