Logically and negative allowed_portal conditions instead of
or-ing these. If both positive and negative conditions match,
the negative condition takes precedence.
This was proposed by Sergej Roytman <spocks.goatee@gmail.com>.
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Use the SCST_INC_DIR variable passed by the parent Makefile such that
both the in-tree and out-of-tree builds work.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6130 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Avoid that the following compiler warning is reported when compiling
iscsi-scst:
chap.c: In function 'chap_rand':
chap.c:348:5: warning: ignoring return value of 'read', declared with attribute warn_unused_result [-Wunused-result]
(void)read(fd, &r, sizeof(r));
^
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5614 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This avoids that the following checkpatch complaint is triggered:
Do not include the paragraph about writing to the Free Software Foundation's
mailing address from the sample GPL notice. The FSF has changed addresses in
the past, and may do so again. Linux already includes a copy of the GPL.
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5572 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Currently the install location of SCST is pretty much hard coded into
the Makefiles to be /usr/local.
I am custom building a system for ZFS & SCST and I want to install in
/usr instead of /usr/local.
Currently I am doing a “find . -name Makefile -exec sed -i 's:/usr/local:/usr:g'
{} \;” to accommodate this.
This patch fixes it.
From Sietse van Zanen <sietse@wizdom.nu>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4791 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Fix the following two compiler warnings:
chap.c: In function 'chap_rand':
chap.c:347:5: warning: implicit declaration of function 'read' [-Wimplicit-function-declaration]
chap.c:348:5: warning: implicit declaration of function 'close' [-Wimplicit-function-declaration]
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4623 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Target_del() might has not yet received all connections close events, so
it can still has alive sessions. Wait for them to disappear.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4617 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Avoids that the checkpatch tool included in kernel 3.6 emits the
following warning:
WARNING: sizeof *attr should be sizeof(*attr)
This patch has been generated by running the following command over
the SCST source tree and by reviewing these changes manually:
find -name '*.[ch]' |
xargs -d\\n sed -i.tmp -e 's/sizeof *\([^(][^(),; ]*\)/sizeof(\1)/g'
From: Bart Van Assche <bvanassche@acm.org>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4556 d57e44dd-8a1f-0410-8b47-8ef2f437770f
1. After attr was found in the attrs_list, it is inserted again back into the same list. As a result the list becomes corrupted.
The bug can be reproduced for example by the following sequence:
$ echo add_attribute IncomingUser user secret111111 > /sys/kernel/scst_tgt/targets/iscsi/mgmt
$ echo user secret222222 > /sys/kernel/scst_tgt/targets/iscsi/IncomingUser
$ echo del_attribute IncomingUser user > /sys/kernel/scst_tgt/targets/iscsi/mgmt
$ iscsiadm -m discovery -t st -p 127.0.0.1
Discovery fails and in syslog there is a message
Oct 2 18:58:37 vsa-00000611 iscsi-scstd: [1059] cmnd_exec_login:940: ERROR: Authentication of initiator iqn.2011-04.com.zadarastorage:1553:vc-0 failed
2. Small memory leak in error recovery path.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4545 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This patch:
* fixes signatures for log_debug and log_pdu macros
* collapses __log_<LEVEL> functions into one
* adds conditional logging
Here conditional logging means that the logging priority and logging level may
vary depending on some dynamic parameters. This is helpful when software is
able to recover from errors which occur periodically and hence, there is no
need to pollute system logs with tons of repetitive non-critical lines.
The following macros are added to support this feature:
* log_info_cond
* log_warning_cond
* log_error_cond
They take an additional first parameter called "level". If it is 0 then they
act as their non-cond counterparts, otherwise they act like log_debug with the
specified level.
Those who are not interested in conditional logging are not affected: they can
continue using plain old logging macros without any changes.
Signed-off-by: Sergey Myasnikov <tigra564@gmail.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4161 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This patch moves the following utility functions from iscsi_scstd.c to misc.c
and makes them public (i.e. non-static):
* set_non_blocking
* sock_set_keepalive
Signed-off-by: Sergey Myasnikov <tigra564@gmail.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4160 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Issue:
------------
The DevRegAttribute is sending a different Source Attribute (ISCSI name) which
represents the Storage Node for each target. So Microsoft isns server considers
the last request as the storage node and doesn't discover the previous targets.
Root Cause
----------------
Function ISNS_FUNC_DEV_ATTR_REG
Target A
Source attribute
ISCSI-Name = <IQN A Name>
Operating Attribute
ISCSI-Name = <IQN A Name>
Flags
Replace Access = 1
Target B
Source attribute
ISCSI-Name = <IQN B Name>
Operating Attribute
ISCSI-Name = <IQN B Name>
Replace Access = 1
So as per the request format Microsoft isns Server always takes the last target
as the source node. and register the same. Hence it doesn't discover the
targets other than last one. The Source Attribute has to be fixed for all targets. It
would be better if we use the first target iscsi name (rather than the last target
iscsi name) as source attribute iscsi name to represent the storage node.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3863 d57e44dd-8a1f-0410-8b47-8ef2f437770f
between sessions_count increment and the corresponding session creation, sessions_count is not decremented.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3353 d57e44dd-8a1f-0410-8b47-8ef2f437770f