Commit Graph

2336 Commits

Author SHA1 Message Date
Bart Van Assche
d0547fe613 scst/scst_vdisk: Made error handling in bi_end_io function IRQ-safe since
bi_end_io functions must be IRQ-safe.

A quote from a discussion between Alan Cox, Mikulas Patocka and Jens Axboe
(http://lkml.org/lkml/2008/7/2/69):

> >Right, that wont work of course. Completions are typically done through
> >a softirq, so it is not currently done with hard interrupts disabled.
> 
> I thought, from hardirq - that's what IDE is doing. And they are called 
> with interrupts disabled (maybe unless you specify unmaskirq, which is not 
> default). What block driver does completions with softirq? ... and why?

The key word is 'typically', the old IDE driver really isn't used very
much. The SCSI layer and eg cciss uses the block layer softirq
completions, so that is what 99% of the uses will be.

The patch itself was provided by Arne Redlich.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2913 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-12-03 11:35:31 +00:00
Bart Van Assche
1d520654cb ib_srpt: Pass correct atomic context information to scst_rx_cmd().
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2912 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-12-03 11:29:47 +00:00
Bart Van Assche
8773b01fde Fixed scst_suspend_activity() lockdep annotations.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2888 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-12-01 09:56:32 +00:00
Vladislav Bolkhovitin
d83c11c1a3 Fix rarely possible race between scst_free_session() and scst_check_reassign_sess()
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2867 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-29 17:12:53 +00:00
Vladislav Bolkhovitin
f9ca99c4da This patch simplifies the SCST sysfs code a little bit by
introducing the functions sysfs_create_files() and sysfs_remove_files().
These functions have been introduced in kernel 2.6.34 via commit
1c205ae18db53ff72985dd79f3baaf2dbaba6db7. An implementation of these
functions has been included for older kernels.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2861 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-27 19:35:21 +00:00
Vladislav Bolkhovitin
b330889bf4 This patch fixes a class of race conditions in the ..._sysfs_del()
functions: the kobject_put() calls should come after all kobject_del() calls
because as long as the last kobject_del() call hasn't been invoked, a sysfs
.show() or .store() callback may still be in progress that needs one of
these kobjects.

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




git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2860 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-27 19:22:43 +00:00
Bart Van Assche
d144966a53 scst: Lock annotation corrections.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2846 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-27 10:21:03 +00:00
Joe Eykholt
8e0e14b5e0 My previous commit failed to include 2 critical patches, plus
had the wrong version of 22-lport-notify.   This corrects that.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2845 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-26 21:40:59 +00:00
Vladislav Bolkhovitin
bef485b20f Simplify scst_free_session() by invoking wake_up_all() while scst_mutex is held.
Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2844 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-26 21:28:38 +00:00
Vladislav Bolkhovitin
bd60cf5505 Minor improvement
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2843 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-26 20:53:33 +00:00
Vladislav Bolkhovitin
308aca8883 Fix memory leak in __blk_rq_map_kern_sg() reported by "Hauser, Stefan" <stefan.hauser@bdt.de>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2840 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-26 15:07:35 +00:00
Bart Van Assche
f4da51e7b7 Follow-up for r2837: fixed a typo.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2838 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-26 14:42:24 +00:00
Vladislav Bolkhovitin
515fda68cf This patch simplifies the string duplication code in
scst_sysfs.c and scst_vdisk.c. Code for duplicating '\0'-terminated
strings has been replaced by a call to kstrdup() and code for
duplicating fixed-length strings has been replaced by a call to
kasprintf(GFP_KERNEL, "%.*s", (int)size, buf).

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2837 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-26 14:05:29 +00:00
Vladislav Bolkhovitin
2935a05765 Use queue's max_hw_sectors instead of host->max_sectors as reported by "Hauser, Stefan" <stefan.hauser@bdt.de>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2836 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-26 14:03:39 +00:00
Bart Van Assche
db35095aa1 Fixed a recently introduced sparse warning that was triggered against kernel 2.6.28 and before.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2833 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-26 08:46:16 +00:00
Vladislav Bolkhovitin
2170d47abc This patch makes it possible for lockdep to recognize activity suspending and
resuming.

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



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2832 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-25 20:41:53 +00:00
Bart Van Assche
69c9e393e5 Fixed recently introduced checkpatch complaints about whitespace.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2828 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-25 09:58:09 +00:00
Bart Van Assche
714461dd04 scst/sysfs: Eliminated a superfluous string copy operation in the acess control group creation code.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2827 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-25 09:32:34 +00:00
Bart Van Assche
d30313e587 scst/sysfs: Added missing terminating newline in a sysfs help text.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2826 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-25 09:19:33 +00:00
Joe Eykholt
649fef691e Changes to make fcst work on Linux 2.6.36.
The biggest difference is that libfc no longer allocates a sequence
and exchange for incoming requests, and that eliminates a parameter
on the receive function.  This was done to help performance and
might help on short reads sometime in the future.

This also fixes an error in ft_send_read_data() that exceeds the
skb's SG list length limit on long reads when the NIC
supports large send offload.

I also made other minor changes like adding debugging.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2823 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-25 01:16:18 +00:00
Vladislav Bolkhovitin
1dce4e0ade EXPERIMENTAL! patch to improve keeping S_ID/LOOP_ID/PortName mapping handling. Only slightly tested.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2822 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-24 20:37:01 +00:00
Bart Van Assche
9f6db631d1 scst/sysfs: Bug fix - made sure that the proper LUN number is available in sysfs on big endian systems.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2815 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-24 13:29:21 +00:00
Vladislav Bolkhovitin
078c37afe0 Docs cleanups
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2813 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-24 12:00:24 +00:00
Bart Van Assche
8113a4f3dc Removed again because apparently fcst doesn't build yet with the 2.6.36 kernel.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2806 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-23 19:12:49 +00:00
Bart Van Assche
bda6f0043b Added to repository.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2805 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-23 19:06:14 +00:00
Joe Eykholt
ac5618b07e Adding patches for 2.6.36. These are similar to the 2.6.35 patches
except for line number changes and a few interface changes imposed
by differences in libfc between 2.6.35 and 2.6.36, mostly due to the
change which doesn't allocate an exchange and sequence for incoming
requests.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2804 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-23 17:56:35 +00:00
Bart Van Assche
50661013c4 Updated kernel versions.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2795 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-23 09:52:48 +00:00
Joe Eykholt
ff7a986329 Add an fcoe patch for 2.6.35 to not deliver frames to fcst from softirq level.
I believe this was causing a race leading to a WARN in fc_seq_send that
the sequence initiative wasn't held in ft_send_response().  It also caused
a problem for tcm_fc.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2786 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-21 22:38:03 +00:00
Vladislav Bolkhovitin
2e9f15f2d7 Some ibmvstgt patch description improvements
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2748 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-18 20:33:14 +00:00
Vladislav Bolkhovitin
24fb3c53b0 Sysfs interface ABI implementation as requested by Greg KH
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2747 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-18 20:33:01 +00:00
Bart Van Assche
184fd83fc3 ibmvstgt: Updated patch description once more.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2746 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-17 19:53:09 +00:00
Vladislav Bolkhovitin
3e298c2e4e Fix compilation if target mode support disabled
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2744 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-17 19:48:32 +00:00
Bart Van Assche
b88213bb5b ibmvstgt: Corrected README.sysfs.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2743 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-17 19:43:22 +00:00
Bart Van Assche
6a125e268c ibmvstgt updates: Corrected last argument of scst_rx_cmd() / updated a comment.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2742 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-17 19:40:20 +00:00
Bart Van Assche
2eabb7e89b Switched from I/O engine sync to psync because the latter has a slightly lower system call overhead.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2741 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-17 19:24:38 +00:00
Mark Buechler
6ce1ecf9d8 - Warn on missing /etc/scst.conf.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2736 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-17 14:56:37 +00:00
Mark Buechler
5e5478ecae - Permit init scripts to run and load modules even if /etc/scst.conf doesn't yet exist.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2735 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-17 14:51:57 +00:00
Bart Van Assche
1633190a4a scst: Only enable sysfs-specific variables in the sysfs build and not in the procfs build. This commit does not change any behavior of SCST.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2731 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-17 14:18:31 +00:00
Bart Van Assche
5512203ffc scst: Builds now against the openSUSE 11.3 kernel too, which is a 2.6.34 kernel with selective backports from the 2.6.35 kernel.
(Merged r2719 from the ibmvstgt-port branch.)


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2730 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-17 14:06:40 +00:00
Bart Van Assche
479a519d11 Added missing sparse annotations to scst_process_sysfs_works().
(Merged r2723 from the ibmvstgt-port branch.)


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2729 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-17 13:56:56 +00:00
Vladislav Bolkhovitin
30e14c9e7c Max_sectors related error made more clear
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2725 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-17 12:48:21 +00:00
Vladislav Bolkhovitin
52820b5d57 Cleanup
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2720 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-17 11:40:08 +00:00
Bart Van Assche
900a70d873 ib_srpt: Made instructions in the documentation independent of the scstadmin version.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2717 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-16 19:16:48 +00:00
Vladislav Bolkhovitin
0e225ebdf4 Patch from Cheng Renquan <crquan@gmail.com>
This is needed to build qla2xxx on top of 2.6.26 and
2.6.27 Linux kernels according this scst-devel mailing list thread,
http://sourceforge.net/mailarchive/message.php?msg_name=1288289831-23405-1-git-send-email-crquan@gmail.com



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2716 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-16 18:41:28 +00:00
Mark Buechler
988147c48b - Apply target attributes before assigning LUNs.
- Always enable/disable targets and drivers last.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2710 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-15 15:55:39 +00:00
Bart Van Assche
e66128f414 Added yet another pattern to the preprocessor statement partial evaluation engine.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2709 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-14 16:16:15 +00:00
Bart Van Assche
b28125eb9e Fixed more spelling errors in source code comments and logging statements.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2708 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-14 16:02:55 +00:00
Bart Van Assche
662197f200 ibmvstgt: Made sure that accessing sysfs entries during target creation is harmless.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2704 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-14 09:32:32 +00:00
Bart Van Assche
83a967d3a3 ib_srpt: Made sure that accessing sysfs entries during target creation is harmless.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2703 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-14 09:32:03 +00:00
Bart Van Assche
a46907c720 Fixed a typo in source code comments: attepts -> attempts.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2702 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2010-11-14 08:29:00 +00:00