Commit Graph

7153 Commits

Author SHA1 Message Date
Bart Van Assche
77b72d0901 Merge branch 'svn-trunk' 2019-08-21 17:37:12 -07:00
Bart Van Assche
4aa7817dbb scst_copy_mgr: Avoid that device deletion sporadically causes a hang
Avoid that deleting a device concurrently with scst_cm_init_inq_finish()
causes command processing to hang.

Reported-by: valera <valer4ik@users.sourceforge.net>
Fixes: 0bb6de9471 ("scst_vdisk: Avoid that LUN refresh triggers a general protection fault" / r7101)


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8515 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-08-21 21:34:04 +00:00
Bart Van Assche
456359e129 scst_copy_mgr: Reduce code duplication
This patch does not change the behavior of the copy manager.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8514 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-08-21 21:33:16 +00:00
Bart Van Assche
e9c16240df scst: Improve several source code comments
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8513 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-08-21 21:32:05 +00:00
Bart Van Assche
f16c5d1b2e scst: Rework scst_prepare_request_sense()
This patch makes the implementation of scst_prepare_request_sense() consistent
with the other code that submits internal commands.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8512 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-08-21 21:31:31 +00:00
Bart Van Assche
dd52454052 scst: Introduce struct scst_icmd_priv
This patch does not change any functionality but improves source code
readability.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8511 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-08-21 21:30:39 +00:00
Bart Van Assche
1d5fd792a2 Merge branch 'svn-trunk' 2019-08-18 21:02:14 -07:00
Bart Van Assche
740f3a6e63 scst: Make device deletion again synchronous
Some scripts that use the SCST sysfs interface depend on filp_close()
having been called before device deletion via the sysfs interface
finishes. Hence make device deletion again synchronous.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8510 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-08-19 02:59:18 +00:00
Bart Van Assche
377e720b26 scst: Add a trailing newline when showing the cpu_mask sysfs parameter
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8509 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-08-19 02:58:22 +00:00
Bart Van Assche
414c4895c9 Merge branch 'svn-trunk' 2019-08-16 06:53:48 -07:00
Bart Van Assche
9a4b39b604 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8508 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-08-16 13:53:37 +00:00
Bart Van Assche
59c9780344 ChangeLog: Describe SCST 3.4 changes
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8507 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-08-16 03:19:28 +00:00
Bart Van Assche
a2faaf61b5 Merge branch 'svn-trunk' 2019-08-14 19:39:02 -07:00
Bart Van Assche
cd1a47f85e scst, copy manager: Skip updating if auto CM assignment is disabled
Reported-by: James McCarthy <mccarthy1029@gmail.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8504 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-08-14 23:14:11 +00:00
Bart Van Assche
f2b226ee39 scst, copy manager: Only submit INQUIRY if LUN lookup succeeded
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8503 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-08-14 23:10:53 +00:00
Bart Van Assche
d95bc4a42f Merge branch 'svn-trunk' 2019-08-11 18:41:45 -07:00
Bart Van Assche
c6e8013f48 scst: Only free a device after all associated commands and LUNs have finished
Merge scst_free_device() and scst_finally_free_device() into a single
function. Increase dev->refcnt when registering a device or virtual
device. Kill and decrease dev->refcnt when unregistering a device or
virtual device. These changes ensure that a scst_free_device() is
only called after all users (commands and tgt_devs) have stopped
accessing the SCST device.

Fixes: 3f2d50b589 ("scst: Do not suspend command processing when deleting a device"; r8067)



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8501 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-08-12 01:41:26 +00:00
Bart Van Assche
4e5548c409 scst: Verify dev_exec_cmd_list protection at runtime
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8500 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-08-12 01:39:37 +00:00
Bart Van Assche
2e1d381a3a Merge branch 'svn-trunk' 2019-08-11 11:47:39 -07:00
Bart Van Assche
806b143ce6 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8499 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-08-09 17:31:33 +00:00
Bart Van Assche
5ef7421484 Merge branch 'svn-trunk' 2019-08-09 08:50:58 -07:00
Bart Van Assche
e84417176b nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8498 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-08-07 00:54:47 +00:00
Bart Van Assche
8dcbf965b1 Merge branch 'svn-trunk' 2019-08-04 18:44:44 -07:00
Bart Van Assche
b20c82a521 scst: Complain about unbalanced reference counts in the command processing path
There is no evidence that this is possible. This patch is a debugging help.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8497 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-08-05 01:44:34 +00:00
Bart Van Assche
5da933cc47 scst: Fix a race condition between LUN translation and LUN removal
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8496 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-08-05 01:43:41 +00:00
Bart Van Assche
bb7a0fca23 scst: Introduce scst_tgt_dev_dec_cmd_count()
This patch does not change any functionality.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8495 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-08-05 01:43:03 +00:00
Bart Van Assche
e6eadb58f9 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8494 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-08-04 15:57:43 +00:00
Bart Van Assche
58991f8d29 Merge branch 'svn-trunk' 2019-07-31 07:05:55 -07:00
Bart Van Assche
3f17d52519 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8490 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-07-31 13:55:38 +00:00
Bart Van Assche
8d68eb5e71 Merge branch 'svn-trunk' 2019-07-28 07:44:19 -07:00
Bart Van Assche
6706cdd5f0 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8489 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-07-28 14:39:21 +00:00
Bart Van Assche
0e38eb1bd1 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8488 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-07-26 13:51:21 +00:00
Bart Van Assche
d830650acb Merge branch 'svn-trunk' 2019-07-25 18:26:32 -07:00
Bart Van Assche
d9d4fe83c5 scst: Queue tgt_dev free work on system_long_wq
scst_free_tgt_dev() waits until pending I/O commands have finished and hence
can take a while.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8487 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-07-26 01:26:03 +00:00
Bart Van Assche
84945c057a Merge branch 'svn-trunk' 2019-07-24 21:36:23 -07:00
Bart Van Assche
7c46bc3630 scst: Backport {init,destroy}_rcu_head()
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8484 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-07-25 04:36:15 +00:00
Bart Van Assche
e2723ece23 backport-init-rcu-head 2019-07-25 06:35:25 +02:00
Bart Van Assche
4ff79e00df Merge branch 'svn-trunk' 2019-07-24 21:34:58 -07:00
Bart Van Assche
f623815252 isert-scst: Unbreak the build for kernel versions <= v4.8
Fixes: 36c0648b7e ("isert-scst: Fix the build against kernel v5.3") / r8475.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8482 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-07-25 04:32:38 +00:00
Bart Van Assche
2dd1790c0d Merge branch 'svn-trunk' 2019-07-24 19:13:40 -07:00
Bart Van Assche
92eefa7bb5 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8481 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-07-24 18:19:31 +00:00
Bart Van Assche
ff074f34df Merge branch 'svn-trunk' 2019-07-24 08:35:33 -07:00
Bart Van Assche
5930b4db71 scst: Fix the MOFED build
Reported-by: Dmitry Popovich <dsp@mvdnet.org>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8479 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-07-24 15:33:53 +00:00
Bart Van Assche
55a732e1c2 Merge branch 'svn-trunk' 2019-07-23 19:20:02 -07:00
Bart Van Assche
7426031e91 scst: Free removed LUNs asynchronously
Since scst_free_tgt_dev() is called as soon as the tgt_dev refcount
drops to zero and since scst_del_tgt_dev() decrements that reference
count, remove all scst_free_tgt_dev() calls that follow a
scst_del_tgt_dev() call. Set nr_deleted_tgt_devs in scst_acg_add_lun()
to -1 to avoid that all scst_del_tgt_dev() calls try to free the
associated acg_dev.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8478 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-07-24 02:19:54 +00:00
Bart Van Assche
b7c2952495 Merge branch 'svn-trunk' 2019-07-23 18:17:01 -07:00
Bart Van Assche
cb8873ec0f scst: Micro-optimize scst_del_tgt_dev()
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8477 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-07-24 01:15:19 +00:00
Bart Van Assche
8064fdcf34 scst: Move the code that decrements dev->not_pr_supporting_tgt_devs_num
A later patch will introduce a delay between deleting and freeing a tgt_dev.
Move the code that decrements dev->not_pr_supporting_tgt_devs_num from the
function that frees a tgt_dev into the function that deletes a tgt_dev such
that the decrement code does not get delayed.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8476 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-07-24 01:13:41 +00:00
Bart Van Assche
36c0648b7e isert-scst: Fix the build against kernel v5.3
In kernel v5.3 the ib_destroy_cq() return type has been changed from 'int'
into 'void'.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8475 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-07-24 01:12:06 +00:00
Bart Van Assche
993ee7695e Merge branch 'svn-trunk' 2019-07-23 18:09:32 -07:00