This is the result of running the Linux kernel Coccinelle script from
scripts/coccinelle/api/kmalloc_objs.cocci against the SCST tree.
This patch doesn't change any functionality.
Replace scnprintf() with sysfs_emit() and sysfs_emit_at() in sysfs show handlers.
These helper functions are specifically designed for sysfs output, providing safer
handling of buffer lengths and consistency across kernel sysfs interfaces.
This patch does not change any functionality.
Replace snprintf() with scnprintf() in two places:
- code paths that build up a buffer incrementally
- sysfs attribute “show” handlers
scnprintf() guarantees its return value is the number of bytes actually
written (never exceeding the buffer), preventing potential overruns.
This patch does not change any functionality.
Replace all uses of sprintf() with scnprintf() in sysfs attribute
callbacks to eliminate the risk of buffer overflows.
This patch does not change any functionality.
Since all RHEL/CentOS 5 users have upgraded to a newer version, procfs
support is no longer necessary. Hence remove procfs support. This patch
has been generated as follows:
git grep -lw CONFIG_SCST_PROC iscsi-scst qla2x00t scst scst_local srpt |\
while read f; do
echo ${f}
unifdef -U CONFIG_SCST_PROC ${f} >${f}.out
mv ${f}.out ${f}
done
followed by two small manual edits in scst/include/scst.h and also in
qla2x00t/qla2x00-target/qla2x00t.c.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7999 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This is a "marginal" warning, but there are only six of them in the SCST code
and this fixes two of those.
session.c:105:4: warning: cast from function call of type void * to non-matching type _Bool [-Wbad-function-cast]
target.c:668:14: warning: cast from function call of type void * to non-matching type _Bool [-Wbad-function-cast]
Signed-off-by: David Butterfield <dab21774@gmail.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7200 d57e44dd-8a1f-0410-8b47-8ef2f437770f
If this attrubute is set, each iSCSI session for this initiator has
dedicated, i.e. not shared with other sessions, pool of the iscsi{wr,rd}
kernel threads.
Useful to control per-session CPU affinity to improve performance.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7069 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Avoid that checkpatch reports the following warning:
WARNING: type 'long long unsigned' should be specified in 'unsigned long long' order.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5885 d57e44dd-8a1f-0410-8b47-8ef2f437770f
For SCST devices with a short name determining which SCST command
threads serve a given LUN requires an (expensive) walk of the
process table. For SCST devices with a long name it is not possible
to determine unambiguously which command threads serve a given
LUN. Hence add a thread_pid sysfs attribute that makes it easy to
figure out which command threads serve a LUN.
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5851 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Avoid that the checkpatch tool included in Linux kernel v3.16 reports the
following warning:
macros should not use a trailing semicolon
This patch does not change any functionality.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5724 d57e44dd-8a1f-0410-8b47-8ef2f437770f
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
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
- SendTargets now returns all (allowed) portals. Particularly based on IET r230, 234, 249 and 264.
- Initiators assigned to security groups without LUNs will not see the target during discovery and forbidden to login to it
- Per portals access control added
- Negative sign added to wildcard matching
- Docs updated
- Cleanups and minor fixes
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1685 d57e44dd-8a1f-0410-8b47-8ef2f437770f
iSCSI-SCST: A huge improvements in errors recovery and iSCSI RFC complaince as well as performance. Also:
- Fixes and improvements for MaxOutstandingR2T>1
- Flow control tracing added.
- Cleanups
SCST core:
- Now for scst_cmd_init_stage1_done() commands preprocessing_done() is always called before xmit_response(), even in case of abort or error.
- Fixed recently introduced bug, which can lead to sending responses for aborted commands after reply on the corresponding TM command already sent.
- Flow control tracing added.
- Now it is possible to call functions setting commands execution status (e.g., scst_set_cmd_error_status()) several times for the same command. Only the first call will be completed, other calls - ignored.
- All commands are counted and shown in proc/sysfs now. Before only active, i.e. not yet executed commands, were counted and shown there.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1431 d57e44dd-8a1f-0410-8b47-8ef2f437770f
The sysfs intarface is mostly finished. Only initiators-oriented access control not implemented and not all target drivers are updated. Only qla2x00t has been fully updated.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1229 d57e44dd-8a1f-0410-8b47-8ef2f437770f
- iSCSI read state machine cleanups
- Fix a race when just freed iSCSI session accessed, because the corresponding SCST session is still being unregistered.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1224 d57e44dd-8a1f-0410-8b47-8ef2f437770f