| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
I added a stdint include so that it would be easier
to compile userspace apps including iscsi_proto.h, but
that breaks the kernel compilation. Since this iscsi_proto.h
is only used in open-iscsi releases I am just adding
a ifdef __KERNEL__.
|
|
|
|
| |
fw_get_entry's filepath is always NULL, so this patch removes it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
firmware
This adds the ibft sysfs module (iscsi_ibft) parsing support. It
was original done by Konard, but I have ported it to use the
sysfs.c helpers (add new ones and ported iscsi_sysfs.c too).
This patch also modifies iscsistart and iscsiadm to print/log
into all the portals found in firmware.
It also changes the behavior of
iscsiadm -m discovery -t fw
so that we create db records for what is found. It is not
fully hooked into the iface code, so it will use the
different inititor name, but it will not create a iface for
it (this means that if you have a record for the same portal that
is bound to a iface with a iname you can run into problems).
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Recv and xmit rewrite.
|
|
|
|
|
|
|
| |
During root boot and shutdown the target could send us nops.
At this time iscsid cannot be running, so the target will drop
the session and the boot or shutdown will hang. This patch
moves the nop handling to the kernel.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We were using the device delete sysfs file to remove each device
then logout. Now in 2.6.21 and .22 this will not work because
the sysfs delete file returns immediately and does not wait for
the device removal to complete. This causes a hang if a cache sync
is needed during shutdown.
This patch fixes the shutdown code so that we remove the target
and unbind the session before logging out and shuttdown the session.
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
|
|
|
|
|
|
|
| |
This patch adds logical unit reset support. It also fixes a bug
where when the session lock is dropped so we can grab
the recv lock, the iscsi eh thread could grab completely clean
up the session. The recv lock would then be a null ptr.
|
|
|
|
|
|
|
| |
We were not using the DefaultTime2Wait value we negotiated for.
We could hit a null ptr in libiscsi if we called stop and the
connection had not been setup.
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of having each parser print its output, make it common
in fw_entry.c and make that use the same format and fields as
the rest of the tools.
Kept the ibft dump code, because it may be use for compat tools for
suse. Let me know and I can help on that if you need it. With the hook
in though the format for ibft is the same as normal iscsiadm node info
so you can just reuse your parsing login for that.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch hooks ibft into iscsiadm and iscsistart. Why do this? It
seems easier to be able to just run the same tool we use for normal
login. For example in the installer or initramfs we can do this:
// This will check for fw crap and if found
// log into targets that are found
// returns 0 on success and non zero if
// there was no fw crap or we could not log
// in or some other error.
// This will _not_ store any record (text files
// with data in it) in /var/lib/iscsi.
// It is completely dynamic in that regard.
ret = iscsiadm -m discovery -t fwboot -l
(fwboot - is a new discovery type I added which is for this fw crap).
// For normal iscsi install we can then do:
ret = iscsiadm -m discovery -t st -p ip:port -l
// This will do discovery to the portal at
// ip:port, and now the code supports the -l on discovery,
// so it will also log into all the targets found
// automagically for the caller.
// This will store records (text files with target data in it)
// like usual to /var/lib/iscsi.
To setup the initramfs then, we just need some variable that tells us if
we are doing the fw boot or the pxe net iscsi boot. This could be done
by checking iscsiadm or iscsistart like so:
ret = iscsiadm -m discovery -t fwboot
// no login/-l command this time
if ret
indicates success, then setup initramfs for dynamic fwboot
else
do the normal pxe static iscsi root stuff we did.
In the initrams fs if using iscsistart we would just do
(if this got setup for fw dynamic boot)
or it would end up as
And if using iscsiadm in the initramfs you can just do
iscsiadm -m discovery -t fwboot -l
The patch was made using Prasana and Doug's code. I have not tested it.
I do not have the hardware handy (no intel card and I got stuck looking
for a ppc box with it).
|
|
|
|
|
|
| |
targets are not handling it well) and use the iface argument instead of the actual values
git-svn-id: svn://svn.berlios.de/open-iscsi@845 d7303112-9cec-0310-bdd2-e83a94d6c2b6
|
|
|
|
| |
git-svn-id: svn://svn.berlios.de/open-iscsi@831 d7303112-9cec-0310-bdd2-e83a94d6c2b6
|
|
|
|
|
|
| |
iface (driver and hardware are bound). Also merge the -D and -I arguments so they are now -I driver,hwaddress. Also add some basic qla4xxx support. We can rescan/scan it and perform sendtargets through it but it stores the targets it finds in Flash and then logs into all of them autmatically (when we do discovery and later when reload the driver). So qla4xxx support is mostly to make sure we have the --interfae argument right. We will have to decide how to set other params, manage nodes, and if we should move scanning to the kernel and then also move some error recovery code to the kernel (today qla4xxx is calling block directly and is not able to export it iscsi state yet (the beginnings to fix that is in the git tree but we still need to reduce some code duplcation)). qla4xxx behavior and functionality is going to change as we learn more about the hw (what format the flash data is supposed to be in for example).
git-svn-id: svn://svn.berlios.de/open-iscsi@816 d7303112-9cec-0310-bdd2-e83a94d6c2b6
|
|
|
|
| |
git-svn-id: svn://svn.berlios.de/open-iscsi@799 d7303112-9cec-0310-bdd2-e83a94d6c2b6
|
|
|
|
|
|
| |
node db record, and may be using chap so we store the values in sysfs in the kernel and then read them out again when iscsid starts up. This is also really more useful for qla4xxx which needs to export this stuff since it stores/sets it in flash
git-svn-id: svn://svn.berlios.de/open-iscsi@788 d7303112-9cec-0310-bdd2-e83a94d6c2b6
|
|
|
|
|
|
| |
stack use the same initiator name, so export what the user set up (we do not prevent users from doing this today so they can just set the same name for every stack) and let userspace sort it out
git-svn-id: svn://svn.berlios.de/open-iscsi@785 d7303112-9cec-0310-bdd2-e83a94d6c2b6
|
|
|
|
| |
git-svn-id: svn://svn.berlios.de/open-iscsi@781 d7303112-9cec-0310-bdd2-e83a94d6c2b6
|
|
|
|
|
|
| |
if invalid values are passed in
git-svn-id: svn://svn.berlios.de/open-iscsi@776 d7303112-9cec-0310-bdd2-e83a94d6c2b6
|
|
|
|
| |
git-svn-id: svn://svn.berlios.de/open-iscsi@773 d7303112-9cec-0310-bdd2-e83a94d6c2b6
|
|
|
|
| |
git-svn-id: svn://svn.berlios.de/open-iscsi@772 d7303112-9cec-0310-bdd2-e83a94d6c2b6
|
|
|
|
| |
git-svn-id: svn://svn.berlios.de/open-iscsi@744 d7303112-9cec-0310-bdd2-e83a94d6c2b6
|
|
|
|
| |
git-svn-id: svn://svn.berlios.de/open-iscsi@706 d7303112-9cec-0310-bdd2-e83a94d6c2b6
|
|
|
|
| |
git-svn-id: svn://svn.berlios.de/open-iscsi@696 d7303112-9cec-0310-bdd2-e83a94d6c2b6
|
|
|
|
|
|
| |
userspace of session state events. We modify the session addition up event and add a destruction event to notify userspace of session creation, relogin and destruction. And we modify the conn error event to be sent by broadcast since multiple listeners may want to listen for it.
git-svn-id: svn://svn.berlios.de/open-iscsi@630 d7303112-9cec-0310-bdd2-e83a94d6c2b6
|
|
|
|
|
|
| |
on a different netowrk than the other network traffic. In this case we will want to do discovery though the iscsi card. This patch adds a event to the transport class that can be used by hw iscsi cards that support this.
git-svn-id: svn://svn.berlios.de/open-iscsi@622 d7303112-9cec-0310-bdd2-e83a94d6c2b6
|
|
|
|
|
|
| |
commands. This also fixes a bug where we would perform recovery, that would fail, then we would cleanup and set the state back into recovery which would allow scsi-ml to queue commands to our internal queues.
git-svn-id: svn://svn.berlios.de/open-iscsi@578 d7303112-9cec-0310-bdd2-e83a94d6c2b6
|
|
|
|
| |
git-svn-id: svn://svn.berlios.de/open-iscsi@574 d7303112-9cec-0310-bdd2-e83a94d6c2b6
|
|
|
|
|
|
| |
incrementing exp_statsn when successful. For connection reinstatement we should also be using the exp_statsn from the last connection
git-svn-id: svn://svn.berlios.de/open-iscsi@561 d7303112-9cec-0310-bdd2-e83a94d6c2b6
|
|
|
|
| |
git-svn-id: svn://svn.berlios.de/open-iscsi@538 d7303112-9cec-0310-bdd2-e83a94d6c2b6
|
|
|
|
|
|
| |
functions
git-svn-id: svn://svn.berlios.de/open-iscsi@526 d7303112-9cec-0310-bdd2-e83a94d6c2b6
|
|
|
|
|
|
| |
the block timeout. when that expires we will fail commands upwards but keep the session struct so we can just reonline the devs when the connection is back. TODO: move more state code from iscsi_tcp to the class so the block code can do more
git-svn-id: svn://svn.berlios.de/open-iscsi@507 d7303112-9cec-0310-bdd2-e83a94d6c2b6
|
|
|
|
| |
git-svn-id: svn://svn.berlios.de/open-iscsi@501 d7303112-9cec-0310-bdd2-e83a94d6c2b6
|
|
|
|
|
|
| |
communication. Instead the existing session / connection ids from sysfs are used to identify the corresponding sessions / connections. Signed-off-by: Hannes Reinecke <hare@suse.de> Small cleanups to allocate sid for hw and sw iscsi from mike christie
git-svn-id: svn://svn.berlios.de/open-iscsi@489 d7303112-9cec-0310-bdd2-e83a94d6c2b6
|
|
|
|
| |
git-svn-id: svn://svn.berlios.de/open-iscsi@459 d7303112-9cec-0310-bdd2-e83a94d6c2b6
|
|
|
|
| |
git-svn-id: svn://svn.berlios.de/open-iscsi@458 d7303112-9cec-0310-bdd2-e83a94d6c2b6
|
|
|
|
|
|
| |
with mainline. Some of the userspace code is left with some hacks around it to make patching easier
git-svn-id: svn://svn.berlios.de/open-iscsi@453 d7303112-9cec-0310-bdd2-e83a94d6c2b6
|
|
|
|
|
|
| |
sysfs refcount bug
git-svn-id: svn://svn.berlios.de/open-iscsi@452 d7303112-9cec-0310-bdd2-e83a94d6c2b6
|
|
|
|
| |
git-svn-id: svn://svn.berlios.de/open-iscsi@415 d7303112-9cec-0310-bdd2-e83a94d6c2b6
|
|
|
|
|
|
|
| |
(instead of its own iscsi_hdr.h)
git-svn-id: svn://svn.berlios.de/open-iscsi@405 d7303112-9cec-0310-bdd2-e83a94d6c2b6
|
|
|
|
|
|
|
|
| |
updates. It incorporates some iet iscsi_hdr.h
values so that iet can now use iscsi_proto.h
git-svn-id: svn://svn.berlios.de/open-iscsi@399 d7303112-9cec-0310-bdd2-e83a94d6c2b6
|
|
|
|
| |
git-svn-id: svn://svn.berlios.de/open-iscsi@350 d7303112-9cec-0310-bdd2-e83a94d6c2b6
|
|
|
|
|
|
|
| |
in particular: conn->xmitsema, session->lock
git-svn-id: svn://svn.berlios.de/open-iscsi@349 d7303112-9cec-0310-bdd2-e83a94d6c2b6
|