Commit Graph
2620 Commits
Author SHA1 Message Date
Bart Van Assche a891d6e9ba scst/include/backport.h: Backport more kernel functions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9513 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-09-05 03:29:32 +00:00
Bart Van Assche a0e65bb9c9 scst/include/backport.h: Improve the kernel backports that add support for v5.14
Unbreak the build against kernels v4.10 and older.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9508 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-09-05 02:57:50 +00:00
Bart Van Assche a88053adf5 scst: Port to Linux kernel v5.14
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9506 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-09-03 05:09:57 +00:00
Bart Van Assche 3624c1baaf scst: Open-code the status_byte() macro
The status_byte() macro and also the SAM_STAT_* macros shifted right by one
bit have been removed from kernel v5.14. Hence open-code status_byte() and
change GOOD into SAM_STAT_GOOD etc.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9505 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-09-03 05:05:13 +00:00
Bart Van Assche 6edaec0d40 scst: Make msg_byte() and driver_byte() available when building against v5.14
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9504 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-09-03 05:01:43 +00:00
Bart Van Assche 16f0eb9177 scst: Backport the SCSI functions that are new in kernels v5.14 and v5.15
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9501 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-09-03 04:56:13 +00:00
Bart Van Assche 5e90abb64a scst_copy_mgr: Implement a workaround for non-compliant initiator systems
Reported-by: Eitan Cohen <eitancohen456@gmail.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9498 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-09-01 04:33:22 +00:00
Bart Van Assche 5dd069d3d6 scst: Do not affect weak updates during installation
The code for removing weak updates did not fix the reported issue.
Additionally, that code can remove weak updates that are not related to
SCST. Hence remove the code again that removes weak updates.

Reported-by: Tu, Rongqing <rongqing.tu@hpe.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9493 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-08-20 03:36:16 +00:00
Bart Van Assche c11f216fed scst_copy_mgr: Fix support for auto_cm_assignment=0
Only check whether a LUN has already been registered with the copy manager
for the auto_cm_assignment=1 case since with auto CM assignment disabled
scst_cm_dev_register() is called after the LUN has been registered.

Reported-by: Eitan Cohen <eitancohen456@gmail.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9492 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-08-19 04:15:16 +00:00
Bart Van Assche 6691b60c39 scst: Fix copy manager LUN assignment for auto_cm_assignment=0
The INQUIRY command sent by the copy manager can only succeed if the LUN it
is submitted to exists before the INQUIRY command is sent. Hence this patch
that swaps the order of the scst_cm_on_add_lun() and scst_alloc_add_tgt_dev()
calls in scst_acg_add_lun(). This patch prevents that the INQUIRY commands
submitted by the copy manager fail as follows:

Not supported dev type 7f, ignoring

Reported-by: Eitan Cohen <eitancohen456@gmail.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9491 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-08-19 04:12:36 +00:00
Bart Van Assche 2a775c4231 scst: Port to Linux kernel v5.13
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9472 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-07-02 00:54:43 +00:00
Bart Van Assche 393c65fbf1 scst: Port to CentOS 8.4
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9443 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-06-21 03:23:02 +00:00
Bart Van Assche 1b7fe6422c scst_vdisk: Convert several comments into lockdep_assert_held() statements
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9387 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-05-15 02:33:31 +00:00
Bart Van Assche e7a705fcd8 scst_vdisk, vdisk_blockio: Fix the resync_size functionality
Fixes: https://github.com/bvanassche/scst/issues/36
Fixes: df4c250b8d ("scst_vdisk: Port to Linux kernel v5.11")


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9386 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-05-14 04:54:39 +00:00
Bart Van Assche 5910f8da1e scst: Fix the build against the UEK 8 kernel
Reported-by: Abrakhin Andrey <Abrakhin.A@raidix.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9385 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-04-29 17:47:55 +00:00
Bart Van Assche c5e515b702 Address checkpatch complaints about duplicated words
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9383 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-04-29 03:15:01 +00:00
Bart Van Assche f59fe00eb1 scst: Enable the kernel scheduler in scst_wait_for_tgt_devs()
This patch should fix the following bug:

INFO: rcu_sched self-detected stall on CPU ...
...
scst_wait_for_tgt_devs()

Reported-by: Chesnokov Gleb <Chesnokov.G@raidix.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9381 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-04-14 20:35:40 +00:00
Bart Van Assche 9ad346b84e scst_vdisk: Complete port to Linux kernel v5.12
This is a variant of a patch provided by Mark Ruijter.

Fixes: https://github.com/bvanassche/scst/issues/34


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9380 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-04-14 20:31:39 +00:00
Bart Van Assche 8159ce2531 scst: Suppress a kernel-doc warning
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9378 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-04-14 20:12:20 +00:00
Bart Van Assche 0a6056cc82 scst, scst_vdisk: Revert "Simplify the code for querying the vdisk filename"
Revert this commit since it can cause a deadlock as follows:
- scst_assign_dev_handler() obtains scst_mutex and calls
  scst_devt_dev_sysfs_del(). The scst_remove_files() call in the latter
  function waits until all dev->dev_kobj sysfs callbacks have finished.
- vdev_sysfs_filename_show() obtains a dev->dev_kobj reference.
- vdev_sysfs_process_get_filename() tries to lock scst_mutex but deadlocks
  because scst_assign_dev_handler() is holding scst_mutex.

Fixes: 457d6fceed ("scst, scst_vdisk: Simplify the code for querying the vdisk filename")
Reported-by: Lev Vainblat <lev@zadarastorage.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9375 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-04-13 03:16:09 +00:00
Bart Van Assche a3a78b8013 scst: Port to Linux kernel v5.12
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9373 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-04-07 03:46:01 +00:00
Bart Van Assche 833d83a48f scst: Add support for SERVICE ACTION IN(12)
HP LTO 3 and later and Oracle/STK T10000 tape drives support the READ MEDIA
SERIALNO command, one of the SERVICE ACTION IN(12) commands.

Signed-off-by: Rob Turk <robtu@rtist.nl>
[ bvanassche: wrote patch description ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9367 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-03-23 16:18:03 +00:00
Bart Van Assche ae72c4193b scst_lib: Remove the scst_store_sense() call from scst_process_check_condition()
This patch fixes an inifinite loop. See also
https://sourceforge.net/p/scst/tickets/49/.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9346 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-02-28 03:40:05 +00:00
Bart Van Assche d7bcb43d33 scst_lib: Fix scst_prepare_request_sense()
See also https://sourceforge.net/p/scst/tickets/49/.

Reported-by: Philip Pritchard
Fixes: f16c5d1b2e ("scst: Rework scst_prepare_request_sense()")



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9343 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-02-24 04:42:01 +00:00
Bart Van Assche eb34335f2f scst: Suppress a warning in scst_cm_update_dev()
Suppress the following warning:

WARNING: CPU: 0 PID: 6998 at scst/src/scst_copy_mgr.c:2672 scst_cm_update_dev+0xdc/0x110

This warning can be triggered during unregistration of a virtual device with
the following test case:
1. Change a parameter of the virtual device, e.g. the USN.
2. Delete the LUN.

That triggers the following sequence:
1. vdev_del_device()
2. scst_unregister_virtual_device()
3. scst_acg_del_lun()
4. cancel the work struct associated with vdev_inq_changed_fn().
5. visk_detach()
6. vdev_del_device() finishes.

vdev_inq_changed_fn() may get called after a LUN has been unregistered from
the copy manager and before device deletion finishes.

Reported-by: Gleb Chesnokov <Chesnokov.G@raidix.com>




git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9341 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-02-09 03:42:26 +00:00
Bart Van Assche c522f2448d scst: Increase the maximum READ CAPACITY(16) response buffer size
From the libiscsi source code:

        readcapacity16(sd, &rc16_task, /*alloc_len=*/96, EXPECT_STATUS_GOOD);

Hence increase the limit from 32 to 128.

Fixes: dd467b0eda ("scst: Limit the size of READ CAPACITY buffers")



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9340 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-02-09 03:37:28 +00:00
Bart Van Assche dd467b0eda scst: Limit the size of READ CAPACITY buffers
Fixes: be8b679bb8 ("scst: fix tapes handling with Windows initiators")
Reported-by: James McCarthy <mccarthy1029@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9336 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-01-17 20:31:31 +00:00
Bart Van Assche 94a84adbf7 scst: Micro-optimize the overflow checks in scst_tape_generic_parse()
Use shift operations instead of multiplication operations. See also commit
6258844d60 ("scst: fix overflows handling for tapes").


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9331 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-01-10 01:17:29 +00:00
Bart Van Assche 013aecf10e scst: Fix the PERCPU_REF_ALLOW_REINIT backport
Fixes: 8eeb9af891 ("scst: Fix the CentOS / RHEL 8.[012] builds")


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9329 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-01-10 01:15:01 +00:00
Bart Van Assche 8eeb9af891 scst: Fix the CentOS / RHEL 8.[012] builds
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9328 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-01-08 03:20:42 +00:00
Bart Van Assche 147ced0a55 scst_vdisk: Make vdisk_get_file_size() return 0 upon success
Reported-by: Grant Albitz <GAlbitz@comstar-usa.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9325 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-01-04 21:22:57 +00:00
Bart Van Assche 9aaa0846dc scst: Add support for the READ and WRITE DYN RUNTIME ATTR commands
Signed-off-by: Rob Turk <robtu@rtist.nl>
[ bvanassche: moved get_cdb_info_dyn_runtime_attr() definition ]


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9324 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-01-04 03:59:00 +00:00
Bart Van Assche 427981871e scst_lib: Fix spelling of "SEND DVD STRUCTURE"
Reported-by: Rob Turk <robtu@rtist.nl>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9322 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-01-03 03:20:00 +00:00
Bart Van Assche 1b3d5b60eb scst: Rework the mechanism for suspending activity
Use a percpu_ref instead of one atomic counter per CPU. This patch
eliminates two atomic instructions from the command processing path.
This patch decreases performance for the following configurations
because the backported version of percpu_ref uses a single global
counter:
* RHEL 6.x / CentOS 6.x and before (maintenance ended on 2020-11-30).
* Upstream kernel version v3.10 and before.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9321 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-01-03 02:59:31 +00:00
Bart Van Assche 7f0900b858 scst: Modify the code that decides whether or not to process in tasklet context
Since the next patch will remove cpu_cmd_count, make this decision
independent of cpu_cmd_count.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9320 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-01-03 02:56:01 +00:00
Bart Van Assche cb8c3a4725 scst: Fix percpu-ref reinitialization for RHEL 8 / CentOS 8
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9319 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-01-03 02:54:08 +00:00
Bart Van Assche df4c250b8d scst_vdisk: Port to Linux kernel v5.11
Use blkdev_get_by_path() to open block devices instead of filp_open().


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9318 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-01-03 02:53:36 +00:00
Bart Van Assche 8f2e1df308 scst_vdisk: Use blkdev_get_by_path() to open block devices
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9317 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-01-03 02:52:31 +00:00
Bart Van Assche 616730270b scst: Rework vdisk_get_file_size()
Linux kernel commit 4e7b5671c6a8 ("block: remove i_bdev"; v5.11-rc1) removes
the i_bdev member of struct inode. Hence use blkdev_get_by_path() to open
block devices when the struct block_device pointer is needed instead of using
filp_open().



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9316 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-01-03 02:51:31 +00:00
Bart Van Assche 1c3d35bdab scst_vdisk: Rework vdisk_set_wt() and vcdrom_change()
This patch breaks the transactional properties of these functions but
makes it easier to port these functions to Linux kernel v5.10.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9315 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-01-03 02:48:04 +00:00
Bart Van Assche b474628992 scst_lib: Port to Linux kernel v5.10
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9313 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-01-03 00:40:12 +00:00
Bart Van Assche 116ab5adc3 scst_vdisk: Split several lines that exceed 80 characters
This patch does not change any functionality.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9312 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-01-03 00:38:14 +00:00
Bart Van Assche 10abb160b0 scst_vdisk: Fix trailing whitespace removal code in vcdrom_change()
Stop looking for trailing whitespace when p == buffer. Remove the local
variable 'pp' since it always equals p + 1.

Fixes: f381dbb74c ("Device sysfs locking reconsidered to remove recently introduced deadlock possibility")


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9311 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-01-03 00:37:37 +00:00
Bart Van Assche c0151f6cda Bump the version number to 3.6.0
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9310 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2021-01-02 23:16:59 +00:00
Bart Van Assche e9b7c7e8ff scst_lib: Fix a kernel-doc header
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9308 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-31 22:46:20 +00:00
Bart Van Assche ea7fac484e qla2x00t-32gbit: Backport to older kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9307 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-31 16:59:15 +00:00
Bart Van Assche 7c294b7648 scst/ChangeLog: Mention the qla2x00t-32gbit driver
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9238 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-22 23:53:40 +00:00
Bart Van Assche 71e25520ee scst/Makefile: Remove a superfluous backslash
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9234 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-22 23:46:25 +00:00
Bart Van Assche ed38dccfb4 scst/ChangeLog: Document that RHEL / CentOS 8.3 is supported
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9232 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-22 22:47:05 +00:00
Bart Van Assche d3c92ea7aa Bump the version number to 3.5.0
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9231 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-12-22 03:38:21 +00:00