When defining e.g. more than ten CHAP users in scst.conf, scstadmin
only saves the first then CHAP users. Make sure that scstadmin saves
all information defined in sysfs.
Reported-by: Artur Piechocki <artur.piechocki@open-e.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4928 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Write out e.g. "INITIATOR iqn.1994-05.com.redhat:29a5cc399d\#192.168.11.1"
instead of "INITIATOR iqn.1994-05.com.redhat:29a5cc399d#192.168.11.1" when
generating a config file such that the hash sign is read in properly when
rereading the SCST config file.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4907 d57e44dd-8a1f-0410-8b47-8ef2f437770f
While the SCSI specifications require presence of LUN 0 it is not always
desirable to associate storage with LUN 0. Hence allow LUN 0 (or any
other LUN) to be configured such that it does not appear at the
initiator side. This is realized by adding a "dummy" attribute in to
NULLIO vdisk devices. If that attribute is set, the PERIPHERAL QUALIFIER
field in the INQUIRY response is set to 1 and the PERIPHERAL DEVICE TYPE
is set to 0x1f. Add an example in the scst.conf(5) man page that shows
how to use the new attribute.
Signed-off-by: Bart Van Assche <bvanassche@acm.org> with some fixes and simplifications
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4874 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
chkconfig is installed by default while /usr/lib/lsb/install_initd and
/usr/lib/lsb/remove_initd are not installed by default.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4612 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Reading from /sys/kernel/scst_tgt/devices/*/filename can (at
least in theory) fail with -EAGAIN. Make sure that scstadmin
retries reading from a sysfs variable if that happens. This
patch has been tested by adding the following error injection
code in scst_sysfs.c:
--------------------------- scst/src/scst_sysfs.c ----------------------------
index 0509703..69efd80 100644
@@ -523,6 +523,22 @@ int scst_sysfs_queue_wait_work(struct scst_sysfs_work_item *work)
"failed: %d", atomic_read(&uid_thread_name),
(int)PTR_ERR(t));
+#if 1
+ {
+ static int cnt;
+ if (!work->read_only_action || cnt++ % 4 < 3) {
+ /*
+ * Helps testing user space code that writes to or
+ * reads from SCST sysfs variables.
+ */
+ timeout = 0;
+ rc = 0;
+ res = -EAGAIN;
+ goto out_put;
+ }
+ }
+#endif
+
while (1) {
rc = wait_for_completion_interruptible_timeout(
&work->sysfs_work_done, timeout);
------------------------------------------------------------------------------
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4498 d57e44dd-8a1f-0410-8b47-8ef2f437770f
_syswrite() callers check whether writing into an SCST sysfs attribute
succeeded by checking whether the value returned by this function is
defined(). Return undef (failed) instead of -1 (success) if syswrite()
returned error code EBUSY (found this through source reading). Return
$length instead of length($cmd) if the initial write triggered EAGAIN.
Remove a superfluous $bytes = undef statement. Eliminate the variable
$wait.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4400 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Hash signs have to be specified in scst.conf when using the per_portal_acl=1
feature of iSCSI-SCST in combination with LUN masking. Make scstadmin not
consider hash signs preceded by a backslash as the start of a comment. Escape
backslashes and hash signs when writing out scst.conf.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4391 d57e44dd-8a1f-0410-8b47-8ef2f437770f
"/etc/init.d/scst start" into a systemd start command. Since that doesn't
work for the SCST init script, disable systemd wrapping.
See also bug #738281 "Upgrading from openSUSE 11.4 to openSUSE 12.1 breaks third-party
LSB-compliant System V style init scripts" in the Novell bugzilla database
(https://bugzilla.novell.com/show_bug.cgi?id=738281).
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4023 d57e44dd-8a1f-0410-8b47-8ef2f437770f