Vladislav Bolkhovitin
396dcf6294
It isn't a error and can happen in normal circumstances
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4497 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-29 20:45:26 +00:00
Vladislav Bolkhovitin
155cde35ae
Increase MAX_NR_QUEUED_CMNDS to better handle multu-LUs per target cases
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4496 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-28 19:26:43 +00:00
Vladislav Bolkhovitin
7f16c1b4a2
scst: Fix race triggered by target unregistration
...
Without this patch it is possible that some target's sysfs attributes
can be called after release() callback returned, when, for instance,
tgt_priv is already set to NULL.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4495 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-28 01:38:11 +00:00
Vladislav Bolkhovitin
aaac0d983d
Fix incorrect errors handling. Detected by smatch.
...
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4494 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-28 01:29:14 +00:00
Vladislav Bolkhovitin
89296abc5e
Fix incorrect errors handling. Detected by smatch.
...
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4493 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-27 22:14:47 +00:00
Vladislav Bolkhovitin
3861a12da5
Fix incorrect errors handling. Detected by smatch.
...
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4492 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-27 22:12:15 +00:00
Vladislav Bolkhovitin
c1d411eb4f
Fix a recently introduced race condition
...
Make scst_unregister_target() wait again until the session
unregistration callbacks have finished instead of waiting only
until all sessions have been unregistered.
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4491 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-27 22:07:10 +00:00
Vladislav Bolkhovitin
56a29b3ca0
scst_lib: Remove two superfluous tests. Detected by smatch.
...
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4490 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-27 22:02:33 +00:00
Vladislav Bolkhovitin
bf00973096
scst_lib: Fix a dereference-before-test. Detected by smatch
...
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4489 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-27 22:00:25 +00:00
Vladislav Bolkhovitin
e515f17629
scst: Avoid that smatch complains about dead code
...
Reported by Bart Van Assche <bvanassche@acm.org >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4488 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-27 21:58:49 +00:00
Vladislav Bolkhovitin
7efac456a3
qla2x00t: Remove a superfluous cast
...
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4487 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-27 21:51:10 +00:00
Vladislav Bolkhovitin
dd37831c06
qla2x00t: Keep smatch happy
...
Smatch reports two warnings on the qla2x00t code:
* sess->local being tested while sess can be NULL.
* The code after the out_unreg_target2x label is only necessary in the procfs build.
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4486 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-27 21:50:15 +00:00
Vladislav Bolkhovitin
0ab789c476
scst_local: Remove a superfluous if-test
...
It is not necessary to test whether a pointer is not NULL before invoking
kfree(). Detected by smatch.
From: Bart Van Assche <bvanassche@acm.org >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4485 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-27 21:45:35 +00:00
Vladislav Bolkhovitin
d4e66866b1
scst_vdisk: Remove a superfluous test
...
If the code after the "out_close:" label is reached it is guaranteed that fd != NULL.
Hence remove the if (fd != NULL) test after that label.
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4484 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-27 21:44:30 +00:00
Vladislav Bolkhovitin
a72b347ccf
scst_sysfs: Avoid NULL ptr deref. Fix online documentation
...
Avoid that the PRINT_ERROR() statement that complains about too many parameters
triggers a NULL pointer dereference. Also, fix the online documentation for the
LUN deletion command.
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4483 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-27 21:42:33 +00:00
Vladislav Bolkhovitin
481c90a66b
scst: Add a comment in scst_global_mgmt_thread()
...
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4482 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-27 21:10:09 +00:00
Vladislav Bolkhovitin
eb4f05aafe
This patch addresses a minor stylistic issue: use the value
...
returned by mutex_lock_interruptible() instead of explicitly
assigning -EINTR to res.
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4481 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-27 20:42:58 +00:00
Vladislav Bolkhovitin
6df6692708
scst: Remove a superfluous cast
...
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4480 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-27 20:40:05 +00:00
Vladislav Bolkhovitin
fda632ae0b
iscsi-scst: Eliminate a cast
...
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4479 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-27 20:38:37 +00:00
Vladislav Bolkhovitin
62b0629e6f
scst: Spelling fix - inquery -> inquiry
...
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4478 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-27 20:36:54 +00:00
Bart Van Assche
113524a39d
nightly build: Update kernel versions
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4477 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-27 17:27:27 +00:00
Bart Van Assche
160e3aa799
nightly build: Update kernel versions
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4476 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-27 17:25:53 +00:00
Bart Van Assche
6635cfe307
list-source-files: Process subdirectories correctly
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4475 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-27 17:24:53 +00:00
Mark Buechler
03f3be2ccb
- Add -no_lip option to prevent automatically issueing a LIP after a configuration change.
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4474 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-27 14:38:54 +00:00
Vladislav Bolkhovitin
10c0bc4f65
Retried commands should go to the local exec stage + small logging improvements
...
It is needed, because local commands can also be retried
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4473 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-24 21:15:38 +00:00
Vladislav Bolkhovitin
7b77e66b07
Workaround (leftover?) events after disable iSNS server
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4472 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-24 18:54:35 +00:00
Vladislav Bolkhovitin
19153e3a65
Ensure that generated USN is unique
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4471 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-24 02:15:04 +00:00
Vladislav Bolkhovitin
5b26b06791
We need to abort internal commands as well.
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4470 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-16 19:52:32 +00:00
Vladislav Bolkhovitin
5305d716ea
Web updates
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4469 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-16 01:36:10 +00:00
Vladislav Bolkhovitin
628cbf0ddd
Fix crash on attach an initiator to an empty vcdrom device,
...
then add a "disk" to it via sysfs and then try to read from it from the initiator.
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4468 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-14 19:15:57 +00:00
Vladislav Bolkhovitin
b08cee14bd
Cleanup and minor sysfs entry creation fix
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4467 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-13 22:01:25 +00:00
Bart Van Assche
f090f59a48
nightly build: Reduce noice in smatch output diffs
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4466 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-12 08:44:59 +00:00
Vladislav Bolkhovitin
f0df328198
Microoptimization
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4465 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-11 01:37:07 +00:00
Vladislav Bolkhovitin
0327e15440
Currently there is a possibility that a session name is reused and
...
passed to scst_sess_sysfs_create() before scst_sess_sysfs_del() has
finished removing a kobject that is using the same session name. This
patch fixes that. It works by maintaining yet another session list,
namely a list of sessions registered in sysfs, and by using that list to
check for duplicate session names.
Signed-off-by: Bart Van Assche <bvanassche@acm.org >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4464 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-10 02:02:35 +00:00
Vladislav Bolkhovitin
1b68210cce
Fix possible commands hangs with lockless queuecommand() in scst_local
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4463 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-10 01:48:35 +00:00
Vladislav Bolkhovitin
a95528fb5c
Let's have disk timeouts in sync with most OSes (30 seconds)
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4462 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-09 20:56:11 +00:00
Bart Van Assche
56a6d92109
nightly build: Add kernel version 3.5
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4461 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-09 08:08:15 +00:00
Bart Van Assche
e0f7025708
nightly build: Add kernel 3.5 build infrastructure
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4460 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-09 08:07:26 +00:00
Bart Van Assche
c0e4470677
nightly build: Update kernel versions
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4459 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-09 08:06:53 +00:00
Vladislav Bolkhovitin
5f662059a7
Update for 3.5 kernel
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4458 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-09 02:19:31 +00:00
Vladislav Bolkhovitin
74713a49d2
ha->tgt must be used here instead of sess->tgt
...
Found by smatch, reported by Bart Van Assche <bvanassche@acm.org >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4457 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-08 18:29:10 +00:00
Vladislav Bolkhovitin
cdb13cfc5f
Cleanups
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4456 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-08 18:00:51 +00:00
Bart Van Assche
b958a82132
scst: Fix a recently introduced checkpatch complaint
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4455 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-08 07:02:36 +00:00
Bart Van Assche
46a3540873
scst: Make sure that scst_get_unique_sess_name() is called under scst_mutex
...
such that session names are again guaranteed to be unique (follow-up for r4452).
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4454 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-07 18:06:37 +00:00
Bart Van Assche
239d6243ec
scst: Fix race between closing a session and adding a LUN
...
Fixes this call stack (kernel 3.2.15):
WARNING: at lib/kref.c:34 kref_get+0x2d/0x30()
Hardware name: X8ST3
Modules linked in: scst_vdisk ib_srpt scst
Pid: 2159, comm: scst_uid Tainted: G W 3.2.15-07+ #2
Call Trace:
[<ffffffff81059cba>] warn_slowpath_common+0x7a/0xb0
[<ffffffff81059d05>] warn_slowpath_null+0x15/0x20
[<ffffffff812a5d7d>] kref_get+0x2d/0x30
[<ffffffff812a46ba>] kobject_get+0x1a/0x30
[<ffffffff812a471b>] kobject_add_internal+0x4b/0x240
[<ffffffff812a4bf3>] kobject_init_and_add+0x63/0x90
[<ffffffffa001082b>] ? scst_tgt_dev_setup_threads+0xab/0x310 [scst]
[<ffffffffa001a722>] scst_tgt_dev_sysfs_create+0x42/0x80 [scst]
[<ffffffffa0010e8c>] scst_alloc_add_tgt_dev+0x31c/0x4b0 [scst]
[<ffffffffa001362e>] scst_acg_add_lun+0xfe/0x230 [scst]
[<ffffffff812b4511>] ? _kstrtoull+0x31/0x90
[<ffffffffa001777c>] scst_luns_mgmt_store_work_fn+0x29c/0x6b0 [scst]
[<ffffffffa0019634>] sysfs_work_thread_fn+0xd4/0x2e0 [scst]
[<ffffffff8107a020>] ? wake_up_bit+0x40/0x40
[<ffffffffa0019560>] ? scst_tgt_cpu_mask_show+0x20/0x20 [scst]
[<ffffffff81079ab6>] kthread+0x96/0xa0
[<ffffffff8163d7b4>] kernel_thread_helper+0x4/0x10
[<ffffffff81079a20>] ? kthread_worker_fn+0x190/0x190
[<ffffffff8163d7b0>] ? gs_change+0x13/0x13
Reported-by: Sebastian Riemer <sebastian.riemer@profitbricks.com >
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4453 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-07 17:29:58 +00:00
Bart Van Assche
736b99485d
scst: Move the code for computing a unique session name
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4452 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-07 17:28:34 +00:00
Bart Van Assche
e81d1b552b
nightly build: Factor out shared code into a new function
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4450 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-07 12:00:41 +00:00
Bart Van Assche
8df49947fa
nightly build: Move shell code for listing files under source control into a separate file
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4449 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-07 11:40:09 +00:00
Bart Van Assche
2df95bda26
ib_srpt: Document an additional test
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4448 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-05 09:26:24 +00:00
Bart Van Assche
123911a2c3
ib_srpt: Document impact of interrupt assignment on fairness
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4447 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2012-08-04 14:36:27 +00:00