open-iscsi/multisession.git
13 years agoUpdate changelog for new 870.1 release2.0-870.1
Mike Christie [Sat, 22 Nov 2008 17:06:46 +0000 (22 11:06 -0600)]
Update changelog for new 870.1 release

13 years agoiscsid: fix relogin retry handling
Mike Christie [Sat, 22 Nov 2008 16:54:41 +0000 (22 10:54 -0600)]
iscsid: fix relogin retry handling

This has iscsid always retry the relogin if we have logged
in previously. This also fixes a problem where for the initial
login we retry too much (for reopen cnt) when we just want to try
once for fatal errors like where the target is not there
or the chap values are bad.

13 years agoUpdate Changelog for new release.2.0-870
Mike Christie [Wed, 5 Nov 2008 01:21:42 +0000 (4 19:21 -0600)]
Update Changelog for new release.

13 years agorm unused variable in fw_entry.c
Erez Zilber [Wed, 22 Oct 2008 10:00:00 +0000 (22 12:00 +0200)]
rm unused variable in fw_entry.c

Signed-off-by: Erez Zilber <erezzi.list@gmail.com>
13 years agoMinor fixes in iscsi_discovery documentation
Erez Zilber [Wed, 22 Oct 2008 09:45:24 +0000 (22 11:45 +0200)]
Minor fixes in iscsi_discovery documentation

Some changes that were made in iscsi_discovery were
not reflected in the docs.

Signed-off-by: Erez Zilber <erezzi.list@gmail.com>
13 years agoFix initiator.c compile warning
Mike Christie [Tue, 30 Sep 2008 16:28:01 +0000 (30 11:28 -0500)]
Fix initiator.c compile warning

A log_error message had a extra "," which was causing compile
warnings.

13 years agoPATCH: add error checking to iscsi discovery db lock creation
Hans de Goede [Mon, 29 Sep 2008 11:11:58 +0000 (29 13:11 +0200)]
PATCH: add error checking to iscsi discovery db lock creation

Hi Make,

I've been bitten numerous times now by iscsiadm hanging when run as normal user
(it spins trying to create the lock, which will never succeed as it simple
  misses the rights todo so).

I plan on including the attached patch in the new rawhide / F-10 package with
the new initscripts I'm working on. Please scream loudly if you object against
this patch.

Regards,

Hans

p.s.

If we go ahead with this patch I assume you will take care of getting it upstream.

13 years agoupdate 2.6.24_compat.patch2.0-870-rc3
Mike Christie [Thu, 25 Sep 2008 23:53:08 +0000 (25 18:53 -0500)]
update 2.6.24_compat.patch

data corruption fix broke compat patches.

13 years agoupdate 2.6.20-21_compat.patch
Mike Christie [Thu, 25 Sep 2008 23:52:14 +0000 (25 18:52 -0500)]
update 2.6.20-21_compat.patch

data corruption fix broke compat patches.

13 years agoupdate 2.6.14-19_compat.patch
Mike Christie [Thu, 25 Sep 2008 23:51:43 +0000 (25 18:51 -0500)]
update 2.6.14-19_compat.patch

data corruption fix broke compat patches.

13 years agolibiscsi: fix locking in iscsi_eh_device_reset
Mike Christie [Thu, 25 Sep 2008 23:22:14 +0000 (25 18:22 -0500)]
libiscsi: fix locking in iscsi_eh_device_reset

We must be using the bh spin locking functions in
iscsi_eh_device_reset becuase the session lock interacts with
a thread and softirq.

This patch also fixes up a bogus comment and check in fail_command,
because no one drops the lock (bnx2i did but it is not going
upstream yet and there were other refcount changes for that).

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
13 years agoiscsi_tcp: return a descriptive error value during connection errors
Mike Christie [Thu, 25 Sep 2008 23:21:36 +0000 (25 18:21 -0500)]
iscsi_tcp: return a descriptive error value during connection errors

The segment->done functions return a iscsi error value which gives
a lot more info than conn failed, so this patch has us return
that value. I also add a new one for xmit failures.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
13 years agohandle ISCSI_ERR_INVALID_HOST
Mike Christie [Wed, 23 Apr 2008 09:24:57 +0000 (23 04:24 -0500)]
handle ISCSI_ERR_INVALID_HOST

If the kernel throws ISCSI_ERR_INVALID_HOST then the host is no
longer able to support iscsi. iscsid should then kill the session.
There is no need to logout or do the sync cache from the ubind
path, because at this point the transport is dead.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: Mike Christie <mchristi@redhat.com>
13 years agoiscsi class: fix endpoint id handling
Mike Christie [Thu, 25 Sep 2008 23:17:58 +0000 (25 18:17 -0500)]
iscsi class: fix endpoint id handling

Some endpoint code was using unsigned int and some
was using uint64_t. This converts it all to uint64_t.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
13 years agolibiscsi: fix data corruption when target has to resend data-in packets
Mike Christie [Thu, 25 Sep 2008 23:17:09 +0000 (25 18:17 -0500)]
libiscsi: fix data corruption when target has to resend data-in packets

iscsi_tcp was updating the exp_statsn (exp_statsn acknowledges
status and tells the target it is ok to let the resources for
a iscsi pdu to be reused) before it got all the data for pdu read
into OS buffers. Data corruption was occuring if something happens
to a packet and the network layer requests a retransmit, and the
initiator has told the target about the udpated exp_statsn ack,
then the target may be sending data from a buffer it has reused
for a new iscsi pdu. This fixes the problem by having the LLD
(iscsi_tcp in this case) just handle the transferring of data, and
has libiscsi handle the processing of status (libiscsi completion
processing is done after LLD data transfers are complete).

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
13 years agomodify initial login retry max
Mike Christie [Wed, 24 Sep 2008 22:34:47 +0000 (24 17:34 -0500)]
modify initial login retry max

Now the retry count only controls the number of retries
that we attempt when the initial login attempt timesout.
It used to control the retry count for any error, which resulted
in it having to be set really high and it was also difficult to
figure out what to set it to since users (and me) have no idea
how quickly the network layer will return errors in some cases.

The retry count is also used to determine the max amount of time
to wait for the initial login attempt. We do this by:

login retry max * login timeout = max time

This makes it easier for the user to calculate the
max time that they will have to wait.

The default time to wait is now 2 minutes for normal sessions and
7 minutes for root.

13 years agoiscsi conf: partially revert increase default login max change
Mike Christie [Wed, 24 Sep 2008 20:51:33 +0000 (24 15:51 -0500)]
iscsi conf: partially revert increase default login max change

45 is too high if the connection is timing out. It is
45 * 15 seconds. This sets the retry limit to 8,
which would make the connection timeout wait 2 minutes.
This is still to few retries for the static ip problem, so
in the next patch we will modify iscsid so it retries
connection errors like this up to login_timeout * login_retry
seconds. This would be 2 minutes which is working for the
bug reporters on the list.

13 years agoiscsi conf: increase default login max
Mike Christie [Wed, 24 Sep 2008 20:13:51 +0000 (24 15:13 -0500)]
iscsi conf: increase default login max

initial_login_retry_max is too short to be useful.
We are getting a lot of login problems due to the
EHOSTUNREACH static ip address, so this patch
increases the default initial_login_retry_max to 45.

13 years agoRevert broken SLES 10 compat patch.
Mike Christie [Sun, 14 Sep 2008 01:57:28 +0000 (13 20:57 -0500)]
Revert broken SLES 10 compat patch.

SLES 10 conpat patch is missing the open iscsi compat header
so it is not building for users. The makefile stuff is also
breaking upstream 2.6.16 based users, because the suse patch
is applying instead of the normal one.

13 years ago[PATCH] Add .gitignore files
Mike Christie [Sun, 14 Sep 2008 01:13:57 +0000 (13 20:13 -0500)]
[PATCH] Add .gitignore files

From Erez Zilber:

Some files should not be tracked by git.

Signed-off-by: Erez Zilber <erezzi.list@gmail.com>
13 years agoAdd Makefile support for 2.6.26 compat patch
Mike Christie [Sun, 14 Sep 2008 01:12:10 +0000 (13 20:12 -0500)]
Add Makefile support for 2.6.26 compat patch

Hook 2.6.26 compat patch into build system.

13 years agoAdd 2.6.26 compat support
Mike Christie [Sun, 14 Sep 2008 00:44:56 +0000 (13 19:44 -0500)]
Add 2.6.26 compat support

2.6.27 changed class_find_device. It is only used for the lookup code
which is not needed by iscsi_tcp, so we can just ifdef all the endpoint
code like is done in other compat patches.

13 years agoSync kernel modules with 2.6.27
Mike Christie [Sun, 14 Sep 2008 00:35:33 +0000 (13 19:35 -0500)]
Sync kernel modules with 2.6.27

Update kernel modules for 2.6.27 kernel API changes.

13 years agolog.c: add error messages when allocation shared memory
Doron Shoham [Tue, 9 Sep 2008 11:09:47 +0000 (9 14:09 +0300)]
log.c: add error messages when allocation shared memory

add error messages when trying to allocate shared memory
for the log area.

Signed-off-by: Doron Shoham <dorons@voltaire.com>
13 years agoiscsid: adjust requested settings for user
Mike Christie [Fri, 22 Aug 2008 01:37:30 +0000 (21 20:37 -0500)]
iscsid: adjust requested settings for user

This patch adjusts the requested setting for the user if the
module does not support the setting.

13 years agoAdd SLES10 SP2 compat
Hannes Reinecke [Thu, 31 Jul 2008 09:31:15 +0000 (31 11:31 +0200)]
Add SLES10 SP2 compat

Hi Mike,

due to popular demand I've cranked together a SLES10 SP2 compat
patch. You'll have to build it with

make KSRC=/usr/src/linux KBUILD_OUTPUT=/usr/src/linux-obj/<arch>/<flavour>

Can you add it to the git tree?

Thanks,

Hannes
--
Dr. Hannes Reinecke       zSeries & Storage
hare@suse.de       +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Markus Rex, HRB 16746 (AG Nürnberg)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "open-iscsi" group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to open-iscsi+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~----------~----~----~----~------~----~------~--~---

commit 97dc544d90e98ef399640010a9a019bcaaa6bf4f
Author: Hannes Reinecke <hare@suse.de>
Date:   Thu Jul 31 11:19:58 2008 +0200

    Compat patch for SLES10 SP2

    In SLES10 SP2 we've updated the SCSI stack to match 2.6.21 more closely.
    Hence we need our own compat patch to deal with this.

Signed-off-by: Hannes Reinecke <hare@suse.de>
13 years agoAdd compat patch for RHEL 5.2
Mike Christie [Sat, 16 Aug 2008 02:14:04 +0000 (15 21:14 -0500)]
Add compat patch for RHEL 5.2

from Erez Zilber

The 2.6.14-19_compat.patch checks the kernel version. However,
the RHEL 5.2 kernel includes code that does not exist in the
vanilla kernel. This causes symbol redefinition.

Signed-off-by: Erez Zilber <erezzi.list@gmail.com>
14 years agoBump version for new release.2.0-870-rc1
Mike Christie [Tue, 1 Jul 2008 01:14:03 +0000 (30 20:14 -0500)]
Bump version for new release.

14 years agofix dynamic tpgt support.
Mike Christie [Tue, 1 Jul 2008 01:10:24 +0000 (30 20:10 -0500)]
fix dynamic tpgt support.

Older tools allowed you to not set the tpgt when you created
a record manually. If you update a record, iscsiadm will
update the record format for you if it is supportable. In
this case supportable meant that you had to have a tpgt set.
We checked for it in some other cases, but missed it here for
some reasons. This patch fixes that.

14 years agoremove sysfs_file
Mike Christie [Sat, 14 Jun 2008 02:28:04 +0000 (13 21:28 -0500)]
remove sysfs_file

We do not need sysfs_file, so remove it.

14 years agoFix login redirect failure handling.
Mike Christie [Fri, 13 Jun 2008 23:45:28 +0000 (13 18:45 -0500)]
Fix login redirect failure handling.

If the login redirect fails, we currently retry forever.
This was because initiator.c could not figure out how
to best cleanup the mess. But now we do :) so this
patch allows the initiator to either retry the reopen or
fail.

14 years agofix ipv6 login redirect support.
Mike Christie [Fri, 13 Jun 2008 21:43:55 +0000 (13 16:43 -0500)]
fix ipv6 login redirect support.

If the target gives us brackets ([]) in the ipv6 name we need
to drop then when passing the ipv6 addr to the network functions.
The discovery and iscsiadm command line code does this already, but
the login redirect code is not, and this results in the login failing
and iscsiadm hanging.

14 years agoFix discovery and autobinding
Mike Christie [Wed, 11 Jun 2008 22:08:25 +0000 (11 17:08 -0500)]
Fix discovery and autobinding

Only autobind to the default iface if no ifaces are passed in.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
14 years agoFix idbm iscsid segfault when accsing ifaces
Mike Christie [Wed, 11 Jun 2008 21:51:07 +0000 (11 16:51 -0500)]
Fix idbm iscsid segfault when accsing ifaces

If iscsid loops over the sessions then it may access the idbm
db's ifaces, so we need to init the idbm when iscsid starts.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
14 years agoFix transport_name compat support.
Mike Christie [Fri, 13 Jun 2008 21:39:09 +0000 (13 16:39 -0500)]
Fix transport_name compat support.

This lists the default iface stuff as unstable and adds back support
for node.transport_name and iface.transport_name. We will not merge
Doran's patch for now because I just do not have time to deal with
regressions., but I am adding in a hack to make sure we
do not change the transport name while a session is running.

14 years agolibiscsi: support older tools that did not set can_queue/cmds_max
Mike Christie [Wed, 11 Jun 2008 18:45:54 +0000 (11 13:45 -0500)]
libiscsi: support older tools that did not set can_queue/cmds_max

Older tools did not pass the kernel the can_queue/cmds_max, so
if not set then use the old default max.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
14 years agoiscsid: don't print enosys errors.
Mike Christie [Wed, 11 Jun 2008 18:43:41 +0000 (11 13:43 -0500)]
iscsid: don't print enosys errors.

Do not print ENOSYS errors from netlink.c, because they are probably
harmless. Let the handler decide if they want to log the error.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
14 years agoUpdate 2.6.24 - 2.6.25 patch
Mike Christie [Wed, 11 Jun 2008 15:31:34 +0000 (11 10:31 -0500)]
Update 2.6.24 - 2.6.25 patch

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
14 years agoUpdate 2.6.20 - 2.6.24 patch
Mike Christie [Wed, 11 Jun 2008 15:27:14 +0000 (11 10:27 -0500)]
Update 2.6.20 - 2.6.24 patch

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
14 years agoUpdate 2.6.14 - 2.6.19 compat patch
Mike Christie [Wed, 11 Jun 2008 15:21:53 +0000 (11 10:21 -0500)]
Update 2.6.14 - 2.6.19 compat patch

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
14 years agoSync kernel modules to scsi-misc for 2.6.27.
Mike Christie [Wed, 11 Jun 2008 15:15:25 +0000 (11 10:15 -0500)]
Sync kernel modules to scsi-misc for 2.6.27.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
14 years agoIncrease login retry for iscsistart.
Mike Christie [Fri, 6 Jun 2008 23:09:41 +0000 (6 18:09 -0500)]
Increase login retry for iscsistart.

For iscsistart we want to try to login a little longer than normal
because if it does not work, we are screwed. This sets it to 120
which will be over 2 minutes.

14 years agoOnly autobind to ifaces with transport = tcp
Mike Christie [Sun, 1 Jun 2008 04:54:19 +0000 (31 23:54 -0500)]
Only autobind to ifaces with transport = tcp

This just adds back the old behavior as the default where we
would only autobind to ifaces that are using iscsi_tcp for
the transport type.

Autobinding to iser and bnx2i is not working as it is today, because
it is only based on the modules being loaded. It should be based on
if the hardware is properly setup or if the user requested it in
the config or something else.

14 years agoFix sysfs handling of block:sdX and scsi bus changes
Mike Christie [Sun, 1 Jun 2008 04:47:12 +0000 (31 23:47 -0500)]
Fix sysfs handling of block:sdX and scsi bus changes

This has us use the udev_sysfs code instead of hacking our own.
There are two items that need future proofing:
1. handling of iscsi_session class device symlinks
2. scanning opens /sys/class/iscsi_* dir instead of doing
a proper search like udev_sysfs.

14 years agofix compilation on Fedora 9
Mike Christie [Thu, 29 May 2008 22:27:11 +0000 (29 17:27 -0500)]
fix compilation on Fedora 9

We need to inlude limits.h for INT_MAX's definition.

14 years agoFix iser create bound session compat
Mike Christie [Fri, 23 May 2008 19:03:52 +0000 (23 14:03 -0500)]
Fix iser create bound session compat

For some dumb reason I did not add compat support for
iser when adding support for missing ISCSI_UEVENT_CREATE_BOUND_SESSION
handlers. This patch checks if we do kernel ep connects. If we do
then we try the ISCSI_UEVENT_CREATE_BOUND_SESSION command. If
that fails or if we do the userspace connect then we do the nonbinding/old
ISCSI_UEVENT_CREATE_SESSION command.

14 years agopass ep to session creation
Mike Christie [Tue, 20 May 2008 02:20:44 +0000 (19 21:20 -0500)]
pass ep to session creation

bnx2i allocates a host per session and iser accesses the
device so we need to pass them a the leading connection
so they can find the hardware that is it bound to.

This also has us call ep_disconnect before calling the stop
conn callout, so these driver do not have to worry about
stopping the receiving path.

14 years agoRevert Release-transport-entry-when-the-transport-is-unload.patch
Mike Christie [Mon, 19 May 2008 23:10:33 +0000 (19 18:10 -0500)]
Revert Release-transport-entry-when-the-transport-is-unload.patch

We do not need a new event to figure out that a transport is missing.
We can just check before accessing the transport.

This reverts the original patch.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
14 years agolibiscsi: fix recv tmo
Mike Christie [Fri, 9 May 2008 00:40:15 +0000 (8 19:40 -0500)]
libiscsi: fix recv tmo

If the ping tmo is longer than the recv tmo then we could miss a recv
tmo check, because the ping code will set the next timeout for the
ping timeout. This patch has the ping processing code kick off a recv
tmo check when getting a nop in response to our ping.

14 years agolibiscsi: Fix nop timeout handling
Mike Christie [Tue, 6 May 2008 02:45:13 +0000 (5 21:45 -0500)]
libiscsi: Fix nop timeout handling

If the transport timer wakes at the exact same time we were supposed
to check the transport we drop the connection instead of checking
it.

14 years agoFix ep_disconnect handling of invalid ep
Mike Christie [Sun, 27 Apr 2008 04:32:06 +0000 (26 23:32 -0500)]
Fix ep_disconnect handling of invalid ep

The ep handle is a unsigned number so we cannot check it for less
than zero like we do for iscsi_tcp's socket fd. Check of -1.

14 years agoRelease transport entry when the transport is unloaded
Mike Christie [Sat, 26 Apr 2008 22:20:38 +0000 (26 17:20 -0500)]
Release transport entry when the transport is unloaded

When iscsid detects a new transport (e.g. iscsi_tcp, ib_iser), it
allocates an entry for it in the transport list. If the transport
is unloaded and then reloaded, iscsid would still use the old
transport entry. Therefore, the transport entry must be deleted
when the transport is unloaded.

Signed-off-by: Erez Zilber <erezz@voltaire.com>
14 years agoSupport mutlple ifaces with the same binding (lack of binding).
Mike Christie [Tue, 22 Apr 2008 23:02:40 +0000 (22 18:02 -0500)]
Support mutlple ifaces with the same binding (lack of binding).

If you wanted to be able to create multiple session to the same
target portal, then you can now do

iscsiadm -m iface -I iface0 -o new
If you want to, set a binding:
iscsiadm -m iface -I iface0 ....set your binding
repeat iface creation

iscsiadm -m discovery -t st -p ip:port -I iface0 -I iface1 -I ....

or you can create and bind statically

iscsiadm -m node -T my_target -i ip:port,tpgt -I iface0 -I iface1 -I ....

then login like normal. Or you can login/logout of specific ifaces
like with the normal binding.

There is one known bug where discovery is not printing the
portals and binding setup nicely.

14 years agoFix bad merge. User iscsi param masks instead of params.
Mike Christie [Tue, 22 Apr 2008 17:04:13 +0000 (22 12:04 -0500)]
Fix bad merge. User iscsi param masks instead of params.

Fix bad merge. User iscsi param masks instead of params
when checking transport caps.

14 years agoDo not allow iface setting to be changed in node mode.
Mike Christie [Mon, 21 Apr 2008 03:15:32 +0000 (20 22:15 -0500)]
Do not allow iface setting to be changed in node mode.

This temporarily breaks iscsi_discovery and probably other apps
for distros that wanted to set iface.transport_name. In the
patch to add default a iser iface we broke node.transport_name,
so this means there is no backward compat for that setting
and you must use the new default iser iface.

Before this is released we will add some compat code somewhere and
fix up the check in iscsiadm for iface settings based on Dorn's patch.

14 years agoUser 64 bit params mask.
Mike Christie [Sun, 20 Apr 2008 21:13:42 +0000 (20 16:13 -0500)]
User 64 bit params mask.

ifacename put is going to put us over the limit, so have
the session param mask match the kernel one.

14 years agofix compile warning for missing iface.h
Mike Christie [Sun, 20 Apr 2008 19:38:57 +0000 (20 14:38 -0500)]
fix compile warning for missing iface.h

14 years agoset header digests to off by default
Mike Christie [Sun, 20 Apr 2008 10:19:49 +0000 (20 05:19 -0500)]
set header digests to off by default

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
14 years agoUse startup definition in util.c.
Mike Christie [Sun, 20 Apr 2008 10:15:17 +0000 (20 05:15 -0500)]
Use startup definition in util.c.

Use startup definition in util.c

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
14 years agobreak up iface code and add default iser, tcp/default and bnx2i ifaces
Mike Christie [Sun, 20 Apr 2008 10:11:57 +0000 (20 05:11 -0500)]
break up iface code and add default iser, tcp/default and bnx2i ifaces

This patch moves the iface code to iface.c/.h. It also adds some
default ifaces for iser and bnx2i. Currently if those modules
are loaded then we will bind to them along with default/tcp when
discovery is run. The user can then set the startup flag or delete
the record.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
14 years agoAdd bind by initiatorname
Mike Christie [Sun, 20 Apr 2008 17:56:13 +0000 (20 12:56 -0500)]
Add bind by initiatorname

You can now setup the initiator to use multiple initiatornames
which may come in handy for virtualization.

To setup a iface with inames do:

iscsiadm -m iface -o new -I iname0
iscsiadm -m iface -I iname0 -o update -n iface.initiatorname -v "your new name"

Then you can bind and use the interface like you would before.

QUIRK:
Because you can pass in multiple ifaces to the discovery command we
use the default initiator name in /etc/iscsi/initiatorname.iscsi for
the discovery session.

node.transport_name is no longer supported. In the next patches you
will be able to use the default ifaces for these transports.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
14 years agorm num_transports from sysfs header.
Mike Christie [Sun, 20 Apr 2008 07:53:26 +0000 (20 02:53 -0500)]
rm num_transports from sysfs header.

rm num_transports from sysfs header.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
14 years agorm db param
Mike Christie [Sun, 20 Apr 2008 07:50:57 +0000 (20 02:50 -0500)]
rm db param

There is no need to pass the db to almost every function. Just
allocate it as static in idbm.c.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
14 years agoadd ifacename support tools
Mike Christie [Sun, 20 Apr 2008 19:37:41 +0000 (20 14:37 -0500)]
add ifacename support tools

Set ifacename so we can look it back up on iscsid restart.

14 years agoiscsi class/if kernel: add ifacename attr
Mike Christie [Sun, 20 Apr 2008 17:51:20 +0000 (20 12:51 -0500)]
iscsi class/if kernel: add ifacename attr

This adds a attr that userspace can use to set a id for
the session similar to setting a network inteface's name.
It is used for binding hba and port attrs to a session.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
14 years agochange mgmt_ipc to logout by sid
Mike Christie [Sat, 19 Apr 2008 09:07:54 +0000 (19 04:07 -0500)]
change mgmt_ipc to logout by sid

Operations on sessions are almost all done by sid. The exception
was logout. This patch modifies logout to use sid instead of record
info which should make matching easier in the future.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
14 years agoUpdate SUSE init scripts2.0-869
Hannes Reinecke [Wed, 9 Apr 2008 06:39:00 +0000 (9 08:39 +0200)]
Update SUSE init scripts

These are some updates to the SUSE init scripts, plus a new
boot.open-iscsi script for SUSE. The latter is used for
root on iscsi, to start iscsid as early as possible to
avoid deadlocks on the root fs.

Signed-off-by: Hannes Reinecke <hare@suse.de>
14 years agodisable iscsi_discovery qla4xxx support
Mike Christie [Wed, 9 Apr 2008 00:13:10 +0000 (8 19:13 -0500)]
disable iscsi_discovery qla4xxx support

iscsi_discovery is not familiar with qla4xxx and cannot just set
the transport name for it. This patch removes mentions of qla4xxx
in the script.

14 years agofix white spaces and blank lines removal
Doron Shoham [Mon, 7 Apr 2008 11:31:24 +0000 (7 14:31 +0300)]
fix white spaces and blank lines removal

fix white spaces and blank lines removal.

Signed-off-by: Doron Shoham <dorons@voltaire.com>
Signed-off-by: Erez Zilber <erezz@voltaire.com>
14 years agocheck if iscsid is running
Doron Shoham [Mon, 7 Apr 2008 11:30:38 +0000 (7 14:30 +0300)]
check if iscsid is running

check if iscsid is running.
if iscsid is not running exit the script.

Signed-off-by: Doron Shoham <dorons@voltaire.com>
Signed-off-by: Erez Zilber <erezz@voltaire.com>
14 years agoAdd additional flags to iscsi_discovery
Mike Christie [Tue, 8 Apr 2008 19:09:06 +0000 (8 14:09 -0500)]
Add additional flags to iscsi_discovery

From Doron:

Add additional flag:
        -t              set trasnpot (default is tcp).
        -f              force specific transport -disable the fallback to tcp (default is fallback enabled).
                        force the transport specified by the argument of the -t flag.
        -m              manual startup - will set manual startup (default is automatic startup).
        -l              login - login to the new discovered nodes (defualt is false).

Signed-off-by: Doron Shoham <dorons@voltaire.com>
Signed-off-by: Erez Zilber <erezz@voltaire.com>
Minor teak to get it merged from Mike Christie.

14 years agofixed printing debug information
Doron Shoham [Mon, 7 Apr 2008 11:28:51 +0000 (7 14:28 +0300)]
fixed printing debug information

dbg() didn't check correctly whether the dbg is true
or false.

Signed-off-by: Doron Shoham <dorons@voltaire.com>
Signed-off-by: Erez Zilber <erezz@voltaire.com>
14 years agoFixup IPC leak in iscsid
Hannes Reinecke [Tue, 8 Apr 2008 14:51:27 +0000 (8 16:51 +0200)]
Fixup IPC leak in iscsid

Hi Mike,

iscsid is leaking IPC identifiers when the startup fails.

Please apply.

Cheers,

Hannes
--
Dr. Hannes Reinecke       zSeries & Storage
hare@suse.de       +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Markus Rex, HRB 16746 (AG Nürnberg)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "open-iscsi" group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to open-iscsi-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~----------~----~----~----~------~----~------~--~---

Fixup IPC leak in iscsid

If iscsid is terminated due to a failure we're leaking IPC ids.
And we're not clearing the log area, causing iscsid to oops if
invoked twice.

Signed-off-by: Hannes Reinecke <hare@suse.de>
14 years agoClean up error codes for iscsid
Hannes Reinecke [Tue, 8 Apr 2008 14:36:27 +0000 (8 16:36 +0200)]
Clean up error codes for iscsid

Hi Mike,

iscsid is using a mixture of '1' or '-1' to signal a failure.
We should rather use '1' consistently.

Cheers,

Hannes
--
Dr. Hannes Reinecke       zSeries & Storage
hare@suse.de       +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Markus Rex, HRB 16746 (AG Nürnberg)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "open-iscsi" group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to open-iscsi-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~----------~----~----~----~------~----~------~--~---

Cleanup error codes for iscsid

iscsid should use consistent error codes; we should always
return '1' on failure, not a mixture of '-1' and '1'.

Signed-off-by: Hannes Reinecke <hare@suse.de>
14 years agoUse correct debug option '-d' for iscsiadm
Hannes Reinecke [Tue, 8 Apr 2008 14:32:50 +0000 (8 16:32 +0200)]
Use correct debug option '-d' for iscsiadm

Hi Mike,

the debug option for iscsiadm is '-d', not '-g'.

Cheers,

Hannes
--
Dr. Hannes Reinecke       zSeries & Storage
hare@suse.de       +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Markus Rex, HRB 16746 (AG Nürnberg)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "open-iscsi" group.
To post to this group, send email to open-iscsi@googlegroups.com
To unsubscribe from this group, send email to open-iscsi-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/open-iscsi
-~----------~----~----~----~------~----~------~--~---

>From c41c5045e6d91e76895d4221d03e4f8ce438032f Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Fri, 7 Mar 2008 15:58:10 +0100
Subject: [PATCH] Correct debug option for iscsiadm

The debug option is '-d', not '-g'.

Signed-off-by: Hannes Reinecke <hare@suse.de>
14 years agotest pattern netdev instead of iface netdev when matching ifaces2.0-869-rc4
Mike Christie [Tue, 8 Apr 2008 02:23:00 +0000 (7 21:23 -0500)]
test pattern netdev instead of iface netdev when matching ifaces

When we match netdevs we should check if the pattern is valid/bound. If it
is not then we do not want to try and match the ifaces netdev. We were testing
the iface's netdev instead and that is going to always be set from the
current callers (sysfs iters and from create_node_rec paths).

14 years agoDo not logout session if the record is going to be deleted.2.0-869-rc3
Mike Christie [Tue, 8 Apr 2008 00:53:08 +0000 (7 19:53 -0500)]
Do not logout session if the record is going to be deleted.

If a session is using a record we do not want to remove the record
because some commands need to check the node.startup and iface settings.

During devel of this release we added code to logout the session then
delete it, but the problem will be if the user just wanted to delete
the record but was still using the session. In this case the devices
are removed and the user will get FS errors.

For now we will just warn and advise the user, so they can manually
log out. In the next release we can add a force flag to logout.

14 years agoconvert iscsi_discovery to use iface settings
Mike Christie [Mon, 31 Mar 2008 23:57:12 +0000 (31 18:57 -0500)]
convert iscsi_discovery to use iface settings

node.transport_name was replaced with iface.transport_name because
we needed to bind the interface to the driver for qla4xxx and bnx2i.
This converts iscsi_discovery to use the new value.

Note: there was compat support in iscsiadm for both values, but it
was agreed that because of its limited use and hacks needed to support
compat we would just drop it. This will affect distros that do
not carry iscsi_discovery, becuase the primary discovery tool for iser
was that script.

14 years agofix handling of fatal login errors
Mike Christie [Mon, 31 Mar 2008 23:27:25 +0000 (31 18:27 -0500)]
fix handling of fatal login errors

For errors initiator.c determines as fatal we should not continue to
retry the log in.

14 years agoallow discovery to overwrite records if a session is using it
Mike Christie [Mon, 31 Mar 2008 22:56:14 +0000 (31 17:56 -0500)]
allow discovery to overwrite records if a session is using it

If a node record exists for a session we should allow discovery to
overwrite it because it causes a regression for users of iscsi_tcp.

The only value we cannot change is iface.transport_name
(the primary binding iface values are checked as part of the stale
record end to end checks), and the iface.transport_name is only changed
by iscsi_discovery and that has its own checks for now.

In the next release we are going to fix up the iface values so transport
name is a binding value, but it is too late for that, so we just do not
want to add any regressions.

14 years agoFix session mode -r operations when non tcp module is used
Mike Christie [Mon, 31 Mar 2008 22:05:34 +0000 (31 17:05 -0500)]
Fix session mode -r operations when non tcp module is used

If a module other than iscsi_tcp is used, session mode's -r argument
does not pick up the transport type correctly.

14 years agoBump version to 2.0-8692.0-869-rc2
Mike Christie [Wed, 26 Mar 2008 23:59:43 +0000 (26 18:59 -0500)]
Bump version to 2.0-869

When we do a sync with the kernel we pulled in the new kernel version,
but did not sync the userspace version number.

14 years agofix mkfs regression test
Mike Christie [Thu, 20 Mar 2008 16:25:28 +0000 (20 11:25 -0500)]
fix mkfs regression test

This starting of the mkfs regression test. To run do
regression.sh -f /dev/sdb

14 years agoFixup debian info
Mike Christie [Thu, 20 Mar 2008 15:43:36 +0000 (20 10:43 -0500)]
Fixup debian info

Patch and info from Andrew Moise:

  Okay, patch is attached.  I wound up doing some things differently
than I mentioned -- the trouble with KERNEL_TARGET turned out to just
be because I hadn't installed the needed headers, and I added the
dpkg-divert script as a Makefile target instead of a snippet of code
in the docs that people have to cut and paste.  I also mentioned the
ib_iser situation (which I hope I described accurately).

14 years agouse scsi host dir define
Mike Christie [Thu, 20 Mar 2008 15:23:08 +0000 (20 10:23 -0500)]
use scsi host dir define

Use a scsi host dir define.

14 years agofix printing of ipv4 address in session mode
Mike Christie [Thu, 20 Mar 2008 15:20:15 +0000 (20 10:20 -0500)]
fix printing of ipv4 address in session mode

We normally print out the ipv6 address in brackets, but for
the iface address we were not.

14 years ago2.6.14-19 compat fix ups
Mike Christie [Sun, 16 Mar 2008 00:04:03 +0000 (15 19:04 -0500)]
2.6.14-19 compat fix ups

Update 2.6.14-19_compat.patch for 2.6.25 sync up.

14 years agoAdd 2.6.24 compat support
Mike Christie [Sat, 15 Mar 2008 23:53:40 +0000 (15 18:53 -0500)]
Add 2.6.24 compat support

Add 2.6.24 compat support

14 years agoupdate 2.6.20-21_compat.patch
Mike Christie [Sat, 15 Mar 2008 23:42:47 +0000 (15 18:42 -0500)]
update 2.6.20-21_compat.patch

update 2.6.20-21_compat.patch for 2.6.25 sync up.

14 years agoSync up with 2.6.25
Mike Christie [Sat, 15 Mar 2008 23:26:05 +0000 (15 18:26 -0500)]
Sync up with 2.6.25

Sync up with 2.6.25. This does not contain compat patches.

14 years agoFix handling of data ending on segment boundaries
Mike Christie [Fri, 14 Mar 2008 17:17:40 +0000 (14 12:17 -0500)]
Fix handling of data ending on segment boundaries

It is ok for the data to end right on the boundary, so we do
not want to check for equal to.

14 years agoUse CHAP info from sysfs when restarting iscsid.
Mike Christie [Fri, 14 Mar 2008 17:13:43 +0000 (14 12:13 -0500)]
Use CHAP info from sysfs when restarting iscsid.

If you are starting iscsid with sessions running then you are
probably doing iscsi boot or had to restart due to a iscsid bug.
For iscsi boot, the ibft data is the most up to date so we do
not want to use the node db info. This patch is sort of hacky,
and in the next release we will clean up the iscsi_sysfs code
and export everything we need (the only problem is the the
program run during boot may not set all the values like segment
lengths or timeouts so we may still need this hack).

14 years agosync up README and iscsi.conf comments about node.startup
Mike Christie [Fri, 14 Mar 2008 17:12:13 +0000 (14 12:12 -0500)]
sync up README and iscsi.conf comments about node.startup

Since we do not support MCS, we just want to use the node.startup
setting. We still support node.conn[0].startup for compat reasons.

14 years agofix printing of session info when sid is passed in.
Mike Christie [Fri, 22 Feb 2008 18:13:25 +0000 (22 12:13 -0600)]
fix printing of session info when sid is passed in.

When I added OP_NOOP I did not convert the session printing
code correctly and so the session's record info was printed
instead of the session info. This patch fixes that and it
merges the session printing code.

14 years agoprint iface record info
Mike Christie [Fri, 22 Feb 2008 17:36:04 +0000 (22 11:36 -0600)]
print iface record info

If you do iscsiadm -m node -T tgt -p ip it will print out the
record info, but there is no equivalent command for iface mode.
This adds iscsiadm -m iface -I iface which will dump the record
info. It currrently spits out the same info as the other commands
because we only have the binding info in there. In the future
it will also display the iface's default node values.

14 years agoAdd some info about the scsi command timer in the README
Mike Christie [Thu, 21 Feb 2008 22:10:15 +0000 (21 16:10 -0600)]
Add some info about the scsi command timer in the README

Document how to set the scsi command timer in the README.

14 years agoBump version to 2.0-868.2.0-868-rc1
Mike Christie [Thu, 21 Feb 2008 21:57:26 +0000 (21 15:57 -0600)]
Bump version to 2.0-868.

This almost syncs us up with 2.6.25. The iscsi patches are in sync,
but some upstream kernel api changes are not in this release (this
is why it does not support 2.6.25 yet).

14 years agoThe session age mask is only 4 bits, but session->age is 32. When
Mike Christie [Thu, 21 Feb 2008 21:54:56 +0000 (21 15:54 -0600)]
The session age mask is only 4 bits, but session->age is 32. When
it gets larger then 15 and we try to or the bits some bits get
dropped and the check for session age in iscsi_verify_itt is useless.

The ISCSI_CID_MASK related bits are also useless since cid is always
one.

14 years agoFix connection cleanup when iscsid is restarted.
Mike Christie [Thu, 21 Feb 2008 21:44:37 +0000 (21 15:44 -0600)]
Fix connection cleanup when iscsid is restarted.

If iscsid is restarted while a session is running, then the
session is logged out we are leaving the iscsi connection
in the kernel. The reason for this is because conn->ksetup
is not set during the sync up. Instead of that hacky bool
we can just check the kernel if there is a connection setup
by looking in sysfs.

14 years agoAdd more checks for invalid record updates.
Mike Christie [Thu, 21 Feb 2008 19:34:33 +0000 (21 13:34 -0600)]
Add more checks for invalid record updates.

Some values like target name or ip address should be changed.
This adds some checks in idbm.c for this.

Some values like iface bind info should only be modified in
iface mode. This patch adds some checks to iscsiadm.c for this.

This also adds a log message if we have to log out a session
before deleting its record.