From 2580e6b17fcb34156cf14fde885ea362445ad588 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Wed, 1 Apr 2009 12:12:41 +0000 Subject: [PATCH] Merge with 1.0.1.x r731: Docs updated. Changes in iscsi-scst/doc/iscsi-scst-howto.txt made by Bart Van Assche git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@732 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- doc/scst_user_spec.txt | 53 ++++++++++++++++++++++++++--- iscsi-scst/doc/iscsi-scst-howto.txt | 2 ++ www/target_iscsi.html | 21 ++++++------ 3 files changed, 60 insertions(+), 16 deletions(-) diff --git a/doc/scst_user_spec.txt b/doc/scst_user_spec.txt index a7e0e369f..97ea7a8ff 100644 --- a/doc/scst_user_spec.txt +++ b/doc/scst_user_spec.txt @@ -124,6 +124,9 @@ struct scst_user_opt uint8_t queue_alg; uint8_t tas; uint8_t swp; + uint8_t d_sense; + + uint8_t has_own_order_mgmt; }, where: @@ -192,8 +195,13 @@ where: * SCST_USER_PARTIAL_TRANSFERS_SUPPORTED - the partial data transfers are supported without limitations. - - tst, queue_alg, tas and swp - set values for TST, QUEUE ALGORITHM MODIFIER, - TAS and SWP fields from control mode page correspondingly, see SPC. + - tst, queue_alg, tas, swp, d_sense - set values for TST, QUEUE ALGORITHM MODIFIER, + TAS, SWP and D_SENSE fields from control mode page correspondingly, + see SPC. + + - has_own_order_mgmt - true, if the user space handler has full + commands execution order management, i.e. guarantees commands execution + order as required by SAM. False otherwise. Flags parse_type and on_free_cmd_type are designed to improve performance by eliminating context switches to the user space handler, @@ -328,7 +336,8 @@ struct scst_user_scsi_cmd_parse uint64_t sess_h; uint8_t cdb[SCST_MAX_CDB_SIZE]; - int32_t cdb_len; + uint16_t cdb_len; + uint16_t ext_cdb_len; uint32_t timeout; int32_t bufflen; @@ -351,6 +360,9 @@ where: - cdb_len - SCSI CDB length + - ext_cdb_len - size of extended CDB, see SCST_USER_GET_EXTENDED_CDB + for more details + - timeout - CDB execution timeout - bufflen - command's buffer length @@ -403,7 +415,8 @@ struct scst_user_scsi_cmd_alloc_mem uint64_t sess_h; uint8_t cdb[SCST_MAX_CDB_SIZE]; - int32_t cdb_len; + uint16_t cdb_len; + uint16_t ext_cdb_len; int32_t alloc_len; @@ -421,6 +434,9 @@ where: - cdb_len - SCSI CDB length + - ext_cdb_len - size of extended CDB, see SCST_USER_GET_EXTENDED_CDB + for more details + - alloc_len - command's buffer length - queue_type - SCSI task attribute (queue type ) @@ -508,7 +524,8 @@ struct scst_user_scsi_cmd_exec uint64_t sess_h; uint8_t cdb[SCST_MAX_CDB_SIZE]; - int32_t cdb_len; + uint16_t cdb_len; + uint16_t ext_cdb_len; int32_t data_len; int32_t bufflen; @@ -534,6 +551,9 @@ where: - cdb_len - SCSI CDB length + - ext_cdb_len - size of extended CDB, see SCST_USER_GET_EXTENDED_CDB + for more details + - data_len - command's data length. Could be different from bufflen for commands like VERIFY, which transfer different amount of data, than process, or even none of them @@ -843,6 +863,29 @@ SCST_USER_DEVICE_CAPACITY_CHANGED returns 0 on success or -1 in case of error, and errno is set appropriately. + 8. SCST_USER_GET_EXTENDED_CDB + +SCST_USER_GET_EXTENDED_CDB - requests extended CDB, if CDB size is more +than SCST_MAX_CDB_SIZE bytes. In this case SCST_USER_GET_EXTENDED_CDB +returns additional CDB data beyond SCST_MAX_CDB_SIZE bytes. + +SCST_USER_GET_EXTENDED_CDB has the following arguments: + +struct scst_user_get_ext_cdb { + uint32_t cmd_h; + aligned_u64 ext_cdb_buffer; +}, + +where: + + - cmd_h - command handle used to identify the command in the reply. + + - ext_cdb_buffer - pointer to buffer, where extended CDB will be copied. + +SCST_USER_GET_EXTENDED_CDB returns 0 on success or -1 in case of error, +and errno is set appropriately. + + IV. Commands processing flow example. As the example consider a simple synchronous VTL, which serves one diff --git a/iscsi-scst/doc/iscsi-scst-howto.txt b/iscsi-scst/doc/iscsi-scst-howto.txt index 0243ffb91..dff140f1a 100644 --- a/iscsi-scst/doc/iscsi-scst-howto.txt +++ b/iscsi-scst/doc/iscsi-scst-howto.txt @@ -80,6 +80,8 @@ Replace the device names by names that apply to your system: scstadmin -ClearConfig /etc/scst.conf scstadmin -adddev disk01 -path /dev/ram0 -handler vdisk -options NV_CACHE scstadmin -adddev disk02 -path /dev/ram1 -handler vdisk -options NV_CACHE + scstadmin -assigndev disk01 -group Default -lun 0 + scstadmin -assigndev disk02 -group Default -lun 0 scstadmin -WriteConfig /etc/scst.conf cat /etc/scst.conf diff --git a/www/target_iscsi.html b/www/target_iscsi.html index 67880e970..ae971484a 100644 --- a/www/target_iscsi.html +++ b/www/target_iscsi.html @@ -57,10 +57,10 @@ which doesn't touch the core code, could be merged, it is very unlikely that they will be merged in the main IET trunk.

-

ISCSI-SCST has the following major advantages over the mainline IET: +

ISCSI-SCST has the following major advantages over IET: