diff --git a/scst/README b/scst/README index 11223a1b0..5defe8743 100644 --- a/scst/README +++ b/scst/README @@ -420,6 +420,31 @@ IMPORTANT: Since data in BLOCKIO and FILEIO modes are not consistent between ========= them, if you try to use a device in both those modes simultaneously, you will almost instantly corrupt your data on that device. +Pass-through mode +----------------- + +As any other hardware, a local SCSI hardware for devices on target, +which are exported in the pass-through mode, can not handle commands +with amount of data and/or segments count in scatter-gather array +bigger, than some values. Therefore, when using the pass-through mode +you should note that the corresponding values on the corresponding +devices on initiators can not be bigger, than values, which the hardware +on the target can support. Otherwise you will see symptoms like small +transfers work well, but large ones stall and messages like: "Unable to +complete command due to SG IO count limitation" are printed in the +kernel logs. + +You can't control from the user space limit of the scatter-gather +segments, but for block devices usually it is sufficient if you set on +the initiator /sys/block/DEVICE_NAME/queue/max_sectors_kb in the same or +lower value as in /sys/block/DEVICE_NAME/queue/max_hw_sectors_kb for the +corresponding device on the target. + +For not-block devices SCSI commands are usually generated directly by +applications, so, if you experience large transfers stalls, you should +check documentation for your application how to limit the transfer +sizes. + Performance ----------- diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index 925a7507a..1f96800fa 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -1669,8 +1669,8 @@ static int vdisk_fsync(struct scst_vdisk_thr *thr, int res = 0; struct scst_vdisk_dev *virt_dev = thr->virt_dev; struct file *file = thr->fd; - struct inode *inode = file->f_dentry->d_inode; - struct address_space *mapping = file->f_mapping; + struct inode *inode; + struct address_space *mapping; TRACE_ENTRY(); @@ -1680,6 +1680,9 @@ static int vdisk_fsync(struct scst_vdisk_thr *thr, virt_dev->nullio) goto out; + inode = file->f_dentry->d_inode; + mapping = file->f_mapping; + res = sync_page_range(inode, mapping, loff, len); if (unlikely(res != 0)) { PRINT_ERROR_PR("sync_page_range() failed (%d)", res); diff --git a/scst/src/scst_targ.c b/scst/src/scst_targ.c index 8b8181b96..08aa15fa0 100644 --- a/scst/src/scst_targ.c +++ b/scst/src/scst_targ.c @@ -655,7 +655,7 @@ prep_done: } if (unlikely(test_bit(SCST_CMD_ABORTED, &cmd->cmd_flags))) { - TRACE_DBG("ABORTED set, returning ABORTED for " + TRACE_MGMT_DBG("ABORTED set, returning ABORTED for " "cmd %p", cmd); cmd->state = SCST_CMD_STATE_DEV_DONE; res = SCST_CMD_STATE_RES_CONT_SAME; @@ -822,7 +822,7 @@ static int scst_rdy_to_xfer(struct scst_cmd *cmd) TRACE_ENTRY(); if (unlikely(test_bit(SCST_CMD_ABORTED, &cmd->cmd_flags))) { - TRACE_DBG("ABORTED set, aborting cmd %p", cmd); + TRACE_MGMT_DBG("ABORTED set, aborting cmd %p", cmd); goto out_dev_done; } @@ -1634,7 +1634,7 @@ static int scst_do_send_to_midlev(struct scst_cmd *cmd) smp_mb__after_set_bit(); if (unlikely(test_bit(SCST_CMD_ABORTED, &cmd->cmd_flags))) { - TRACE_DBG("ABORTED set, aborting cmd %p", cmd); + TRACE_MGMT_DBG("ABORTED set, aborting cmd %p", cmd); goto out_aborted; } @@ -1769,7 +1769,7 @@ void scst_inc_expected_sn(struct scst_tgt_dev *tgt_dev, atomic_t *slot) /* Optimized for lockless fast path */ - TRACE_SN("Slot %d, *cur_sn_slot %d", slot-tgt_dev->sn_slots, + TRACE_SN("Slot %d, *cur_sn_slot %d", slot - tgt_dev->sn_slots, atomic_read(slot)); if (!atomic_dec_and_test(slot)) @@ -2913,7 +2913,9 @@ int scst_cmd_thread(void *arg) TRACE_ENTRY(); +#if 0 set_user_nice(current, 10); +#endif current->flags |= PF_NOFREEZE; spin_lock_irq(&p_cmd_lists->cmd_list_lock); @@ -3694,7 +3696,7 @@ static void scst_mgmt_cmd_send_done(struct scst_mgmt_cmd *mcmd) TRACE_DBG("Calling target %s task_mgmt_fn_done()", mcmd->sess->tgt->tgtt->name); mcmd->sess->tgt->tgtt->task_mgmt_fn_done(mcmd); - TRACE_MGMT_DBG("Dev handler %s task_mgmt_fn_done() returned", + TRACE_MGMT_DBG("Target's %s task_mgmt_fn_done() returned", mcmd->sess->tgt->tgtt->name); } diff --git a/www/scst_page.html b/www/scst_page.html index 168867173..8e519ebc3 100644 --- a/www/scst_page.html +++ b/www/scst_page.html @@ -126,11 +126,11 @@ work on any other supported by Linux platform. More detail information you could find in the project's README file.

-

Starting from version 0.9.4 2.4 Linux +Starting from version 0.9.4 2.4 Linux kernels are not supported anymore, although there could be new SCST releases for those kernels with very important bug fixes. The latest stable -version of SCST with 2.4 kernels support is 0.9.3.1-24.

+version of SCST with 2.4 kernels support is 0.9.3.1-24.

If you have any questions you can ask them on the SCST SF.net page either using forum, or scst-devel mailing list.
@@ -146,10 +146,13 @@ Some nice SCST call graphs, created by Ming Zhang: scst_cmd_thread, scst_mgmt_cmd_thread, scst_mgmt_thread
-

The latest development versions of SCST and its drivers are +

The latest development version of SCST and target drivers is available directly from the -project's SVN. You can access it using either web-based SVN +project's SVN. The SCST release policy is to make stable releases +twice a year, with the only exception if the current stable version +contains a critical bug. Therefore on practice the development version +is usually more stable, than the "stable" one. You can access it using +either web-based SVN repository viewer or using anonymous access:

svn co https://svn.sourceforge.net/svnroot/scst

@@ -210,6 +213,14 @@ alpha stage and available from the

+

SCSI RDMA Protocol (SRP) Target driver

+

SCSI RDMA Protocol (SRP) Target driver is developed +independently from SCST team. You can find instructions how to download +and install it on this page: http://lists.openfabrics.org/pipermail/iwg/2007-March/000378.html
+
+

+

Old target driver for Qlogic 2200/2300 cards

Old target driver for Qlogic @@ -233,6 +244,9 @@ works also on 2.6 kernels, see README file for details. Tested on i386 only, but should work on any other supported by Linux platform.

+Currently it is not supported and listed here for historical reasons +only.
+
Download
Change Log @@ -270,6 +284,9 @@ built-in scsi_target remains available as a compile-time option.
Requires Linux kernel versions 2.4.20 or higher or 2.6.7 or higher and SCST version 0.9.2 or higher.

+Currently it is not supported and listed here for historical reasons +only.
+
Download