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:
- - It uses full power of SCST core without loosing any existing IET feature (except, maybe, illegal
- from SCSI specifications point of view MPIO). Namely, you can additionally use with it:
+
- It uses full power of SCST core without loosing any existing IET feature.
+ Comparing to IET it has the following additional features:
- Pass-through mode with one to many relationship, i.e. when multiple initiators can connect to the
exported pass-through devices. For instance, you can safely export your parallel
@@ -74,7 +74,7 @@
of BLOCKIO, but also supports files on file systems. Sometimes, in the appropriate cases,
this mode can make performance difference in 100% or even more.
- With 4KB blocks you can forget about abysmal write performance caused by misaligned partitions.
- All modern OS'es, including Windows starting from, at least, Windows 2000, work perfectly with 4KB block
+ All modern OS'es, including Windows starting from Windows 2000, work perfectly with 4KB block
devices without any additional storage or handling overhead.
- Virtual CD/DVD-ROMs without necessity for manual patching.
- Ability to create target devices emulators in the user space.
@@ -94,13 +94,12 @@
- Due to reworked I/O architecture and SCST backend iSCSI-SCST has
better performance in many cases. In future with upcoming improvements in SCST core, like zero-copy
- with Linux cache FILEIO, the performance difference is going to be even bigger. Currently in
- tests from a single initiator over a single connection on 1GbE hardware over FILEIO vdisk
- iSCSI-SCST with default settings usually outperforms tuned for best
- performance IET a on on up to 100%. The difference is especially noticeably with real storage,
- not NULLIO or RAM disks.
- On 10GbE hardware the performance difference is often as high as 100-200% or even more.
- With higher number of initiators the difference will be even bigger. This is because
+ with Linux cache FILEIO, the performance difference is going to be even bigger. For instance, in
+ tests from a single initiator over a single connection on 1GbE hardware using vdisk handler
+ iSCSI-SCST with default settings in many cases outperforms tuned for best
+ performance IET on more than 100%. See
+ those measurements, for example. The difference is especially
+ noticeably with real storage, not NULLIO or RAM disks. This is because
iSCSI-SCST has less commands processing overhead per command, hence has smaller processing
latency and puts less load on CPU.