From 455f0a2d18f3d19302a65bf435e2dbbfa2927283 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Wed, 29 Apr 2009 11:48:17 +0000 Subject: [PATCH] Merge of 812 and 806: - Change in scstadmin/ChangeLog 'since' to 'for' in ChangeLog so the version isn't misleading - Fixes incorrect initiators.allow matching. Reported and tested by Dimitri Puzin . - Fixes handling of tab character during parsing of initiators.allow and initiators.deny files - IET part of the version updated - TAGS updated - Comments in scst_targ.c about long ago gone scst_unregister_session_ex() fixed + Version updated to 1.0.1.1 git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/1.0.1.x@813 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- TAGS | 9 +++++---- iscsi-scst/README | 6 +++--- iscsi-scst/README_in-tree | 4 ++-- iscsi-scst/include/iscsi_scst_ver.h | 2 +- iscsi-scst/usr/config.c | 13 +++++++++---- iscsi-scst/usr/iscsid.c | 12 +++++++++--- qla2x00t/qla2x00-target/README | 6 +++--- qla2x00t/qla2x00-target/qla2x00t.h | 2 +- scst/README | 4 ++-- scst/include/scst.h | 4 ++-- scst/include/scst_user.h | 2 +- scst/src/scst_targ.c | 4 ++-- scstadmin/ChangeLog | 22 +++++++++++----------- usr/fileio/README | 4 ++-- usr/fileio/fileio.c | 2 +- 15 files changed, 54 insertions(+), 42 deletions(-) diff --git a/TAGS b/TAGS index bef071122..bab0dab12 100644 --- a/TAGS +++ b/TAGS @@ -1,7 +1,8 @@ -In SVN making tags is too heavyweighted. So, I decided instead keep in -this file revisions numbers, corresponding to the desired symbolic tags. +In SVN making tags is too heavyweighted. So, it was decided to keep +instead in this file revisions numbers, corresponding to the desired +symbolic tags. Tag Revision 1.0.0 439 -1.0.0srpt 450 - +SRPT 1.0.0 450 +1.0.1 805 diff --git a/iscsi-scst/README b/iscsi-scst/README index ce58ddff7..741f0bfbc 100644 --- a/iscsi-scst/README +++ b/iscsi-scst/README @@ -1,8 +1,8 @@ iSCSI SCST target driver ======================== -Version 1.0.1, 27 April 2009 ----------------------------- +Version 1.0.1.1, XX XXXXX 2009 +------------------------------ This driver is a forked with all respects version of iSCSI Enterprise Target (IET) (http://iscsitarget.sourceforge.net/) with updates to work @@ -21,7 +21,7 @@ simultaneously all the driver's modules and files were renamed: * iscsi-target -> iscsi-scst * iscsi-target.ko -> iscsi-scst.ko -This version is compatible with SCST version 1.0.1 and higher. +This version is compatible with SCST version 1.0.1.1 and higher. Installation if your Linux kernel already has iSCSI-SCST built-in diff --git a/iscsi-scst/README_in-tree b/iscsi-scst/README_in-tree index 3171d2053..f0ba22f24 100644 --- a/iscsi-scst/README_in-tree +++ b/iscsi-scst/README_in-tree @@ -1,8 +1,8 @@ iSCSI SCST target driver ======================== -Version 1.0.1, 27 April 2009 ----------------------------- +Version 1.0.1.1, XX XXXXX 2009 +------------------------------ This driver is a forked with all respects version of iSCSI Enterprise Target (IET) (http://iscsitarget.sourceforge.net/) with updates to work diff --git a/iscsi-scst/include/iscsi_scst_ver.h b/iscsi-scst/include/iscsi_scst_ver.h index 27454b2eb..4f870d02c 100644 --- a/iscsi-scst/include/iscsi_scst_ver.h +++ b/iscsi-scst/include/iscsi_scst_ver.h @@ -13,4 +13,4 @@ * GNU General Public License for more details. */ -#define ISCSI_VERSION_STRING "1.0.1/0.4.17r211" +#define ISCSI_VERSION_STRING "1.0.1.1/0.4.17r212" diff --git a/iscsi-scst/usr/config.c b/iscsi-scst/usr/config.c index 56cfc20fe..e7ff36bd7 100644 --- a/iscsi-scst/usr/config.c +++ b/iscsi-scst/usr/config.c @@ -372,7 +372,7 @@ static int __initiator_match(int fd, char *str) return 0; while ((p = strsep(&str, ","))) { - while (isspace(*p)) + while (isblank(*p)) p++; if (!strcmp(p, "ALL")) @@ -423,7 +423,7 @@ static int initiator_match(u32 tid, int fd, char *filename) /* * Every time we are called, we read the file. So we don't need to - * implement 'reload feature'. It's slow, however, it doesn't matter. + * implement the 'reload feature'. It's slow, but that doesn't matter. */ while ((p = fgets(buf, sizeof(buf), fp))) { if (!p || *p == '#') @@ -434,9 +434,14 @@ static int initiator_match(u32 tid, int fd, char *filename) continue; *p = '\0'; - if (!(p = strchr(buf, ' '))) + p = buf; + while (!isblank(*p) && (*p != '\0')) + p++; + if (p == '\0') continue; - *(p++) = '\0'; + + *p = '\0'; + p++; if (target_find_id_by_name(buf) != tid && strcmp(buf, "ALL")) continue; diff --git a/iscsi-scst/usr/iscsid.c b/iscsi-scst/usr/iscsid.c index fec8fb953..0b2a1de03 100644 --- a/iscsi-scst/usr/iscsid.c +++ b/iscsi-scst/usr/iscsid.c @@ -507,15 +507,21 @@ static void login_start(struct connection *conn) } target = target_find_by_name(target_name); - if ((target == NULL) || - config_initiator_access(conn->tid, conn->fd) || + if (target == NULL) { + rsp->status_class = ISCSI_STATUS_INITIATOR_ERR; + rsp->status_detail = ISCSI_STATUS_TGT_NOT_FOUND; + conn->state = STATE_EXIT; + return; + } + + conn->tid = target->tid; + if (config_initiator_access(conn->tid, conn->fd) || isns_scn_access(conn->tid, conn->fd, name)) { rsp->status_class = ISCSI_STATUS_INITIATOR_ERR; rsp->status_detail = ISCSI_STATUS_TGT_NOT_FOUND; conn->state = STATE_EXIT; return; } - conn->tid = target->tid; err = kernel_param_get(conn->tid, conn->sid.id64, key_session, conn->session_param); diff --git a/qla2x00t/qla2x00-target/README b/qla2x00t/qla2x00-target/README index 57ff30365..24d3d5a9e 100644 --- a/qla2x00t/qla2x00-target/README +++ b/qla2x00t/qla2x00-target/README @@ -1,8 +1,8 @@ Target driver for Qlogic 22xx/23xx Fibre Channel cards ====================================================== -Version 1.0.1, 27 April 2009 ----------------------------- +Version 1.0.1.1, XX XXXXX 2009 +------------------------------ This driver has all required features and looks to be quite stable (for beta) and useful. It consists from two parts: the target mode driver @@ -13,7 +13,7 @@ all necessary callbacks, but it's still capable to work as initiator only. Mode, when a host acts as the initiator and the target simultaneously, is supported as well. -This version is compatible with SCST core version 1.0.1 and higher and +This version is compatible with SCST core version 1.0.1.1 and higher and Linux kernel 2.6.26 and higher. If you need to use this driver on kernels prior 2.6.26, you should apply qla_ini_pre-2.6.26.patch. diff --git a/qla2x00t/qla2x00-target/qla2x00t.h b/qla2x00t/qla2x00-target/qla2x00t.h index e87ae020e..6381a0a2b 100644 --- a/qla2x00t/qla2x00-target/qla2x00t.h +++ b/qla2x00t/qla2x00-target/qla2x00t.h @@ -31,7 +31,7 @@ /* Version numbers, the same as for the kernel */ #define Q2T_VERSION(a, b, c, d) (((a) << 030) + ((b) << 020) + (c) << 010 + (d)) #define Q2T_VERSION_CODE Q2T_VERSION(1, 0, 1, 0) -#define Q2T_VERSION_STRING "1.0.1" +#define Q2T_VERSION_STRING "1.0.1.1" #define Q2T_MAX_CDB_LEN 16 #define Q2T_TIMEOUT 10 /* in seconds */ diff --git a/scst/README b/scst/README index d849bf5db..cc2ee1074 100644 --- a/scst/README +++ b/scst/README @@ -1,8 +1,8 @@ Generic SCSI target mid-level for Linux (SCST) ============================================== -Version 1.0.1, 27 April 2009 ----------------------------- +Version 1.0.1.1, XX XXXXX 2009 +------------------------------ SCST is designed to provide unified, consistent interface between SCSI target drivers and Linux kernel and simplify target drivers development diff --git a/scst/include/scst.h b/scst/include/scst.h index 66c79e5a2..555ea9c39 100644 --- a/scst/include/scst.h +++ b/scst/include/scst.h @@ -42,9 +42,9 @@ * Changing it don't forget to change SCST_FIO_REV in scst_vdisk.c * and FIO_REV in usr/fileio/common.h as well. */ -#define SCST_VERSION_CODE 0x01000100 +#define SCST_VERSION_CODE 0x01000101 #define SCST_VERSION(a, b, c, d) (((a) << 24) + ((b) << 16) + ((c) << 8) + d) -#define SCST_VERSION_STRING "1.0.1" +#define SCST_VERSION_STRING "1.0.1.1" #define SCST_INTERFACE_VERSION \ SCST_VERSION_STRING "$Revision$" SCST_CONST_VERSION diff --git a/scst/include/scst_user.h b/scst/include/scst_user.h index 6388f4b9c..76391bc50 100644 --- a/scst/include/scst_user.h +++ b/scst/include/scst_user.h @@ -26,7 +26,7 @@ #define DEV_USER_NAME "scst_user" #define DEV_USER_PATH "/dev/" -#define DEV_USER_VERSION_NAME "1.0.1" +#define DEV_USER_VERSION_NAME "1.0.1.1" #define DEV_USER_VERSION \ DEV_USER_VERSION_NAME "$Revision$" SCST_CONST_VERSION diff --git a/scst/src/scst_targ.c b/scst/src/scst_targ.c index 1fdfe6b23..dcdac4cc0 100644 --- a/scst/src/scst_targ.c +++ b/scst/src/scst_targ.c @@ -55,7 +55,7 @@ static inline void scst_schedule_tasklet(struct scst_cmd *cmd) } /* - * Must not be called in parallel with scst_unregister_session_ex() for the + * Must not be called in parallel with scst_unregister_session() for the * same sess */ struct scst_cmd *scst_rx_cmd(struct scst_session *sess, @@ -5102,7 +5102,7 @@ out_unlock: } /* - * Must not be called in parallel with scst_unregister_session_ex() for the + * Must not be called in parallel with scst_unregister_session() for the * same sess */ int scst_rx_mgmt_fn(struct scst_session *sess, diff --git a/scstadmin/ChangeLog b/scstadmin/ChangeLog index aae494caa..8cf59a8d0 100644 --- a/scstadmin/ChangeLog +++ b/scstadmin/ChangeLog @@ -1,39 +1,39 @@ -Changes since 1.0.6 +Changes for 1.0.6 - Added -resyncdev option to work with the new SCST resync_size option. - SCST.pm: Added resyncDevice() - SCST.pm: General cleanup. -Changes since 1.0.5 +Changes for 1.0.5 - Fixed a removeDevice() case when using -ForceConfig. - SCST.pm: Cosmetic changes to error messages - include the handler name. - SCST.pm: Quote handlers, handler IOs, devices, users and groups in error messages. -Changes since 1.0.4 +Changes for 1.0.4 - Fixed a check in SCST::removeUser(). - Fixed enable/disable target and error produced. - Minor cosmetic fixes. -Changes since 1.0.3 +Changes for 1.0.3 - Added patch from Witold Kowolik to allow for qla_isp enable/disable target mode. This is untested by me as I don't have one of these cards. -Changes since 1.0.2 +Changes for 1.0.2 - Simplified/fixed options parsing. Thanks to Witold Kowolik. - Use cluck() instead of print in module. - Added a new option REMOVABLE. - Allow options to be specified lowercase. -Changes since 1.0.1 +Changes for 1.0.1 - Module install/uninstall added - Added mapping NV -> NV_CACHE -Changes since 1.0.0 +Changes for 1.0.0 - Added a proper Makefile.PL to SCST::SCST so now we have a also a proper man page. @@ -43,12 +43,12 @@ Changes since 1.0.0 - Added init enable instructions to "make install" and README file. - Changed VERSION on top-level Makefile to MODULE_VERSION to be more clear. -Changes since 1.0.0 RC1 +Changes for 1.0.0 RC1 - Updated SCST/SCST.pm to add one more option mapping NV -> NV_CACHE. - Install/uninstall added. -Changes since 0.9.6-pre2: +Changes for 0.9.6-pre2: - Updated SCST/SCST.pm for vdisk/vcdrom from cdrom_fileio/disk_fileio - Updated scstadmin for vdisk/vcdrom... @@ -66,7 +66,7 @@ Changes since 0.9.6-pre2: - Fixed handling of disabled handlers (like dev_disk, dev_cdrom, etc from compile time) - Minor bug fixes -Changes since 0.9.5-pre0: +Changes for 0.9.5-pre0: - Renamed scst to scstadmin - Fixed writeConfiguration() to properly write DEVICE lines with no options @@ -74,7 +74,7 @@ Changes since 0.9.5-pre0: - Updated init.d/scst to use scstadmin instead of scst_db - Fixup of README file -Changes since 0.9.2-pre2: +Changes for 0.9.2-pre2: - List SCST sessions - Verify specified config file against live configuration and show differences diff --git a/usr/fileio/README b/usr/fileio/README index 76ffd8fcc..6132a6b22 100644 --- a/usr/fileio/README +++ b/usr/fileio/README @@ -1,8 +1,8 @@ User space FILEIO handler ========================= -Version 1.0.1, 27 April 2009 ----------------------------- +Version 1.0.1.1, XX XXXXX 2009 +------------------------------ User space program fileio_tgt uses interface of SCST's scst_user dev handler and allows to see how it works in various modes. Fileio_tgt diff --git a/usr/fileio/fileio.c b/usr/fileio/fileio.c index fd1bf666d..5b6d1a447 100644 --- a/usr/fileio/fileio.c +++ b/usr/fileio/fileio.c @@ -66,7 +66,7 @@ unsigned long trace_flag = DEFAULT_LOG_FLAGS; #endif /* defined(DEBUG) || defined(TRACING) */ #define DEF_BLOCK_SHIFT 9 -#define VERSION_STR "1.0.1" +#define VERSION_STR "1.0.1.1" #define THREADS 7 struct vdisk_dev dev;