Commit Graph

5067 Commits

Author SHA1 Message Date
Bart Van Assche
e8f50e1915 scst_dlm: Add __printf attribute to create_st_wq() 2015-09-25 16:00:52 -07:00
Bart Van Assche
9ab01968d3 Merge branch 'svn-trunk' 2015-09-17 18:01:11 -07:00
Bart Van Assche
837413b419 scripts/specialize-patch: Fix handling of complex #if / #elif / #else / #endif constructs
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6515 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-09-17 21:17:55 +00:00
Bart Van Assche
3c3590a477 scripts/specialize-patch: Simplify implementation
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6514 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-09-17 20:57:47 +00:00
Bart Van Assche
ead4f8c43e scripts/specialize-patch: Simplify implementation
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6513 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-09-17 20:57:11 +00:00
Bart Van Assche
bd19ba30fd scripts/specialize-patch: Add more debugging output
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6512 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-09-17 20:34:50 +00:00
Bart Van Assche
f1df6a389b scripts/specialize-patch: Fix #elif handling
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6511 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-09-17 18:39:14 +00:00
Bart Van Assche
f4a57df52b qla2x00t: Convert __constant_cpu_to_*() into cpu_to_*()
This change does not affect the generated code but improves source
code readability.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6510 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-09-16 22:03:06 +00:00
Bart Van Assche
4a858144ec qla2x00t: Convert __constant_htonl() into htonl()
The function htonl() checks whether its argument is a constant
and is evaluated by the compiler if its argument is a constant.
This means that __constant_htonl() can be changed into htonl()
without any performance impact.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6509 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-09-16 21:43:59 +00:00
Bart Van Assche
f18ebc5152 nightly build: Add Linux kernel v4.2
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6508 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-09-16 16:44:49 +00:00
Bart Van Assche
cba8f3ab7e ib_srpt: Build fix for the nightly build against kernel v4.2
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6507 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-09-16 16:43:32 +00:00
Bart Van Assche
0cbd279a34 isert-scst: Fix a checkpatch complaint about whitespace
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6506 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-09-16 16:31:01 +00:00
Bart Van Assche
b85e99da68 nightly build: Add kernel v4.2 build infrastructure
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6505 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-09-16 14:00:26 +00:00
Bart Van Assche
164733058b Merge branch 'svn-trunk' 2015-09-14 22:32:41 -07:00
Bart Van Assche
dee1c4e0fc scst_lib: Fix procfs build
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6503 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-09-15 05:27:12 +00:00
Bart Van Assche
4fb4de5401 scst_vdisk: Kernel 2.6.30 build fix
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6502 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-09-15 05:20:11 +00:00
Bart Van Assche
ae0ee7f76c nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6501 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-09-14 20:34:39 +00:00
Bart Van Assche
1360092df7 Merge branch 'svn-trunk'
Conflicts:
	scst/src/scst_lib.c
2015-09-13 20:18:30 -07:00
Bart Van Assche
8fdd45a829 scst_lib: Fix a stack overflow
Avoid that removing an acg with which a large number of sessions
has been associated triggers a stack overflow due to the following
recursive call chain:
    
scst_put_acg() -> scst_release_acg() -> scst_free_acg() -> scst_free_acn()
-> scst_check_reassign_sessions() -> scst_check_reassign_sess()
-> scst_put_acg().

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6500 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-09-14 03:14:06 +00:00
Bart Van Assche
61372fd4dd vdisk_blockio: Report physical block size correctly
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6499 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-09-14 03:12:09 +00:00
Bart Van Assche
c96ad7c0c3 Merge branch 'svn-trunk' 2015-09-10 22:26:36 -07:00
Bart Van Assche
ed07ec49a8 ib_srpt: Avoid that relogin triggers a large number of FLUSH ERR messages
Reported-by: Grant Albitz <Grant@schultztechnology.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6498 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-09-10 16:31:31 +00:00
Bart Van Assche
2e92d818a0 scst_targ: Fix scst_report_luns_local()
Avoid that the "REPORTED LUNS DATA HAS CHANGED" unit attention
condition can get cleared if a LUN is added after the response buffer
has been filled and before the response is sent to the initiator. Do
not clear the "REPORTED LUNS DATA HAS CHANGED" unit attention
condition unsupported values of the SELECT REPORT field.

See also patch "scst: Rework sess_tgt_dev_list locking" (commit ID
5af7d9277d).

Reported-by: Kurt Reddew <kurt.reddew@gmail.com>
2015-09-08 18:19:43 -07:00
Bart Van Assche
0bc7df1729 scst_lib: Fix a locking bug
Avoid that the tgt_dev list can be modified after the
spin_lock(&tgt_dev->tgt_dev_lock) statement and before the
spin_unlock(&tgt_dev->tgt_dev_lock) statement.

See also patch "scst: Rework sess_tgt_dev_list locking" (commit ID
5af7d9277d).

Reported-by: Kurt Reddew <kurt.reddew@gmail.com>
2015-09-08 18:19:36 -07:00
Bart Van Assche
9550c47e75 Merge branch 'svn-trunk' 2015-09-08 18:19:11 -07:00
Bart Van Assche
68ce2d0ce4 ib_srpt: Port to MOFED 3.0
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6497 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-09-08 16:18:27 +00:00
Bart Van Assche
e8e3f87baf README.dlm: Add a sample test
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
2015-09-04 09:44:57 -07:00
Bart Van Assche
7a12e83687 scst_vdisk: Allow cluster_mode to be set during device creation
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
2015-09-04 09:15:25 -07:00
Bart Van Assche
af92e2b4c9 scst_dlm: Build fix for older kernels (2.6.32)
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
2015-09-04 08:52:05 -07:00
Bart Van Assche
6420070cb9 scst: Synchronize persistent reservation state between cluster nodes
If cluster mode is enabled in SCST then the persistent reservation
state is shared and synchronized between multiple nodes via DLM LVB's
(lock value blocks).

The sysfs attribute cluster_mode controls whether or not persistent
reservation information is synchronized between cluster nodes.

Additionally, MODE SELECT commands are refused with cluster mode
enabled since mode pages are not yet synchronized between cluster
nodes.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
2015-09-03 08:23:32 -07:00
Bart Van Assche
f8ddae5770 Merge branch 'svn-trunk' 2015-09-02 21:13:48 -07:00
Bart Van Assche
2b5c929181 scst.spec.in: Sort kernel rpm by build time
Additionally, fix the logic for determining %{krpmver} if %{kdir} points
to another kernel version than the latest kernel version.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6496 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-09-02 18:43:13 +00:00
Bart Van Assche
e9de8f4a6c Merge branch 'svn-trunk' 2015-09-01 17:58:05 -07:00
Bart Van Assche
1e9900d975 scst.spec: Make this spec file independent of the value of $PATH
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6495 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-09-01 18:20:09 +00:00
Bart Van Assche
e3d6a018a3 scst.spec: Derive kernel version from %{kdir} if set
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6494 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-09-01 18:12:54 +00:00
Bart Van Assche
af555c5645 Merge branch 'svn-trunk' 2015-08-31 19:32:21 -07:00
Bart Van Assche
0f13a54539 Revert "scst: Rework the code for waiting until an I/O context is ready"
This reverts commit 32cadc07df.

The only reason for this revert is to avoid merge conflicts with trunk
commit 0a4bce0392.
2015-08-31 19:31:52 -07:00
Bart Van Assche
0a4bce0392 scst: Speed up command thread creation
Avoid hitting a 50 ms delay during thread creation.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6493 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-09-01 02:29:02 +00:00
Bart Van Assche
35bca71f0c scst.spec: Respect KDIR environment variable
Reported-by: Consus <consus@gmx.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6492 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-08-31 17:27:10 +00:00
Bart Van Assche
6c6a6e6ba3 scst.spec: Make version numbers monotonically increasing for the git tree
Additionally, make the fourth component of the version number configurable.
An example: make RPM REVISION=r733

Reported-by: Consus <consus@gmx.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6491 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-08-31 15:03:20 +00:00
Bart Van Assche
42cd180a9e scst.spec: Fix code for determining kernel RPM version
I hit couple of issues in scst.spec.in:

1. krpmver sets to oldest available kernel rpm version (RedHat/Fedora
   typically keeps 3 kernels), that causes rpm dependency on a wrong
   kernel version
2. if system has a newer kernel version installed but not booted into
   it yet, build goes against currently running kernel version,
   disrespecting what KVER is set to.

Signed-off-by: Vitaly Mayatskih <v.mayatskih@gmail.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6490 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-08-28 17:04:04 +00:00
Bart Van Assche
1635447f32 scst.spec: Build in release mode
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6489 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-08-28 16:59:49 +00:00
Bart Van Assche
d4463ab1b5 scst_mem: Avoid that a debug statement can print an uninitialized value
This was detected by Coverity.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6488 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-08-27 18:40:55 +00:00
Bart Van Assche
dc070e83d8 RPM spec files: Add dependency clauses
scst.spec: Add "Requires: depmod find rm" and "Provides: scst"
scstadmin.spec: Add "Requires: rm"

Proposed-by: Consus <consus@gmx.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6487 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-08-27 17:56:52 +00:00
Bart Van Assche
175463ca84 isert-scst: Fix race condition between login request and scst teardown flow
On scst teardown we call rdma_disconnect() on all connections.
this moves the qps to error state and flushes all the wc, including
the drain wc which will results in kref_put of the connection.

In a race condition with the connection request, we might be only in
the init stage of the ref, and calling kref_put will result in refcount
0 and freeing the connection while establishing it.

Call the first kref_get before rdma_accept() to prevent this race.

Signed-off-by: Ariel Nahum <arieln@mellanox.com>
Signed-off-by: Yan Burman <yanb@mellanox.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6486 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-08-27 17:53:32 +00:00
Bart Van Assche
aa0730d5b5 Merge branch 'svn-trunk' 2015-08-26 20:39:25 -07:00
Bart Van Assche
3732ee39f8 scst: Introduce scst_pr_init() and scst_pr_cleanup()
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6485 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-08-26 23:34:36 +00:00
Bart Van Assche
2e5d1a4a6e scst_user: Suppress a 'sparse' complaint
Avoid that sparse complains about casts that remove the address space
of an expression. This patch does not change any functionality.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6484 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-08-26 18:58:51 +00:00
Bart Van Assche
90a87ac5ab Merge branch 'svn-trunk' 2015-08-25 17:47:14 -07:00
Bart Van Assche
a607b9c130 scst: Convert a printk(KERN_INFO) statement into a pr_info() statement
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6483 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2015-08-25 21:51:10 +00:00