From: <vl...@us...> - 2008-06-26 16:35:17
|
Revision: 422 http://scst.svn.sourceforge.net/scst/?rev=422&view=rev Author: vlnb Date: 2008-06-26 09:35:10 -0700 (Thu, 26 Jun 2008) Log Message: ----------- Minor cleanups and docs updates Modified Paths: -------------- trunk/AskingQuestions trunk/README trunk/doc/Makefile trunk/doc/scst_pg.sgml trunk/doc/scst_user_spec.txt trunk/iscsi-scst/AskingQuestions trunk/iscsi-scst/README trunk/iscsi-scst/kernel/target.c trunk/iscsi-scst/usr/ctldev.c trunk/qla2x00t/qla2x00-target/AskingQuestions trunk/qla2x00t/qla2x00-target/README trunk/qla2x00t/qla2x00-target/qla2x00t.c trunk/scst/AskingQuestions trunk/scst/README trunk/scst/src/scst_main.c Modified: trunk/AskingQuestions =================================================================== --- trunk/AskingQuestions 2008-06-26 11:52:09 UTC (rev 421) +++ trunk/AskingQuestions 2008-06-26 16:35:10 UTC (rev 422) @@ -313,4 +313,7 @@ Also it is very desirable if you attach to your question full kernel log from target since it's booted. +If you experience kernel crash, hang, etc., you should follow +REPORTING-BUGS file from your kernel source tree. + Vladislav Bolkhovitin <vs...@vl...>, http://scst.sourceforge.net Modified: trunk/README =================================================================== --- trunk/README 2008-06-26 11:52:09 UTC (rev 421) +++ trunk/README 2008-06-26 16:35:10 UTC (rev 422) @@ -4,12 +4,14 @@ 1. SCST core in scst/ subdirectory -2. Target drivers in own subdirectories qla2x00t/, iscsi-scst/, etc. +2. Administration utility for SCST core scstadmin in scstadmin/ -3. User space programs in usr/ subdirectory, like fileio_tgt. +3. Target drivers in own subdirectories qla2x00t/, iscsi-scst/, etc. -4. Some various docs in doc/ subdirectory. +4. User space programs in usr/ subdirectory, like fileio_tgt. +5. Some various docs in doc/ subdirectory. + Those subprojects are in most cases independent from each other, although some of them depend from the SCST core. They put in the single repository only to simplify their development, they are released Modified: trunk/doc/Makefile =================================================================== --- trunk/doc/Makefile 2008-06-26 11:52:09 UTC (rev 421) +++ trunk/doc/Makefile 2008-06-26 16:35:10 UTC (rev 422) @@ -54,7 +54,9 @@ $(COMMAND)rtf $(SOURCE) clean: + @mv scst_user_spec.txt scst_user_spec.tx rm -f *.txt *.html *.tex *.dvi *.ps *.pdf *.info *.lyx *.rtf + @mv scst_user_spec.tx scst_user_spec.txt extraclean: clean Modified: trunk/doc/scst_pg.sgml =================================================================== --- trunk/doc/scst_pg.sgml 2008-06-26 11:52:09 UTC (rev 421) +++ trunk/doc/scst_pg.sgml 2008-06-26 16:35:10 UTC (rev 422) @@ -5,7 +5,7 @@ <title>Generic SCSI Target Middle Level for Linux</title> <author> - <name>Vladislav Bolkhovitin <<tt/vst @at@ vlnb .dot. net/></name> + <name>Vladislav Bolkhovitin</name> </author> <date>Version 0.9.5 2006/12/01, actual for SCST 0.9.5 and later</date> @@ -39,8 +39,8 @@ <item> Undertakes most problems, related to execution contexts, thus practically eliminating one of the most complicated problem in the -kernel drivers development. For example, a target driver for Qlogic -2200/2300 cards, which has all necessary features, is about 2000 +kernel drivers development. For example, a target driver for QLogic +22xx/23xx cards, which has all necessary features, is about 2000 lines of code long, that is at least in several times less, than the initiator one. Modified: trunk/doc/scst_user_spec.txt =================================================================== --- trunk/doc/scst_user_spec.txt 2008-06-26 11:52:09 UTC (rev 421) +++ trunk/doc/scst_user_spec.txt 2008-06-26 16:35:10 UTC (rev 422) @@ -872,3 +872,5 @@ Then, if no more 4K commands come for some time, for it SCST_USER_ON_CACHED_MEM_FREE subcommand will be returned to the VTL in order to ask it to free that buffer. + +Vladislav Bolkhovitin Modified: trunk/iscsi-scst/AskingQuestions =================================================================== --- trunk/iscsi-scst/AskingQuestions 2008-06-26 11:52:09 UTC (rev 421) +++ trunk/iscsi-scst/AskingQuestions 2008-06-26 16:35:10 UTC (rev 422) @@ -313,4 +313,7 @@ Also it is very desirable if you attach to your question full kernel log from target since it's booted. +If you experience kernel crash, hang, etc., you should follow +REPORTING-BUGS file from your kernel source tree. + Vladislav Bolkhovitin <vs...@vl...>, http://scst.sourceforge.net Modified: trunk/iscsi-scst/README =================================================================== --- trunk/iscsi-scst/README 2008-06-26 11:52:09 UTC (rev 421) +++ trunk/iscsi-scst/README 2008-06-26 16:35:10 UTC (rev 422) @@ -111,7 +111,8 @@ ISCSI parameters like iSNS, CHAP and target parameters are configured in iscsi-scstd.conf. All LUN information is configured using the regular -SCST interface. The LUN information in iscsi-scstd.conf will be ignored. +SCST interface. It is highly recommended to use scstadmin utility for +that purpose. The LUN information in iscsi-scstd.conf will be ignored. This is because now responsibilities are divided (as it should be) between the target driver (iSCSI-SCST) and the SCST core as it logically should be: the target driver is responsible for handling targets and Modified: trunk/iscsi-scst/kernel/target.c =================================================================== --- trunk/iscsi-scst/kernel/target.c 2008-06-26 11:52:09 UTC (rev 421) +++ trunk/iscsi-scst/kernel/target.c 2008-06-26 16:35:10 UTC (rev 422) @@ -223,7 +223,7 @@ TRACE_MGMT_DBG("%s", "Deleting all targets"); - /* Complete brain damage, ToDo */ + /* Not the best, ToDo */ while (1) { mutex_lock(&target_mgmt_mutex); Modified: trunk/iscsi-scst/usr/ctldev.c =================================================================== --- trunk/iscsi-scst/usr/ctldev.c 2008-06-26 11:52:09 UTC (rev 421) +++ trunk/iscsi-scst/usr/ctldev.c 2008-06-26 16:35:10 UTC (rev 422) @@ -144,10 +144,6 @@ return err; } -/** - ** ToDo: the below code is a brain damage, rewrite it. - **/ - static int __conn_close(int fd, u32 tid, u64 sid, u32 cid, void *arg) { return ki->conn_destroy(tid, sid, cid); Modified: trunk/qla2x00t/qla2x00-target/AskingQuestions =================================================================== --- trunk/qla2x00t/qla2x00-target/AskingQuestions 2008-06-26 11:52:09 UTC (rev 421) +++ trunk/qla2x00t/qla2x00-target/AskingQuestions 2008-06-26 16:35:10 UTC (rev 422) @@ -313,4 +313,7 @@ Also it is very desirable if you attach to your question full kernel log from target since it's booted. +If you experience kernel crash, hang, etc., you should follow +REPORTING-BUGS file from your kernel source tree. + Vladislav Bolkhovitin <vs...@vl...>, http://scst.sourceforge.net Modified: trunk/qla2x00t/qla2x00-target/README =================================================================== --- trunk/qla2x00t/qla2x00-target/README 2008-06-26 11:52:09 UTC (rev 421) +++ trunk/qla2x00t/qla2x00-target/README 2008-06-26 16:35:10 UTC (rev 422) @@ -13,7 +13,7 @@ only. Mode, when a host acts as the initiator and the target simultaneously, is supported as well. -This version is compatible with SCST version 1.0.0 and higher. +This version is compatible with SCST core version 1.0.0 and higher. The original initiator driver was taken from the kernel 2.6.17.8. @@ -62,12 +62,18 @@ /lib/modules/`you_kernel_version`/extra. To uninstall it, type 'make uninstall'. -After the drivers are loaded, the target mode should be enabled via a -sysfs interface on a per card basis. Under the appropriate scsi_host -there is an entry target_mode_enabled, where you should write "1", like: +After the drivers are loaded and adapters successfully initialized by +the initiator driver, including firmware image load, the target mode +should be enabled via a sysfs interface on a per card basis. Under the +appropriate scsi_host there is an entry target_mode_enabled, where you +should write "1", like: echo "1" >/sys/class/scsi_host/host0/target_mode_enabled +Then you should configure exported devices using the corresponding +interface of SCST core. It is highly recommended to use scstadmin +utility for that purpose. + Compilation options ------------------- Modified: trunk/qla2x00t/qla2x00-target/qla2x00t.c =================================================================== --- trunk/qla2x00t/qla2x00-target/qla2x00t.c 2008-06-26 11:52:09 UTC (rev 421) +++ trunk/qla2x00t/qla2x00-target/qla2x00t.c 2008-06-26 16:35:10 UTC (rev 422) @@ -176,7 +176,7 @@ /* ha->hardware_lock supposed to be held on entry */ static void __q2t_send_notify_ack(scsi_qla_host_t *ha, uint16_t target_id, uint16_t status, uint16_t task_flags, - uint16_t seq_id, uint32_t add_flags, uint16_t resp_code, + uint16_t seq_id, uint32_t add_flags, uint16_t resp_code, int resp_code_valid, uint16_t ox_id) { nack_entry_t *ntfy; Modified: trunk/scst/AskingQuestions =================================================================== --- trunk/scst/AskingQuestions 2008-06-26 11:52:09 UTC (rev 421) +++ trunk/scst/AskingQuestions 2008-06-26 16:35:10 UTC (rev 422) @@ -313,4 +313,7 @@ Also it is very desirable if you attach to your question full kernel log from target since it's booted. +If you experience kernel crash, hang, etc., you should follow +REPORTING-BUGS file from your kernel source tree. + Vladislav Bolkhovitin <vs...@vl...>, http://scst.sourceforge.net Modified: trunk/scst/README =================================================================== --- trunk/scst/README 2008-06-26 11:52:09 UTC (rev 421) +++ trunk/scst/README 2008-06-26 16:35:10 UTC (rev 422) @@ -95,6 +95,9 @@ are seen remotely. There must be LUN 0 in each security group, i.e. LUs numeration must not start from, e.g., 1. +It is highly recommended to use scstadmin utility for configuring +devices and security groups. + If you experience problems during modules load or running, check your kernel logs (or run dmesg command for the few most recent messages). @@ -343,19 +346,23 @@ ------------------------------------------------------ Access and devices visibility management allows for an initiator or -group of initiators to have different limited set of LUs/LUNs (security -group) each with appropriate access permissions. Initiator is -represented as a SCST session. Session is bound to security group on its -registration time by character "name" parameter of the registration -function, which provided by target driver, based on its internal -authentication. For example, for FC "name" could be WWN or just loop ID. -For iSCSI this could be iSCSI login credentials or iSCSI initiator name. -Each security group has set of names assigned to it by system -administrator. Session is bound to security group with provided name. If -no such groups found, the session bound to either "Default_target_name", -or "Default" group, depending from either "Default_target_name" exists -or not. In "Default_target_name" target name means name of the target. +group of initiators to have different views of LUs/LUNs (security groups) +each with appropriate access permissions. It is highly recommended to +use scstadmin utility for that purpose instead of described in this +section low level interface. +Initiator is represented as an SCST session. The session is bound to +security group on its registration time by character "name" parameter of +the registration function, which provided by target driver, based on its +internal authentication. For example, for FC "name" could be WWN or just +loop ID. For iSCSI this could be iSCSI login credentials or iSCSI +initiator name. Each security group has set of names assigned to it by +system administrator. Session is bound to security group with provided +name. If no such groups found, the session bound to either +"Default_target_name", or "Default" group, depending from either +"Default_target_name" exists or not. In "Default_target_name" target +name means name of the target. + In /proc/scsi_tgt each group represented as "groups/GROUP_NAME/" subdirectory. In it there are files "devices" and "names". File "devices" lists all devices and their LUNs in the group, file "names" Modified: trunk/scst/src/scst_main.c =================================================================== --- trunk/scst/src/scst_main.c 2008-06-26 11:52:09 UTC (rev 421) +++ trunk/scst/src/scst_main.c 2008-06-26 16:35:10 UTC (rev 422) @@ -497,15 +497,19 @@ * reference counting? That would mean to switch off from lockless * implementation of scst_translate_lun().. ) */ - PRINT_INFO("Waiting for %d active commands to complete... This might " - "take few minutes for disks or few hours for tapes, if you " - "use long executed commands, like REWIND or FORMAT. In case, " - "if you have a hung user space device (i.e. made using " - "scst_user module) not responding to any commands, if might " - "take virtually forever until the corresponding user space " - "program recovers and starts responding or gets killed.", - atomic_read(&scst_cmd_count)); + if (atomic_read(&scst_cmd_count) != 0) { + PRINT_INFO("Waiting for %d active commands to complete... This " + "might take few minutes for disks or few hours for " + "tapes, if you use long executed commands, like " + "REWIND or FORMAT. In case, if you have a hung user " + "space device (i.e. made using scst_user module) not " + "responding to any commands, if might take virtually " + "forever until the corresponding user space " + "program recovers and starts responding or gets " + "killed.", atomic_read(&scst_cmd_count)); + } + res = scst_susp_wait(interruptible); if (res != 0) goto out_clear; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |