From: <vl...@us...> - 2007-08-15 10:34:56
|
Revision: 162 http://scst.svn.sourceforge.net/scst/?rev=162&view=rev Author: vlnb Date: 2007-08-15 02:28:54 -0700 (Wed, 15 Aug 2007) Log Message: ----------- The initial commit of iSCSI-SCST Modified Paths: -------------- trunk/Makefile Added Paths: ----------- trunk/iscsi-scst/ trunk/iscsi-scst/COPYING trunk/iscsi-scst/ChangeLog trunk/iscsi-scst/ChangeLog-IET trunk/iscsi-scst/Makefile trunk/iscsi-scst/README trunk/iscsi-scst/README-IET trunk/iscsi-scst/ToDo trunk/iscsi-scst/doc/ trunk/iscsi-scst/doc/manpages/ trunk/iscsi-scst/doc/manpages/iscsi-scst-adm.8 trunk/iscsi-scst/doc/manpages/iscsi-scstd.8 trunk/iscsi-scst/doc/manpages/iscsi-scstd.conf.5 trunk/iscsi-scst/etc/ trunk/iscsi-scst/etc/initd/ trunk/iscsi-scst/etc/initd/initd trunk/iscsi-scst/etc/initd/initd.debian trunk/iscsi-scst/etc/initd/initd.gentoo trunk/iscsi-scst/etc/initd/initd.redhat trunk/iscsi-scst/etc/initiators.allow trunk/iscsi-scst/etc/initiators.deny trunk/iscsi-scst/etc/iscsi-scstd.conf trunk/iscsi-scst/include/ trunk/iscsi-scst/include/iscsi_u.h trunk/iscsi-scst/kernel/ trunk/iscsi-scst/kernel/Makefile trunk/iscsi-scst/kernel/config.c trunk/iscsi-scst/kernel/conn.c trunk/iscsi-scst/kernel/digest.c trunk/iscsi-scst/kernel/digest.h trunk/iscsi-scst/kernel/event.c trunk/iscsi-scst/kernel/iscsi.c trunk/iscsi-scst/kernel/iscsi.h trunk/iscsi-scst/kernel/iscsi_dbg.h trunk/iscsi-scst/kernel/iscsi_hdr.h trunk/iscsi-scst/kernel/nthread.c trunk/iscsi-scst/kernel/param.c trunk/iscsi-scst/kernel/patches/ trunk/iscsi-scst/kernel/patches/put_page_callback-2.6.16.patch trunk/iscsi-scst/kernel/patches/put_page_callback-2.6.18.patch trunk/iscsi-scst/kernel/patches/put_page_callback-2.6.21.patch trunk/iscsi-scst/kernel/patches/put_page_callback-2.6.22.patch trunk/iscsi-scst/kernel/session.c trunk/iscsi-scst/kernel/target.c trunk/iscsi-scst/usr/ trunk/iscsi-scst/usr/Makefile trunk/iscsi-scst/usr/chap.c trunk/iscsi-scst/usr/config.h trunk/iscsi-scst/usr/conn.c trunk/iscsi-scst/usr/ctldev.c trunk/iscsi-scst/usr/event.c trunk/iscsi-scst/usr/iscsi_adm.c trunk/iscsi-scst/usr/iscsi_adm.h trunk/iscsi-scst/usr/iscsi_hdr.h trunk/iscsi-scst/usr/iscsi_scstd.c trunk/iscsi-scst/usr/iscsid.c trunk/iscsi-scst/usr/iscsid.h trunk/iscsi-scst/usr/isns.c trunk/iscsi-scst/usr/isns_proto.h trunk/iscsi-scst/usr/log.c trunk/iscsi-scst/usr/message.c trunk/iscsi-scst/usr/misc.h trunk/iscsi-scst/usr/param.c trunk/iscsi-scst/usr/param.h trunk/iscsi-scst/usr/plain.c trunk/iscsi-scst/usr/session.c trunk/iscsi-scst/usr/target.c trunk/iscsi-scst/usr/types.h Modified: trunk/Makefile =================================================================== --- trunk/Makefile 2007-08-14 17:08:43 UTC (rev 161) +++ trunk/Makefile 2007-08-15 09:28:54 UTC (rev 162) @@ -24,22 +24,28 @@ LSI_DIR=mpt USR_DIR=usr/fileio +ISCSI_DIR=iscsi-scst +#ISCSI_DISTDIR=../../../../iscsi_scst_inst + all: cd $(SCST_DIR) && $(MAKE) $@ @if [ -d $(QLA_DIR) ]; then cd $(QLA_DIR) && $(MAKE) $@; fi # @if [ -d $(LSI_DIR) ]; then cd $(LSI_DIR) && $(MAKE) $@; fi + @if [ -d $(ISCSI_DIR) ]; then cd $(ISCSI_DIR) && $(MAKE) $@; fi @if [ -d $(USR_DIR) ]; then cd $(USR_DIR) && $(MAKE) $@; fi install: cd $(SCST_DIR) && $(MAKE) $@ @if [ -d $(QLA_DIR) ]; then cd $(QLA_DIR) && $(MAKE) $@; fi # @if [ -d $(LSI_DIR) ]; then cd $(LSI_DIR) && $(MAKE) $@; fi + @if [ -d $(ISCSI_DIR) ]; then cd $(ISCSI_DIR) && $(MAKE) DISTDIR=$(ISCSI_DISTDIR) $@; fi @if [ -d $(USR_DIR) ]; then cd $(USR_DIR) && $(MAKE) $@; fi uninstall: cd $(SCST_DIR) && $(MAKE) $@ @if [ -d $(QLA_DIR) ]; then cd $(QLA_DIR) && $(MAKE) $@; fi @if [ -d $(LSI_DIR) ]; then cd $(LSI_DIR) && $(MAKE) $@; fi + @if [ -d $(ISCSI_DIR) ]; then cd $(ISCSI_DIR) && $(MAKE) $@; fi @if [ -d $(USR_DIR) ]; then cd $(USR_DIR) && $(MAKE) $@; fi clean: @@ -47,6 +53,7 @@ @if [ -d $(QLA_INI_DIR) ]; then cd $(QLA_INI_DIR) && $(MAKE) $@; fi @if [ -d $(QLA_DIR) ]; then cd $(QLA_DIR) && $(MAKE) $@; fi @if [ -d $(LSI_DIR) ]; then cd $(LSI_DIR) && $(MAKE) $@; fi + @if [ -d $(ISCSI_DIR) ]; then cd $(ISCSI_DIR) && $(MAKE) $@; fi @if [ -d $(USR_DIR) ]; then cd $(USR_DIR) && $(MAKE) $@; fi extraclean: @@ -54,6 +61,7 @@ @if [ -d $(QLA_INI_DIR) ]; then cd $(QLA_INI_DIR) && $(MAKE) $@; fi @if [ -d $(QLA_DIR) ]; then cd $(QLA_DIR) && $(MAKE) $@; fi @if [ -d $(LSI_DIR) ]; then cd $(LSI_DIR) && $(MAKE) $@; fi + @if [ -d $(ISCSI_DIR) ]; then cd $(ISCSI_DIR) && $(MAKE) $@; fi @if [ -d $(USR_DIR) ]; then cd $(USR_DIR) && $(MAKE) $@; fi scst: @@ -88,6 +96,21 @@ cd $(QLA_INI_DIR)/.. && $(MAKE) extraclean cd $(QLA_DIR) && $(MAKE) extraclean +iscsi: + cd $(ISCSI_DIR) && $(MAKE) + +iscsi_install: + cd $(ISCSI_DIR) && $(MAKE) install + +iscsi_uninstall: + cd $(ISCSI_DIR) && $(MAKE) uninstall + +iscsi_clean: + cd $(ISCSI_DIR) && $(MAKE) clean + +iscsi_extraclean: + cd $(ISCSI_DIR) && $(MAKE) extraclean + lsi: cd $(LSI_DIR) && $(MAKE) @@ -137,6 +160,12 @@ @echo " qla_install : 2.6 qla target: install" @echo " qla_uninstall : 2.6 qla target: uninstall" @echo "" + @echo " iscsi : make new ISCSI target" + @echo " iscsi_clean : ISCSI target: clean " + @echo " iscsi_extraclean : ISCSI target: clean + clean dependencies" + @echo " iscsi_install : ISCSI target: install" + @echo " iscsi_uninstall : ISCSI target: uninstall" + @echo "" @echo " lsi : make lsi target" @echo " lsi_clean : lsi target: clean " @echo " lsi_extraclean : lsi target: clean + clean dependencies" @@ -154,5 +183,6 @@ .PHONY: all install uninstall clean extraclean help \ qla qla_install qla_uninstall qla_clean qla_extraclean \ lsi lsi_install lsi_uninstall lsi_clean lsi_extraclean \ + iscsi iscsi_install iscsi_uninstall iscsi_clean iscsi_extraclean \ scst scst_install scst_uninstall scst_clean scst_extraclean \ usr usr_install usr_uninstall usr_clean usr_extraclean Added: trunk/iscsi-scst/COPYING =================================================================== --- trunk/iscsi-scst/COPYING (rev 0) +++ trunk/iscsi-scst/COPYING 2007-08-15 09:28:54 UTC (rev 162) @@ -0,0 +1,341 @@ + + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + <one line to give the program's name and a brief idea of what it does.> + Copyright (C) <year> <name of author> + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + <signature of Ty Coon>, 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. Added: trunk/iscsi-scst/ChangeLog =================================================================== --- trunk/iscsi-scst/ChangeLog (rev 0) +++ trunk/iscsi-scst/ChangeLog 2007-08-15 09:28:54 UTC (rev 162) @@ -0,0 +1,38 @@ +Summary of changes in iSCSI-SCST since it was IET +------------------------------------------------- + + - Commands processing flow changed to work with SCST. Significant + cleanup was done. Modules and config files were renamed to allow to + run with IET on the same host. + + - In IET the iSCSI negotiation isn't fully iSCSI RFC confirmed: it doesn't + support ranges of values and, more important, violates RFC in case + when in the IET config file some value for some parameter is set and + a remote initiator doesn't initiate the negotiation for this + parameter or declare its value. According to RFC, in this case IET + shall use the RFC-specified default value, but it uses config file + specified one instead. Looks like the implementation confuses IET + config file default values and iSCSI RFC ones. The default values + handling was fixed. But support for ranges remains unfixed (see ToDo + file). + + - All shutdown/restart problems (resource leaks, hangups, etc.), especially + under load, were fixed. + + - Full duplex network IO implemented. + + - Threading model reimplemented. + + - Digests calculation made multi-threaded. + + - TX data digest errors handling iSCSI RFC violation was fixed. Another one + (SNACK handling) remains unfixed. + + - Ability to send data with sense in a single response added. + + - Ability to handle initiators misbehavior a bit improved: several BUG()'s + were relaced by the proper handling. Hovewer, there is a plenty of work in + this area left, IET is known to have a lot of weaknesses here. + + - A lot of other bugfixes and code cleanups. + Added: trunk/iscsi-scst/ChangeLog-IET =================================================================== --- trunk/iscsi-scst/ChangeLog-IET (rev 0) +++ trunk/iscsi-scst/ChangeLog-IET 2007-08-15 09:28:54 UTC (rev 162) @@ -0,0 +1,435 @@ +Summary of changes from v0.4.14 to v0.4.15 +================================= + +Juhani Rautiainen + o Add RELEASE/RESERVE support + +Ross S. W. Walker + o Improve the build system to support several kernel versions + o Add block-io support + + +Summary of changes from v0.4.13 to v0.4.14 +================================= + +Arne Redlich + o Kill unused "state" in struct iscsi_cmnd. + o Fixed fileio_sync() to propagate error to the caller (and initiator). + o Don't attempt to show target/session params if communication with ietd + fails. + o Fixes to ietadm parameters handling. + +FUJITA Tomonori + o rewritten iSNS code, many iSNS fixes. + o added iSNS SCN support. + o IPv6 fixes to userspace. + +Ming Zhang + o Fix the READ_* commands error handling bug. + o fix the mode sense response. + o wrong #endif sequence in misc.h + +Richard Bollinger + o add a patch to ietd.c that allows defunct sessions to go away. + o add write-back cache and read-only support. + +Frederic Temporelli + o Fix for the combination of 32-bit userland and 64-bit kernel on mips. + +Henry Liu + o corrected many task management functions, prevent crashing on + LUN RESET, TARGET WARM RESET. + +K Chapman + o Fixed a typo in check_segment_length(). + +Emmanuel Florac + o Add ietadm manpage. + + +Summary of changes from v0.4.12 to v0.4.13 +================================= +Arne Redlich + o patch to avoid digest calculation for PDUs whose data has been skipped + already for various reasons. + o Correct a bug managing non-default MaxRxDSL. + o added to ietadm ability to show target parameters. + o add on the workaround to AIX initiator MaxCmdSN bug. + +FUJITA Tomonori + o added to ietadm ability to show the iSCSI parameters for an established + session. + +Ming Zhang + o Fixed this bug : ietd should manage the iscsi name in a case insensitive + way to conform to the RFC. + o workaround to AIX initiator MaxCmdSN bug. + o Fixed socket() return value judgment. + +Bastiaan Bakker + o add 'condrestart' command to the RedHat initscript. + +Robert Whitehead + o correct the bug that prevents iet to start if there isn't + an /etc/ietd.conf file. + +Summary of changes from v0.4.11 to v0.4.12 +================================= + +Arne Redlich + o Fix MaxRecvDataSegmentLength handling. + o Fix login parameter handling. + o Update man pages. + +Bastiaan Bakker + o Add features to specify the listen address and port. + o Fix setuid and setgid bugs in ietd daemon. + +FUJITA Tomonori + o Add IPv6 support. + +Junjiro Okajima + o Fix a bug about getting parameters from kernel space. + +Krzysztof Blaszkowski + o Fix for requests with unaligned to 4 length. + + +Summary of changes from v0.4.10 to v0.4.11 +================================= + +FUJITA Tomonori + o Fix Task Management Function bugs. + +Ming Zhang + o Update man pages. + + +Summary of changes from v0.4.9 to v0.4.10 +================================= + +Arne Redlich + o Fix 0x83 inquiry output. + o Fix iSCSI parameter handling bugs. + +FUJITA Tomonori + o Add the access control based on initiator address + and target name patterns. + +Junjiro Okajima + o Fix parameter checking bugs. + +Ming Zhang + o Add the nullio mode (only useful for performance evaluation). + + +Summary of changes from v0.4.8 to v0.4.9 +================================= + +FUJITA Tomonori + o Fix parameter negotiation handling bugs. + +Wang Zhenyu + o Fix digest negotiation handling bugs. + + +Summary of changes from v0.4.7 to v0.4.8 +================================= + +FUJITA Tomonori + o Fix unsolicited data handling bugs. + o Rewrite parameter handling code. + o Rewrite ietadm tool. + o Improve dynamic configuration support. + o Cleanups on the kernel-user interface. + o Improve wrong PDU handling. + o Implement a framework to handle multiple configuration methods. + o Implement basic access control support. + + +Summary of changes from v0.4.6 to v0.4.7 +================================= + +Florian Zierer + o Add the startup script for Gentoo. + +FUJITA Tomonori + o Rewrite parameter handling code. + o Fix task management code bug. + o Fix 0x83 inquiry output (Thanks to Christophe Varoqui). + +Ming Zhang + o Acquire T10 ID. + o Fix parameter handling bugs. + o Some user-space cleanups. + +Philipp Hug + o Fix ietd.8 man typo. + + +Summary of changes from v0.4.5 to v0.4.6 +================================= + +FUJITA Tomonori + o Replace the makeshift event notification code with netlink. + o Add task management code except for ACA and reassign stuff. + o Fix r2t lun bug (Thanks to Ming Zhang). + + +Summary of changes from v0.4.4 to v0.4.5 +================================= + +FUJITA Tomonori + o Rewrite the iSCSI command handling code. + o Rewrite the I/O data handling code. + o Fix worker thread. + o Several cleanups. + + +Summary of changes from v0.4.3 to v0.4.4 +================================= + +Krzysztof Blaszkowski + o Fix an out-of-memory bug. + + +Summary of changes from v0.4.2 to v0.4.3 +================================= + +Arne Redlich + o Fix header digest bug. + o Fix unexpected closed connection bug. + o Fix iSCSI parameter bug. + +FUJITA Tomonori + o Fix network thread. + + +Summary of changes from v0.4.1 to v0.4.2 +================================= + +FUJITA Tomonori + o Fix network thread. + o Fix MaxOutstandingR2T handling. + +Ming Zhang + o Add large volume support (over 2TB). + + +Summary of changes from v0.4.0 to v0.4.1 +================================= + +Arne Redlich + o Add mutual CHAP support. Note that you need to replace "User" + with "IncomingUser" in ietd.conf. + +FUJITA Tomonori + o Fix InitialR2T=No support. + o Fix INQUIRY command handling. + o Fix network and worker thread. + o Start to split SCSI stuff. + o Rewrite the R2T handling code. + o Several cleanups. + + +Summary of changes from v0.3.8 to v0.4.0 +================================= + +Arne Redlich + o iSNS bug fix. + +FUJITA Tomonori + o Move to 2.6 kernels. + o Rewrite the kernel thread performing network I/O. + o Add header and data digests (Thanks to Arne Redlich). + +Ming Zhang + o Add mode sense page 0x3 and 0x4 support (Thanks to K Chapman). + o iSNS bug fix. + + +Summary of changes from v0.3.7 to v0.3.8 +================================= + +Arne Redlich + o Fix ietadm global option bug. + +FUJITA Tomonori + o Fix TCP option bugs (Thanks to Chuck Berg). + o Fix REPORT LUN (handling lots of LUs). + + +Summary of changes from v0.3.6 to v0.3.7 +================================= + +Arne Redlich + o Fix target_alloc_pages(). + +FUJITA Tomonori + o Fix REPORT LUN bug. + + +Summary of changes from v0.3.5 to v0.3.6 +================================= + +Arne Redlich + o Fix bugs about rejecting PDUs. + +FUJITA Tomonori + o Cleanups on target_cmnd structure. + o Kill highmem stuff. + o Fix REPORT LUN (handling lots of LUs). + + +Summary of changes from v0.3.4 to v0.3.5 +================================= + +Arne Redlich + o Fix ietd security hole. + o Fix REPORT LUN bug. + o FIX NOOP_OUT padding bug. + +FUJITA Tomonori + o Rewrite event notification code. + +Libor Vanek + o Add max_sessions option. + o Fix command parsing bug. + +Ming Zhang + o Cleanups for 64-bit architectures. + + +Summary of changes from v0.3.3 to v0.3.4 +================================= + +FUJITA Tomonori + o Improve dynamic configuration support (adding targets and users). + + +Summary of changes from v0.3.2 to v0.3.3 +================================= + +FUJITA Tomonori + o Fix Makefile for the startup script. + + +Summary of changes from v0.3.1 to v0.3.2 +================================= + +Ali Lehmann + o Add a new startup script for Debian. + +FUJITA Tomonori + o Fix the istd's handling of connections in out-of-memory situations. + o Fix bugs in regular file support. + o Fix `ietadm --mode del all`. + +Libor Vanek + o Add a new startup script for RedHat. + +Ming Zhang + o Add uid/gid option to ietd daemon. + o Fix a access freed-memory bug in kernel/daemon.c. + + +Summary of changes from v0.3.0 to v0.3.1 +================================= + +FUJITA Tomonori + o Fix memory leaks in ietd daemon (Thanks to Ming). + o Fix bugs about REPORT_LUNS commands (Thanks to Ming). + o Fix a bug about Target Task Tag. + o Add regular file support to fileio mode. + + +Summary of changes from v0.2.6 to v0.3.0 +================================= + +Ali Lehmann + o Update ietd.8 man page. + +FUJITA Tomonori + o Fix shutdown code. + o Fix istd kernel thread bugs. + o Replace procfs interface with ioctl. + o Add dynamic configuration support. + o Update README and the boot script. + +Ming Zhang + o Add config option to ietd daemon. + + +Summary of changes from v0.2.5 to v0.2.6 +================================= + +Ali Lehmann + o Add ietd.8 and ietd.conf.5 man pages. + +FUJITA Tomonori + o Update README, Makefile, and the boot script. + + +Summary of changes from v0.2.4 to v0.2.5 +================================= + +FUJITA Tomonori + o Update README. + + +Summary of changes from v0.2.3 to v0.2.4 +================================= + +Ming Zhang + o Add a preliminary iSNS support. + o Fix merge mistakes that I made at the previous release. + + +Summary of changes from v0.2.2 to v0.2.3 +================================= + +Ming Zhang + o Improve INQUIRY, REQUEST_SENSE, and MODE_SENSE command supports + o Add fake RESERVE* and RELEASE* command supports + + +Summary of changes from v0.2.1 to v0.2.2 +================================= + +FUJITA Tomonori + o Improve the write performance of the file IO mode + +Ming Zhang + o Fix unupdated pg_cnt when allocating a new tcmnd + o Several cleanups + + +Summary of changes from v0.2.0 to v0.2.1 +================================= + +FUJITA Tomonori + o Fix a bug that makes the target use CPU unnecessarily + o Add a feature that enable you to pass options to an IO mode + + +Summary of changes from v0.1.0 to v0.2.0 +================================= + +FUJITA Tomonori + o Rewrite read and write kernel threads which perform network IO + o Fix race issues in the proc interface + o Fix shutdown code + +Ming Zhang + o Fix memory leaks in file and block IO modes + + +Summary of changes from the ardis v20040211 to v0.1.0 +================================= + +FUJITA Tomonori + o Remove a kernel patch. Multiple threads execute I/O operations + o Replace IO functions with the kernel starndard functions + o Add multiple IO modes feature + o Fix several race issues + o Fix several out-of-memory situation bugs Added: trunk/iscsi-scst/Makefile =================================================================== --- trunk/iscsi-scst/Makefile (rev 0) +++ trunk/iscsi-scst/Makefile 2007-08-15 09:28:54 UTC (rev 162) @@ -0,0 +1,76 @@ +# +# Makefile for the Linux kernel device drivers. +# +# Note! Dependencies are done automagically by 'make dep', which also +# removes any old dependencies. DON'T put your own dependencies here +# unless it's something special (not a .c file). +# +# Note 2! The CFLAGS definitions are now in the main makefile. + +SCST_DIR := $(shell pwd)/../scst/src +SUBDIRS := $(shell pwd) + +ifeq ($(KVER),) + ifeq ($(KDIR),) + KVER = $(shell uname -r) + KDIR ?= /lib/modules/$(KVER)/build + else + KVER = $$KERNELRELEASE + endif +else + KDIR ?= /lib/modules/$(KVER)/build +endif + +all: progs mods + +mods: Modules.symvers Module.symvers + $(MAKE) -C $(KDIR) SUBDIRS=$(shell pwd)/kernel modules + +progs: + $(MAKE) -C usr + +install: all kernel/iscsi-scst.ko usr/iscsi-scstd usr/iscsi-scst-adm + @install -vD usr/iscsi-scstd $(DISTDIR)/usr/local/sbin/iscsi-scstd + @install -vD usr/iscsi-scst-adm $(DISTDIR)/usr/local/sbin/iscsi-scst-adm + if [ -f /etc/debian_version ]; then \ + install -vD -m 755 etc/initd/initd.debian $(DISTDIR)/etc/init.d/iscsi-scst; \ + elif [ -f /etc/redhat-release ]; then \ + install -vD -m 755 etc/initd/initd.redhat $(DISTDIR)/etc/init.d/iscsi-scst; \ + elif [ -f /etc/gentoo-release ]; then \ + install -vD -m 755 etc/initd/initd.gentoo $(DISTDIR)/etc/init.d/iscsi-scst; \ + elif [ -f /etc/slackware-version ]; then \ + install -vD -m 755 etc/initd/initd $(DISTDIR)/etc/rc.d/iscsi-scst; \ + else \ + install -vD -m 755 etc/initd/initd $(DISTDIR)/etc/init.d/iscsi-scst; \ + fi + @eval `sed -n 's/#define UTS_RELEASE /KERNELRELEASE=/p' $(KDIR)/include/linux/version.h $(KDIR)/include/linux/utsrelease.h 2>/dev/null`; \ + install -vD -m 644 kernel/iscsi-scst.ko \ + $(DISTDIR)$(INSTALL_MOD_PATH)/lib/modules/$(KVER)/extra/iscsi-scst.ko + -/sbin/depmod -aq $(KVER) + +SCST_MOD_VERS := $(shell ls $(SCST_DIR)/Modules.symvers 2>/dev/null) +ifneq ($(SCST_MOD_VERS),) +Modules.symvers: $(SCST_DIR)/Modules.symvers + echo $(SCST_MOD_VERS) + cp $(SCST_DIR)/Modules.symvers kernel/ +else +.PHONY: Modules.symvers +endif + +# It's renamed in 2.6.18 +SCST_MOD_VERS := $(shell ls $(SCST_DIR)/Module.symvers 2>/dev/null) +ifneq ($(SCST_MOD_VERS),) +Module.symvers: $(SCST_DIR)/Module.symvers + cp $(SCST_DIR)/Module.symvers kernel/ +else +.PHONY: Module.symvers +endif + +clean: + $(MAKE) -C usr clean + $(MAKE) -C $(KDIR) SUBDIRS=$(shell pwd)/kernel clean + rm -f kernel/Modules.symvers kernel/Module.symvers + +extraclean: clean + +.PHONY: all mods progs install clean extraclean Added: trunk/iscsi-scst/README =================================================================== --- trunk/iscsi-scst/README (rev 0) +++ trunk/iscsi-scst/README 2007-08-15 09:28:54 UTC (rev 162) @@ -0,0 +1,115 @@ +iSCSI SCST target driver +======================== + +Version 0.9.6/XXXX, XX XXX 200X +------------------------------- + +This driver is a forked with all respects version of iSCSI Enterprise +Target (IET) (http://iscsitarget.sourceforge.net/) with updates to work +over SCST as well as with many improvements and bugfixes (see ChangeLog +file). The reason of fork is that the necessary changes are intrusive +and with the current IET merge policy, where only simple bugfix-like +patches, which doesn't touch the core code, could be merged, it is very +unlikely that they will be merged in the main IET trunk. + +To let it be installed and work at the same host together with IET +simultaneously all the driver's modules and files were renamed: + + * ietd.conf -> iscsi-scstd.conf + * ietadm -> iscsi-scst-adm + * ietd -> iscsi-scstd + * iscsi-target -> iscsi-scst + * iscsi-target.ko -> iscsi-scst.ko + +This version is compatible with SCST version 0.9.6 and higher. + +Tested on 2.6.21.1 kernel, but it should also work on other versions, +starting from 2.6.16.x. + +Installation +------------ + +Basically as in README-IET, where file names are changed as specified +above. + +To use full power of TCP zero-copy transmit functions, especially +dealing with user space supplied via scst_user module memory, iSCSI-SCST +needs to be notified when Linux networking finished data transmission. +Patch put_page_callback.patch provides such functionality. The +corresponding version of it should be applied on your kernel. This is +highly recommended, but not required. If it isn't applied, iSCSI-SCST +will work in the performance degraded mode, when for data transmission: + + - For in-kernel allocated memory (scst_vdisk and pass-through + handlers) usage of SGV cache on transmit path (READ-type commands) + will be disabled. The performance hit will be not big, performance + will still remain better, than for IET, because SGV cache will remain + used on receive path and IET doesn't have such feature. + + - For user space allocated memory (scst_user handler) all transmitted + data will be additionally copied into temporary TCP buffers. The + performance hit will be quite noticiable. + +If you need your own version of put_page_callback.patch for your custom +kernel, for which there is no prepared version, you can create it +yourself. For that it is only necessary: + +1. Apply the closest version of put_page_callback.patch on your kernel. +Resolve only failed hanks from include/ and net/core/utils.c, ignore +other failures. + +2. Grep net/ and replace everywhere, except in net/sunrpc/svc.c and +net/core/pktgen.c, put_page() by net_put_page() and get_page() by +net_get_page(). + +That's all. + +Usage +----- + +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. +This is because now responsibilities are divided (as it should be) +between the target driver (iSCSI-SCST) and the SCST core. The target +driver is responsible for handling targets and their parameters, SCST +core is responsible for handling backstorage. + +If you need to configure different LUs for different targets you should +create for each target group "Default_target_name", where target name +means name of the target, for example: +"Default_iqn.2007-05.com.example:storage.disk1.sys1.xyz", and add there +all necessary LUNs. Check SCST README file for details. + +Compilation options +------------------- + +There are the following compilation options, that could be commented +in/out in the kernel's module Makefile: + + - DEBUG - turns on some debugging code, including some logging. Makes + the driver considerably bigger and slower, producing large amount of + log data. + + - TRACING - turns on ability to log events. Makes the driver considerably + bigger and lead to some performance loss. + + - EXTRACHECKS - adds extra validity checks in the various places. + + - DEBUG_DIGEST_FAILURES - simulates digest failures in random places. + +Credits +------- + +Thanks to: + + * IET developers for IET + + * Ming Zhang <bla...@gm...> for fixes + + * Krzysztof Blaszkowski <kb...@sy...> for many fixes + + * Alexey Kuznetsov <ku...@ms...> for comments and help in + debugging + +Vladislav Bolkhovitin <vs...@vl...>, http://scst.sourceforge.net Added: trunk/iscsi-scst/README-IET =================================================================== --- trunk/iscsi-scst/README-IET (rev 0) +++ trunk/iscsi-scst/README-IET 2007-08-15 09:28:54 UTC (rev 162) @@ -0,0 +1,105 @@ +Introduction +------------- +iSCSI Enterprise Target is for building an iSCSI storage system on +Linux. It is aimed at developing an iSCSI target satisfying enterprise +requirements. + +We borrow code from an Ardis iSCSI target (with respect to the GPL). + + +Installation +------------- +The iSCSI target requires a host running the Linux operating system +with a kernel version of 2.6.19 (2.6.14 - 2.6.18 kernels using +backward compatibility patches, see below) or newer. You need to +enable "Cryptographic API" under "Cryptographic options" in the kernel +config. You also need to enable "CRC32c CRC algorithm" if you use +header or data digests. They are the kernel options, CONFIG_CRYPTO and +CONFIG_CRYPTO_CRC32C, respectively. The user-space code requires +OpenSSL library (http://www.openssl.org/). + +The iSCSI target consists of kernel modules and a daemon. Since IET +is generally targetted at the latest stable mainline kernel, you might +need to apply a backward compatibility patch to compile it against +older kernel versions: + + patch -p0 < patches/compat-2.6.14-2.6.18.patch + +Compilation of the kernel modules require the path to the kernel +sources: + + make KSRC=<kernel-src> + +The path can also be set by editing the main Makefile. If KSRC is +omitted, make program will try to locate the kernel sources for +current running kernel. Be sure to check whether it finds the right +kernel sources. + +This will build the modules, the daemon, and the control tool. To +install both, use: + + make KSRC=<kernel-src> install + +The kernel modules will be install in the module directory of the +kernel. The daemon and the control tool will be installed as ietd and +ietadm under /usr/sbin. The boot script will be installed as +iscsi-targt under /etc/init.d. + +If you use Linux distribution that does not have /etc/init.d, the +boot script will not be installed. So you need to install it to an +appropriate directory manually. + + +Configuration +------------- +The daemon is configured via the configuration file /etc/ietd.conf. +See the man page and the example file for the current syntax. + +The ietadm utility is for managing IET software dynamically. You can +change the configurations of running targets. See the help message. + +The access control based on initiator address and target name patterns +is configured via two configuration files (/etc/initiators.allow and +/etc/initiators.deny). These files work like tcpd files +(/etc/hosts.allow and /etc/hosts.deny). This feature enables you to +hide a particular targets from some initiators. See the example files +for the supported expressions. You can change the configuration +dynamically. The modifications to the files become effective +immediately. + + +Starting +------------- +The target is not started automatically. So execute: + + /etc/init.d/iscsi-target start + +Note that you must edit the configuration file before starting the +target. + + +Stopping +------------- +Execute: + + /etc/init.d/iscsi-target stop + +Contact +------------- +Please send bug reports, comments, feature requests etc. to our +mailing list <isc...@li...>. + + +Developer Notes +---------------- +The central resource for IET development is the +<isc...@li...> mailing list. + +Our subversion repository can be found at: svn://svn.berlios.de/iscsitarget + +When submitting patches, please diff against the code in our repository's +trunk and adhere otherwise to the same rules that apply to Linux kernel +development, in particular the Linux kernel coding style +($KSRC/Documentation/CodingStyle) and the rules for submitting patches +($KSRC/Documentation/SubmittingPatches), i.e. please send patches inline as +plain text. Added: trunk/iscsi-scst/ToDo =================================================================== --- trunk/iscsi-scst/ToDo (rev 0) +++ trunk/iscsi-scst/ToDo 2007-08-15 09:28:54 UTC (rev 162) @@ -0,0 +1,32 @@ + - Reimplement sessions parameters negotiation and storage. In IET + the negotiation isn't iSCSI RFC confirmed: it doesn't support ranges + of values and, more important, violates RFC in case when in the IET + config file some value for some parameter is set and a remote + initiator doesn't initiate the negotiation for this parameter or + declare its value. According to RFC, in this case IET shall use the + RFC-specified default value, but it will use config file specified + one instead. Looks like the implementation confuses IET config file + default values and iSCSI ones. The default values handling was fixed + in very dirty and hackish way, but ranges support remains unfixed. + Storage of set by user parameters should be reimplemented, so they + will be kept in iscsi-scstd, not in the kernel, as it is currently + done in IET's code. Using kernel to *only* store parameters is quite + questionable decision, especially considering that it leads to some + code duplication between kernel and user space, so remove all + parameters storage code from kernel. Remove target_param, leave only + one type of parameters, but separate processing of iSCSI RFC + parameters from local ones (currently they are mixed up). Also mixing + up conceptions of "key" and "param" in param_*() and struct + iscsi_key_ops functions makes the code hardly manageable, particularly + for adding support for ranges in the negotiation keys, so it needs to + be fixed as well. + + - Fix SNACK command handling. Currently it violates iSCSI RFC. + + - Consider better integration with TCP internals on receive path to + improve performance. + + - The target shouldn't crash/hang/etc. on initiators' misbehavior as + IET likes to do. + + - Minor "ToDo"'s spread in the code. Added: trunk/iscsi-scst/doc/manpages/iscsi-scst-adm.8 =================================================================== --- trunk/iscsi-scst/doc/manpages/iscsi-scst-adm.8 (rev 0) +++ trunk/iscsi-scst/doc/manpages/iscsi-scst-adm.8 2007-08-15 09:28:54 UTC (rev 162) @@ -0,0 +1,240 @@ +.\" Automatically generated by Pod::Man 2.09 (Pod::Simple 3.04) +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sh \" Subsection heading +.br +.if t .Sp +.ne 5 +.PP +\fB\\$1\fR +.PP +.. +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. | will give a +.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to +.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C' +.\" expand to `' in nroff, nothing in troff, for use with C<>. +.tr \(*W-|\(bv\*(Tr +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +'br\} +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.if \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.\" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.hy 0 +.if n .na +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "ISCSI_SCST_ADM 1" +.TH ISCSI_SCST_ADM 8 "2007-05" "iSCSI SCST Target admin" "User Manuals" +.SH "NAME" +iscsi-scst-adm \- iSCSI SCST Target Administration Utility. +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +\&\fBiscsi-scst-adm \-\-op [operation] \-\-tid=[id] [\-\-sid [id]] [\-\-params [key=value,...]]\fR +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +iscsi-scst-adm is used to monitor and modify in real-time the iSCSI SCST Target +targets. +.SH "USAGE" +.IX Header "USAGE" +You'll have to get target and sessions ids from /proc/scsi_tgt/iscsi. +Some usage examples can be : +.PP +\&\fBiscsi-scst-adm \-\-op show \-\-tid=1\fR +.PP +display status of target 1 (see /proc/scsi_tgt/iscsi to get the matching target name) +.PP +\&\fBiscsi-scst-adm \-\-op new \-\-tid=2\fR +.PP +create dynamically a new target, numbered 2. \s-1CAUTION\s0 : the target will disappear if you restart iscsi-scstd, you'll have to edit /etc/iscsi-scstd.conf to make it permanent! +.SH "ERROR MESSAGES" +.IX Header "ERROR MESSAGES" +iscsi-scst-adm misses error messages. Look carefully the \s-1STDERR\s0 output : in case of error +it will send a 3 number error code, ending with \-1, for instance : +.PP +iscsi-scstd_request 203 3 \-1 +.SH "OPTIONS" +.IX Header "OPTIONS" +\&\fB\-\-op new \-\-tid=[id] \-\-params Name=[name]\fR +.PP +add a new target with [id]. [id] must not be zero. +.PP +\&\fB\-\-op delete \-\-tid=[id]\fR +.PP +delete specific target with [id]. The target must +have no active sessions. +.PP +\&\fB\-\-op show \-\-tid=[id]\fR +.PP +show target parameters of target with [id]. +.PP +\&\fB\-\-op show \-\-tid=[id] \-\-sid=[sid]\fR +.PP +show iSCSI parameters in effect for session [sid]. If +[sid] is \*(L"0\*(R" (zero), the configured parameters +will be displayed. +.PP +\&\fB\-\-op delete \-\-tid=[id] \-\-sid=[sid] \-\-cid=[cid]\fR +.PP +delete specific connection with [cid] in a session +with [sid] that the target with [id] has. +If the session has no connections after +the operation, the session will be deleted +automatically. +.PP +\&\fB\-\-op delete\fR +.PP +stop all activity. +.PP +\&\fB\-\-op update \-\-tid=[id] \-\-params=key1=value1,key2=value2,...\fR +.PP +change iSCSI \s-1SCST\s0 target parameters of specific +target with [id]. You can use parameters in iscsi-scstd.conf +as a key. +.PP +\&\fB\-\-op new \-\-tid=[id] \-\-user \-\-params=[user]=[name],Password=[pass]\fR +.PP +add a new account with [pass] for specific target. +[user] could be [IncomingUser] or [OutgoingUser]. +If you don't specify a target (omit \-\-tid option), +you add a new account for discovery sessions. +.PP +\&\fB\-\-op delete \-\-tid=[id] \-\-user \-\-params=[user]=[name]\fR +.PP +delete specific account having [name] of specific +target. [user] could be [IncomingUser] or +[OutgoingUser]. +If you don't specify a target (omit \-\-tid option), +you delete the account for discovery sessions. +.PP +\&\fB\-\-version\fR +.PP +display version and exit +.PP +\&\fB\-\-help\fR +.PP +display a list of available options and exits +.SH "KNOWN ISSUES" +.IX Header "KNOWN ISSUES" +.IP "\(bu" 4 +iscsi-scst-adm doesn't return any human-readable error message, only error codes. +.IP "\(bu" 4 +iscsi-scst-adm doesn't modify or read the /etc/iscsi-scstd.conf iscsi-scstd configuration file. +.IP "\(bu" 4 +iscsi-scst-adm can't use target names or aliases, only the tid found in /proc/scsi_tgt/iscsi. +.IP "\(bu" 4 +/proc/scsi_tgt/iscsi may list inactive sessions if the initiator doesn't logout properly. +.PP +Report bugs to <iscsitarget\-d...@so...>. +.SH "FILES" +.IX Header "FILES" +/proc/scsi_tgt/iscsi +.SH "SEE ALSO" +.IX Header "SEE ALSO" +\&\fIiscsi-scstd\fR\|(8),\fIiscsi-scstd.conf\fR\|(5) +.\"man page written by Emmanuel Florac <ef...@in..." +.\"distributed under GPL v2 licence" Added: trunk/iscsi-scst/doc/manpages/iscsi-scstd.8 =================================================================== --- trunk/iscsi-scst/doc/manpages/iscsi-scstd.8 (rev 0) +++ trunk/iscsi-scst/doc/manpages/iscsi-scstd.8 2007-08-15 09:28:54 UTC (rev 162) @@ -0,0 +1,308 @@ +.\" Process this file with +.\" groff -man -Tascii iscsi-scstd.8 +.\" +.TH "iSCSI SCST Target Daemon" 8 "May 2007" Linux "User Manuals" +.SH NAME +iscsi-scstd \- iSCSI SCST Target Daemon +.SH SYNOPSIS +.B iscsi-scstd +.RB [\| \-c +.IR configfile \|] +.RB [\| \-d +.IR debuglevel \|] +.RB [\| \-f \|] +.RB [\| \-g +.IR GID \|] +.RB [\| \-h \|] +.RB [\| \-a +.IR address \|] +.RB [\| \-p +.IR port \|] +.RB [\| \-s +.IR IP \|] +.RB [\| \-u +.IR UID \|] +.SH DESCRIPTION +The +.B iscsi-scstd +program implements the user level part of iSCSI SCST Target software for building an iSCSI storage system on Linux. +.SH OPTIONS +.TP +.BI \-c\ filename ,\ \-\-config= filename +Specify configuration file, default is +.I /etc/iscsi-scstd.conf +.TP +.BI \-d\ debuglevel ,\ \-\-debug= debuglevel +Turns on debugging. Logging goes to +.I /var/log/syslog +via +.BR syslog (1). +.TP +.BI \-f,\ \-\-foreground +Act as a normal application which uses a console. +.TP +.BI \-g\ GID ,\ \-\-gid= GID +Specify running group id, default is current gid. +.TP +.BI \-a\ address ,\ \-\-address= address +Specify on which local address the server should listen, default is any. +.TP +.BI \-p\ port ,\ \-\-port= port +Specify on which port the server should listen, default is 3260. +.TP +.BI \-h,\ \-\-help +Display help message on command line options. +.TP +.BI \-s\ IP ,\ \-\-isns= IP +isns server's IP address +.TP +.BI \-u\ UID ,\ \-\-uid= UID +Specify running user id, default is current uid. +.SH FILES +.I /etc/iscsi... [truncated message content] |