Bart Van Assche
d681f8e287
iscsi-scstd: Annotate fall-throughs for Coverity
...
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com >
2015-05-06 14:57:14 +02:00
Bart Van Assche
ec8f308851
iscsi-scstd: Move two local variables to suppress a Coverity complaint
...
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com >
2015-05-06 14:57:14 +02:00
Bart Van Assche
40c4078e97
iscsi-scstd: Fix a file descriptor leak in an error path
...
Detected by Coverity.
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com >
2015-05-06 14:57:14 +02:00
Bart Van Assche
9da649131f
iscsi-scstd: Fix a dereference-before-null-check
...
Detected by Coverity.
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com >
2015-05-06 14:57:14 +02:00
Bart Van Assche
1fc64916e5
iscsi-scstd: Fix a memory leak in the iSNS code
...
Detected by Coverity.
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com >
2015-05-06 14:57:14 +02:00
Bart Van Assche
39f46daa44
iscsi-scstd: Rearrange driver major number lookup code
...
Introduce a function for looking up the driver major number.
This patch does not change any functionality but makes the source
code easier to read and also makes it easier for Coverity to
analyze this code.
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com >
2015-05-06 14:57:14 +02:00
Bart Van Assche
ab78e6ae61
iscsi-scstd: Improve create_and_open_dev() robustness
...
Reset 'devn' if the sscanf() return value is lower than two.
Based on a Coverity report.
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com >
2015-05-06 14:57:14 +02:00
Bart Van Assche
189e3b9e7e
iscsi-scstd: Fix a dereference-before-null-check
...
Detected by Coverity.
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com >
2015-05-06 14:57:14 +02:00
Bart Van Assche
ce09b1bb21
iscsi-scst, isert: Add address length check in isert_listen_ioctl()
...
Detected by Coverity.
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com >
2015-05-06 14:57:14 +02:00
Bart Van Assche
231218932b
iscsi-scst: Tell Coverity when scst_aen is set
...
This suppresses a Coverity complaint.
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
2015-05-06 14:57:14 +02:00
Bart Van Assche
f54553c148
iscsi-scst: Annotate fall-through cases for Coverity
...
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com >
2015-05-06 14:57:14 +02:00
Bart Van Assche
7d3005fdbc
iscsi-scst: Fix indentation
...
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com >
2015-05-06 14:57:14 +02:00
Bart Van Assche
ae7819e8f0
scst_debug: Avoid that compiler warnings depend on the build mode
...
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com >
2015-05-06 14:57:13 +02:00
Bart Van Assche
4177648d92
isert: Declare a local function static
...
Detected by checkpatch.
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com >
2015-05-03 20:59:37 +02:00
Bart Van Assche
7abae677f1
iscsi-scst: Surround complex values with parentheses
...
Detected by checkpatch.
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com >
2015-05-03 20:59:36 +02:00
Bart Van Assche
1c71987ad6
Merge branch 'svn-iser'
...
Conflicts:
Makefile
fcst/Makefile
iscsi-scst/Makefile
iscsi-scst/include/iscsi_scst.h
iscsi-scst/include/iscsi_scst_ver.h
iscsi-scst/kernel/Makefile
iscsi-scst/kernel/config.c
iscsi-scst/kernel/conn.c
iscsi-scst/kernel/digest.c
iscsi-scst/kernel/digest.h
iscsi-scst/kernel/event.c
iscsi-scst/kernel/iscsi.c
iscsi-scst/kernel/iscsi.h
iscsi-scst/kernel/iscsi_dbg.h
iscsi-scst/kernel/iscsi_hdr.h
iscsi-scst/kernel/nthread.c
iscsi-scst/kernel/param.c
iscsi-scst/kernel/session.c
iscsi-scst/kernel/target.c
iscsi-scst/usr/Makefile
iscsi-scst/usr/chap.c
iscsi-scst/usr/config.c
iscsi-scst/usr/conn.c
iscsi-scst/usr/ctldev.c
iscsi-scst/usr/event.c
iscsi-scst/usr/iscsi_adm.c
iscsi-scst/usr/iscsi_adm.h
iscsi-scst/usr/iscsi_hdr.h
iscsi-scst/usr/iscsi_scstd.c
iscsi-scst/usr/iscsid.c
iscsi-scst/usr/iscsid.h
iscsi-scst/usr/isns.c
iscsi-scst/usr/isns_proto.h
iscsi-scst/usr/log.c
iscsi-scst/usr/message.c
iscsi-scst/usr/misc.c
iscsi-scst/usr/misc.h
iscsi-scst/usr/param.c
iscsi-scst/usr/param.h
iscsi-scst/usr/session.c
iscsi-scst/usr/target.c
iscsi-scst/usr/types.h
nightly/conf/nightly.conf
qla2x00t/qla2x00-target/Makefile
qla2x00t/qla2x00-target/README
qla2x00t/qla2x00-target/qla2x00t.c
qla2x00t/qla2x00-target/qla2x00t.h
qla2x00t/qla2x_tgt.h
qla2x00t/qla2x_tgt_def.h
qla2x00t/qla_attr.c
qla2x00t/qla_init.c
qla2x00t/qla_inline.h
qla2x00t/qla_isr.c
qla2x00t/qla_mbx.c
qla2x00t/qla_os.c
scripts/generate-release-archive
scripts/rebuild-rhel-kernel-rpm
scripts/run-regression-tests
scst.spec.in
scst/Makefile
scst/README
scst/README_in-tree
scst/include/scst.h
scst/include/scst_const.h
scst/include/scst_debug.h
scst/include/scst_sgv.h
scst/include/scst_user.h
scst/src/Makefile
scst/src/dev_handlers/Makefile
scst/src/dev_handlers/scst_cdrom.c
scst/src/dev_handlers/scst_changer.c
scst/src/dev_handlers/scst_disk.c
scst/src/dev_handlers/scst_modisk.c
scst/src/dev_handlers/scst_processor.c
scst/src/dev_handlers/scst_raid.c
scst/src/dev_handlers/scst_tape.c
scst/src/dev_handlers/scst_user.c
scst/src/dev_handlers/scst_vdisk.c
scst/src/scst_debug.c
scst/src/scst_lib.c
scst/src/scst_main.c
scst/src/scst_mem.c
scst/src/scst_mem.h
scst/src/scst_module.c
scst/src/scst_pres.c
scst/src/scst_pres.h
scst/src/scst_priv.h
scst/src/scst_proc.c
scst/src/scst_sysfs.c
scst/src/scst_targ.c
scst/src/scst_tg.c
scst_local/scst_local.c
srpt/Makefile
srpt/README
srpt/README.ofed
srpt/conftest/gid_change/Makefile
srpt/src/ib_srpt.c
srpt/src/ib_srpt.h
usr/fileio/Makefile
usr/fileio/common.c
usr/fileio/common.h
usr/fileio/debug.c
usr/fileio/debug.h
usr/fileio/fileio.c
www/comparison.html
www/contributing.html
www/downloads.html
www/handler_fileio_tgt.html
www/index.html
www/mc_s.html
www/scst_admin.html
www/scstvslio.html
www/scstvsstgt.html
www/solutions.html
www/target_emulex.html
www/target_fcoe.html
www/target_ibmvscsi.html
www/target_iscsi.html
www/target_local.html
www/target_lsi.html
www/target_mvsas.html
www/target_old.html
www/target_qla2x00t.html
www/target_srp.html
www/targets.html
www/users.html
2015-05-03 19:07:39 +02:00
Bart Van Assche
0a6cb6e531
iscsi-scst/README: Update
...
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com >
2015-05-02 07:38:08 +02:00
Bart Van Assche
4f445f4c33
Merge branch 'svn-trunk' r6192
...
Conflicts:
scst/include/scst.h
scst/src/dev_handlers/scst_vdisk.c
2015-05-01 08:15:50 +02:00
Bart Van Assche
b493c5b8f6
Merge branch 'svn-trunk' (r6189)
...
Conflicts:
iscsi-scst/kernel/nthread.c
qla2x00t/qla_iocb.c
scst/src/scst_lib.c
www/target_emulex.html
2015-05-01 08:07:43 +02:00
Vladislav Bolkhovitin
906f4dfefb
Merge t10-pi branch back
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6192 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-05-01 04:21:56 +00:00
Bart Van Assche
76be413535
RHEL 7.1: Add put_page_callback patch
...
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com >
2015-04-24 12:29:31 +02:00
Bart Van Assche
bd16fd94de
iscsid: Logically and negative conditions instead of or-ing these
...
Logically and negative allowed_portal conditions instead of
or-ing these. If both positive and negative conditions match,
the negative condition takes precedence.
This was proposed by Sergej Roytman <spocks.goatee@gmail.com >.
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com >
2015-04-24 09:03:04 +02:00
Vladislav Bolkhovitin
1e78126962
iscsi-scst: update for 3.19 kernels
...
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com > with some improvements
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6187 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-04-24 02:54:52 +00:00
Vladislav Bolkhovitin
6572bedcb8
iscsid: Logically and negative conditions instead of or-ing these
...
Logically and negative allowed_portal conditions instead of or-ing these.
This was proposed by Sergej Roytman <spocks.goatee@gmail.com >.
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6186 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-04-24 02:04:58 +00:00
Vladislav Bolkhovitin
918ac63120
iscsi-scst: Add put_page_callback patch for kernel 3.19
...
Tested against the virtio_net network driver.
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6184 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-04-16 04:08:45 +00:00
Bart Van Assche
a8a2725815
iscsi-scst: Add put_page_callback patch for kernel 3.19
...
Tested against the virtio_net network driver.
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com >
2015-04-13 18:44:00 +02:00
Bart Van Assche
904b3c1eb3
iscsi-scst: Kernel 3.19 build fix
...
Change the data type of iscsi_conn.read_iov into struct kvec * and
switch from iscsi_conn.read_size to iscsi_conn.read_msg.count for
kernel version 3.19 and later. Cast the return type of
get_zeroed_page() to void * since with this patch the read_iov
data type depends on the kernel version. Remove the (void __force
__user *) casts when assigning to iov_base since for a kvec iov_base
is a kernel pointer instead of a user space pointer. Switch to
iov_iter_kvec() to initialize conn->read_msg.msg_iter.
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com >
2015-04-13 18:44:00 +02:00
Bart Van Assche
02c014bf90
iscsi-scst: Prepare for kernel 3.19
...
Rework the iSCSI target driver code such that it becomes easier
to port this code to kernel 3.19.
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com >
2015-04-13 18:44:00 +02:00
Bart Van Assche
e860c56bcd
iscsi-scst: Suppress put_page_callback patch warnings
...
The put_page_callback patch only improves performance on single-socket
systems but not on systems with multiple CPU sockets. Hence do not
print a warning if the put_page_callback patch has not been applied.
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com >
2015-04-13 18:44:00 +02:00
Bart Van Assche
c32f79f6c1
Revert T10-PI support
...
The T10-PI patch (r6162) increases the time needed to run mkfs.ext4
over iSCSI from less than a second to several minutes. This is a
regression so revert the T10-PI patch until there is sufficient time
to find the root cause of this regression and to fix this regression.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6171 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-03-31 09:51:24 +00:00
Bart Van Assche
6349372255
iscsi-scst: Switch to the new and preferred approach for printing kernel messages
...
This patch does not change any functionality.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6163 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-03-29 17:28:38 +00:00
Vladislav Bolkhovitin
57ae9291b9
iscsi-scst: Concatenate two string literals
...
This patch fixes the following kernel 3.19 checkpatch complaint:
Consecutive strings are generally better as a single string.
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6160 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-03-27 03:52:37 +00:00
Vladislav Bolkhovitin
5cc7555cd9
iscsi-scst: Rework sparse annotations
...
Do not declare kernel pointers as __user but instead cast these to
__user just before assigning these to iov_base.
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6156 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-03-26 00:33:45 +00:00
Vladislav Bolkhovitin
fe38e4acb2
Copyrights updated
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6146 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-03-19 00:01:03 +00:00
Yan Burman
025574018e
isert: Support building against MOFED without patching the kernel build system
...
Additionally, print OFED flavor name while building and embed the
OFED flavor name in the module description.
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com >
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@6139 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-03-03 11:25:37 +00:00
Bart Van Assche
d9c1ffa29a
iscsi-scst/usr/Makefile: Fix include path
...
Use the SCST_INC_DIR variable passed by the parent Makefile such that
both the in-tree and out-of-tree builds work.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6130 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-02-24 14:10:54 +00:00
Vladislav Bolkhovitin
4ac6d7a26d
[PATCH] scst: Drop detect() method
...
There is no need for a detect() method - code that is present in such
a method can be moved to module_init(). Hence declare this method
obsolete. Leave the detect pointer member in the target template for
now for out-of-tree SCST drivers.
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com >
with some improvements
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6113 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-02-21 04:32:36 +00:00
Yan Burman
ed3a17ca7a
isert: Fix crash on listener close while in login/logout loop
...
Signed-off-by: Yan Burman <yanb@mellanox.com >
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@6088 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-02-16 08:59:32 +00:00
Bart Van Assche
5019ae319e
scst: Introduce file_inode()
...
Signed-off-by: Sebastian Herbszt <herbszt@gmx.de >
[bvanassche: Constified file_inode() argument / added iscsi-scst conversion]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6084 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-02-12 07:48:10 +00:00
Yan Burman
ea5e08e74b
isert: Fix crash on service stop when under heavy login/logout load
...
Signed-off-by: Yan Burman <yanb@mellanox.com >
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@6081 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-02-11 13:05:34 +00:00
Yan Burman
90faade1cc
isert: Fix case where we got disconnect before login character device was opened
...
We may receive disconnect before iscsi-scstd had the chance to open
the character device. This would result in resource leak, since the device will not be freed.
Fix this by only increasing reference once the device is actually opened.
Signed-off-by: Yan Burman <yanb@mellanox.com >
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@6080 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-02-11 13:05:20 +00:00
Bart Van Assche
97711db2b6
iscsi-scst/usr/param.c: Remove an empty trailing line
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@6034 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-02-10 08:14:28 +00:00
Yan Burman
2b9e1f9be8
isert: Fix listener release handling
...
Signed-off-by: Yan Burman <yanb@mellanox.com >
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@6017 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-02-01 11:01:21 +00:00
Yan Burman
fab0ea06e2
isert: Properly propagate portal creation error to iscsi-scstd
...
Signed-off-by: Yan Burman <yanb@mellanox.com >
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@6004 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-01-28 12:16:26 +00:00
Yan Burman
0ce1128b19
isert: Fix discovery and login with actual 8192 bytes of data
...
Signed-off-by: Yan Burman <yanb@mellanox.com >
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@6003 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-01-28 12:16:15 +00:00
Yan Burman
4a8b416ff8
isert: Make sure we have a valid conn pointer
...
Fix a race where disconnect was called while iscsi-scstd was doing ioctls
Signed-off-by: Yan Burman <yanb@mellanox.com >
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@6002 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-01-28 12:16:05 +00:00
Yan Burman
06e42a7273
isert: Avoid starving connections in high connect load
...
Stack was used instead of queue for incoming connection management.
Signed-off-by: Yan Burman <yanb@mellanox.com >
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@6001 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-01-28 12:15:55 +00:00
Yan Burman
978ee4effa
isert: Micro-optimization of poll_cq WC loop
...
Signed-off-by: Yan Burman <yanb@mellanox.com >
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@6000 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-01-28 12:15:46 +00:00
Yan Burman
ba2083708a
isert: Make the login character device more posix compliant
...
This fixes a case where iscsi-scstd will go into busy-waiting loop
on some occasions because it would not detect disconnect correctly
Signed-off-by: Yan Burman <yanb@mellanox.com >
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5999 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-01-28 12:15:35 +00:00
Yan Burman
c9e71e4d7c
isert: Do not crash if we receive no data inside PDU
...
Text continuation request PDUs will have zero data.
Avoid crashing in those cases.
Signed-off-by: Yan Burman <yanb@mellanox.com >
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5998 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-01-28 12:15:22 +00:00