Commit Graph

3634 Commits

Author SHA1 Message Date
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
Bart Van Assche
210b5d466e ib_srpt: Restore the "connecting" channel state
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4827 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-28 15:17:13 +00:00
Bart Van Assche
0763baaad6 ib_srpt: Process cmd_wait_list immediately after QP RTS transition
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4826 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-27 15:32:31 +00:00
Bart Van Assche
546073cfb4 ib_srpt: Process cmd_wait_list after QP RTS transition
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4825 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-27 15:31:42 +00:00
Bart Van Assche
a6a71c8248 ib_srpt: Candidate fix for QLogic HCAs
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4824 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-27 15:29:47 +00:00
Bart Van Assche
d48169fb47 scstadmin: lsb-core is no longer required, so remove the lsb-core check
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4823 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-27 10:11:31 +00:00
Vladislav Bolkhovitin
ef5fe3dcd0 Correct sg_next_inline() misuse.
Previously sg_next_inline() didn't check if this sg is last.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4822 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-27 01:12:02 +00:00
Vladislav Bolkhovitin
51fabc1228 Correct debug check
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4821 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-27 01:10:21 +00:00
Vladislav Bolkhovitin
f90ec82b2e Minor fix
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4820 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-27 01:09:23 +00:00
Vladislav Bolkhovitin
1cbdfc1567 Better track latencies in us
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4819 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-26 21:50:25 +00:00
Vladislav Bolkhovitin
11ddefba2a Let's have the retry slow start more agressive
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4818 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-26 21:36:05 +00:00
Vladislav Bolkhovitin
de47a40fa0 Cleanup
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4817 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-26 21:35:26 +00:00
Vladislav Bolkhovitin
e38c450819 sess and tgt structures are read-mostly, so don't need cache alignment
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4816 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-26 21:34:53 +00:00
Bart Van Assche
9fe9158574 ib_srpt: Include state in unexpected command state messages
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4815 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-26 06:59:08 +00:00
Vladislav Bolkhovitin
02b5a95813 scst_pres: Disallow READs in exclusive access mode
Disallow READS in exclusive access mode by initiators that do not hold
the reservation. Disallow READS in exclusive access mode - all registrants
by initiators that did not register the key. This behavior is required by
SPC-4. This patch fixes a regression introduced on the trunk on June 29 2012
(r4392). PGR support in released versions, e.g. 2.2.1, works fine as far as
I know.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4814 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-26 00:30:31 +00:00
Vladislav Bolkhovitin
870478c32e Added dump_stack() to know who is calling scst_set_resp_data_len() with invalid resp_data_len
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4813 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-26 00:26:57 +00:00
Vladislav Bolkhovitin
829172f232 Some micro-optimizations by more cache friendly fields layouts
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4812 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2013-03-26 00:18:06 +00:00
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