summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_transport_iscsi.c
Commit message (Collapse)AuthorAgeFilesLines
* [NETNS]: Consolidate kernel netlink socket destruction.Denis V. Lunev2008-01-281-2/+2
| | | | | | | | | | Create a specific helper for netlink kernel socket disposal. This just let the code look better and provides a ground for proper disposal inside a namespace. Signed-off-by: Denis V. Lunev <den@openvz.org> Tested-by: Alexey Dobriyan <adobriyan@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SCSI] iscsi class: bump versionMike Christie2008-01-111-1/+1
| | | | | | | Update version. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* [SCSI] libiscsi, iscsi class: set tmf to a safe default and export in sysfsMike Christie2008-01-111-2/+6
| | | | | | | | | | Older tools will not be setting the tmf time outs since they did not exists, so set them to a safe default. And export abort and lu reset timeout values in sysfs. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* [SCSI] libiscsi: fix nop handlingMike Christie2008-01-111-0/+4
| | | | | | | | | | | | 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. To handle this and allow us to better control when to check the network this patch moves the nop handling to the kernel. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* [SCSI] libiscsi: fix shutdownMike Christie2008-01-111-134/+155
| | | | | | | | | | | | | We were using the device delete sysfs file to remove each device then logout. Now in 2.6.21 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. Before .21, that approach had other problems, so this patch fixes the shutdown code so that we remove the target and unbind the session before logging out and shut down the session Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* [SCSI] iscsi class: Use our own workq instead of common system one.Mike Christie2008-01-111-4/+12
| | | | | | | | | | There is just too much going on through the common workq and something like a scsi device removal through sysfs affects how long it will take to recover the transport, mark it as failed, or shut it down gracefully. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* [SCSI] libiscsi, iscsi_tcp: add device supportMike Christie2008-01-111-1/+3
| | | | | | | | | | | This patch adds logical unit reset support. This should work for ib_iser, but I have not finished testing that driver so it is not hooked in yet. This patch also temporarily reverts the iscsi_tcp r2t write out patch. That code is completely rewritten in this patchset. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* [SCSI] Add Documentation and integrate into docbook buildRob Landley2008-01-111-8/+9
| | | | | | | | | | | Add Documentation/DocBook/scsi_midlayer.tmpl, add to Makefile, and update lots of kerneldoc comments in drivers/scsi/*. Updated with comments from Stefan Richter, Stephen M. Cameron, James Bottomley and Randy Dunlap. Signed-off-by: Rob Landley <rob@landley.net> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
* [NET]: make netlink user -> kernel interface synchroniousDenis V. Lunev2007-10-101-47/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch make processing netlink user -> kernel messages synchronious. This change was inspired by the talk with Alexey Kuznetsov about current netlink messages processing. He says that he was badly wrong when introduced asynchronious user -> kernel communication. The call netlink_unicast is the only path to send message to the kernel netlink socket. But, unfortunately, it is also used to send data to the user. Before this change the user message has been attached to the socket queue and sk->sk_data_ready was called. The process has been blocked until all pending messages were processed. The bad thing is that this processing may occur in the arbitrary process context. This patch changes nlk->data_ready callback to get 1 skb and force packet processing right in the netlink_unicast. Kernel -> user path in netlink_unicast remains untouched. EINTR processing for in netlink_run_queue was changed. It forces rtnl_lock drop, but the process remains in the cycle until the message will be fully processed. So, there is no need to use this kludges now. Signed-off-by: Denis V. Lunev <den@openvz.org> Acked-by: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NET]: Support multiple network namespaces with netlinkEric W. Biederman2007-10-101-1/+1
| | | | | | | | | | | | | | | | | | | | | Each netlink socket will live in exactly one network namespace, this includes the controlling kernel sockets. This patch updates all of the existing netlink protocols to only support the initial network namespace. Request by clients in other namespaces will get -ECONREFUSED. As they would if the kernel did not have the support for that netlink protocol compiled in. As each netlink protocol is updated to be multiple network namespace safe it can register multiple kernel sockets to acquire a presence in the rest of the network namespaces. The implementation in af_netlink is a simple filter implementation at hash table insertion and hash table look up time. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SCSI] iscsi class, iscsi_tcp, iser, qla4xxx: add netdevname sysfs attrMike Christie2007-06-021-2/+4
| | | | | | | | | | | | | | | | | iSCSI must support software iscsi (iscsi_tcp, iser), hardware iscsi (qla4xxx), and partial offload (broadcom). To be able to allow each stack or driver or port (virtual or physical) to be able to log into the same target portal we use the initiator tuple [[HWADDRESS | NETDEVNAME], INITIATOR_NAME] and the target tuple [TARGETNAME, CONN_ADDRESS, CONN_PORT] to id a session. This patch adds the netdev name, which is used by software iscsi when it binds a session to a netdevice using the SO_BINDTODEVICE sock opt. It cannot use HWADDRESS because if someone did vlans then the same netdevice will have the same mac and the initiator,target id will not be unique. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Cc: Roland Dreier <rdreier@cisco.com> Cc: David C Somayajulu <david.somayajulu@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] iscsi class, qla4xxx, iscsi_tcp: export local addressMike Christie2007-06-021-1/+3
| | | | | | | | | | This patch exports the local address for the session. For qla4xxx this is the ip of the hba's port. For software this is the src addr of the socket. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Cc: David C Somayajulu <david.somayajulu@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] libiscsi: make can_queue configurableMike Christie2007-06-021-0/+2
| | | | | | | | | | | | This patch allows us to set can_queue and cmds_per_lun from userspace when we create the session/host. From there we can set it on a per target basis. The patch fully converts iscsi_tcp, but only hooks up ib_iser for cmd_per_lun since it currently has a lots of preallocations based on can_queue. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Cc: Roland Dreier <rdreier@cisco.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] iscsi class, iscsi_tcp, ib_iser: add sysfs chap fileMike Christie2007-06-011-14/+25
| | | | | | | | | | | | | | The attached patches add sysfs files for the chap settings to the iscsi transport class, iscsi_tcp and ib_iser. This is needed for software iscsi because there are times when iscsid can die and it will need to reread the values it was using. And it is needed by qla4xxx for basic management opertaions. This patch does not hook in qla4xxx yet, because I am not sure the mbx command to use. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Cc: Roland Dreier <rdreier@cisco.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] iscsi class, qla4xxx, iscsi_tcp, ib_iser: export/set initiator nameMike Christie2007-06-011-1/+3
| | | | | | | | | | | | | | | For iscsi root boot, software iscsi needs to know what the BIOS/OF initiator used for the initiator name so this puts it in sysfs for userspace to be able to pick up. For hw iscsi, it is nice to see what the card is using. This patch adds the new param, and hooks in qla4xxx, iscsi_tcp, and ib_iser. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Cc: Roland Dreier <rdreier@cisco.com> Cc: David C Somayajulu <david.somayajulu@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] iscsi class: add iscsi host set param eventMike Christie2007-06-011-1/+28
| | | | | | | | | The iscsi class uses the set_param event to set session and connection params. This patch adds a set_host_param so we can set host level values. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] iscsi_transport, qla4xxx: have class lookup host for driversMike Christie2007-06-011-3/+14
| | | | | | | | | | We are going to be adding more host level sysfs attrs and set_params, so this patch has them take a scsi_host instead of either a scsi_host or host no. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Cc: David C Somayajulu <david.somayajulu@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] iscsi_transport: export hw addressMike Christie2007-06-011-2/+33
| | | | | | | Add hw address sysfs file. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] iscsi_transport: Check iscsi interface skb allocation return valueMike Christie2007-06-011-6/+4
| | | | | | | | Let's not oops when we cannot allocate a skb! Add a check for if alloc_skb fails. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6Linus Torvalds2007-05-051-2/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (87 commits) [SCSI] fusion: fix domain validation loops [SCSI] qla2xxx: fix regression on sparc64 [SCSI] modalias for scsi devices [SCSI] sg: cap reserved_size values at max_sectors [SCSI] BusLogic: stop using check_region [SCSI] tgt: fix rdma transfer bugs [SCSI] aacraid: fix aacraid not finding device [SCSI] aacraid: Correct SMC products in aacraid.txt [SCSI] scsi_error.c: Add EH Start Unit retry [SCSI] aacraid: [Fastboot] Panics for AACRAID driver during 'insmod' for kexec test. [SCSI] ipr: Driver version to 2.3.2 [SCSI] ipr: Faster sg list fetch [SCSI] ipr: Return better qc_issue errors [SCSI] ipr: Disrupt device error [SCSI] ipr: Improve async error logging level control [SCSI] ipr: PCI unblock config access fix [SCSI] ipr: Fix for oops following SATA request sense [SCSI] ipr: Log error for SAS dual path switch [SCSI] ipr: Enable logging of debug error data for all devices [SCSI] ipr: Add new PCI-E IDs to device table ...
| * [SCSI] iscsi transport: use atomic for session_nr allocationsMike Christie2007-03-111-2/+4
| | | | | | | | | | | | | | | | | | qla4xxx and iscsi_tcp or iser could be creating sessions at the same time, so make session_nr id allocation atomic. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* | [NETLINK]: Switch cb_lock spinlock to mutex and allow to override itPatrick McHardy2007-04-251-1/+1
| | | | | | | | | | | | | | | | | | | | Switch cb_lock to mutex and allow netlink kernel users to override it with a subsystem specific mutex for consistent locking in dump callbacks. All netlink_dump_start users have been audited not to rely on any side-effects of the previously used spinlock. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* | [NETLINK]: Introduce nlmsg_hdr() helperArnaldo Carvalho de Melo2007-04-251-1/+1
|/ | | | | | | | | For the common "(struct nlmsghdr *)skb->data" sequence, so that we reduce the number of direct accesses to skb->data and for consistency with all the other cast skb member helpers. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* [SCSI] iscsi: newline in printkMeelis Roos2007-01-061-1/+1
| | | | | | | | This patch cures two run together printk messages in iSCSI driver. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* WorkStruct: make allyesconfigDavid Howells2006-11-221-3/+5
| | | | | | Fix up for make allyesconfig. Signed-Off-By: David Howells <dhowells@redhat.com>
* [SCSI] iscsi class: update versionMike Christie2006-11-101-1/+1
| | | | | | Update version number Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] iscsi class: fix slab corruption during restartMike Christie2006-10-251-229/+17
| | | | | | | | | | | | | | | | | The transport class recv mempools are causing slab corruption. We could hack around netlink's lack of mempool support like dm, but it is just too ulgy (dm's hack is ugly enough :) when you need to support broadcast. This patch removes the recv pools. We have not used them even when we were allocting 20 MB per session and the system only had 64 MBs. And we have no pools on the send side and have been ok there. When Peter's work gets merged we can use that since the network guys are in favor of that approach and are not going to add mempools everywhere. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] iscsi class: update versionMike Christie2006-09-021-1/+1
| | | | | Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] iscsi bugfixes: update and move version numberMike Christie2006-07-281-0/+5
| | | | | | | | The version info is useful for iscsi tcp, iser and qla4xxx so move to transport class. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] iscsi bugfixes: dont use GFP_KERNEL for sending errorsMike Christie2006-07-281-5/+5
| | | | | | | | iscsi_tcp can send error events from soft irq context so we cannot use GFP_KERNEL. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] iscsi: add async notification of session eventsMike Christie2006-06-291-82/+227
| | | | | | | | | | | | | | This patch adds or modifies the transport class functions used to notify 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. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] iscsi: pass target nr to session creationMike Christie2006-06-291-7/+7
| | | | | | | | | | | | | | | | So the drivers do not use the channel numbers, but some do use the target numbers. We were just adding some goofy variable that just increases for the target nr. This is useless for software iscsi because it is always zero. And for qla4xxx the target nr is actually the index of the target/session in its FW or FLASH tables. We needed to expose this to userspace so apps could access those numbers so this patch just adds the target nr to the iscsi session creation functions. This way when qla4xxx's Hw thinks a session is at target nr 4 in its hw, it is exposed as that number in sysfs. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] iscsi: break up session creation into two stagesMike Christie2006-06-291-29/+68
| | | | | | | | | | | | | | | | | | | | | | qla4xxx is initialized in two steps like other HW drivers. It allocates the host, sets up the HW, then adds the host. For iscsi part of HW setup is setting up persistent iscsi sessions. At that time, the interupts are off and the driver is not completely set up so we just want to allocate them. We do not want to add them to sysfs and expose them to userspace because userspace could try to do lots of fun things with them like scanning and at that time the driver is not ready. So this patch breakes up the session creation like other functions that use the driver model in two the alloc and add parts. When the driver is ready, it can then add the sessions and userspace can begin using them. This also fixes a bug in the addition error patch where we forgot to do a get on the session. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] iscsi: rm channel usage from iscsiMike Christie2006-06-291-5/+3
| | | | | | | | | | | | I do not remember what I was thinking when we added the channel as a argument to the session create function. It was probably due to too much cut and paste work from the FC transport class. The channel is meaningless for iscsi drivers so this patch drops its usage everywhere in the iscsi related code. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] iscsi: fix session refcoutingMike Christie2006-06-291-8/+2
| | | | | | | | | | | | | | | | iscsi_tcp and iser cannot be rmmod from the kernel when sessions are running because session removal is driven from userspace. For those modules we get a module reference when a session is created then drop it when the session is removed. For qla4xxx, they can jsut remove the sessions from the pci remove function like normal HW drivers, so this patch moves the module reference from the transport class functions shared by all drivers to the libiscsi functions only used be software iscsi modules. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] iscsi: fixup set/get param functionsMike Christie2006-06-291-166/+44
| | | | | | | | | | | | | | Reduce duplication in the software iscsi_transport modules by adding a libiscsi function to handle the common grunt work. This also has the drivers return specifc -EXXX values for different errors so userspace can finally handle them in a sane way. Also just pass the sysfs buffers to the drivers so HW iscsi can get/set its string values, like targetname, and initiatorname. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] iscsi: add target discvery event to transport classMike Christie2006-06-291-0/+18
| | | | | | | | | | | | | Patch from david.somayajulu@qlogic.com: Add target discovery event. We may have a setup where the iscsi traffic is 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. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] iscsi: support mutiple daemonsMike Christie2006-05-201-11/+27
| | | | | | | | | | Patch from david.somayajulu@qlogic.com and cleaned up by Tomo. qla4xxx is going to have a different daemon so this patch just routes the events to the right daemon. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] iscsi: increment expstatsn during loginMike Christie2006-05-101-1/+3
| | | | | | | | | | | | | | | debugged by Ming and Rohan: The problem Ming and Rohan debugged was that during a normal session login, open-iscsi is not incrementing the exp_statsn counter. It was stuck at zero. From the RFC, it looks like if the login response PDU has a successful status then we should be incrementing that value. Also from the RFC, it looks like if when we drop a connection then reconnect, we should be using the exp_statsn from the old connection in the next relogin attempt. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] iscsi: align printksOr Gerlitz2006-05-101-2/+2
| | | | | | | | align printk output Signed-off-by: Or Gerlitz <ogerlitz@voltaire.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] iscsi: add transport end point callbacksOr Gerlitz2006-05-101-1/+40
| | | | | | | | | | add transport end point callbacks so iscsi drivers that cannot connect from userspace, like iscsi tcp, using sockets do not have to implement their own socket infrastructure. Signed-off-by: Or Gerlitz <ogerlitz@voltaire.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] iscsi: add libiscsiMike Christie2006-04-141-103/+13
| | | | | | | | | | | | | | | | | | | | | | | | There is a lot of code duplcited between iscsi_tcp and the upcoming iscsi_iser driver. This patch puts the duplicated code in a lib. There is more code to move around but this takes care of the basics. For iscsi_offload if they use the lib we will probably move some things around. For example in the queuecommand we will not assume that the LLD wants to do queue_work, but it is better to handle that later when we know for sure what iscsi_offload looks like (we could probably do this for iscsi_iser though to). Ideally I would like to get the iscsi_transports modules to a place where all they really have to do is put data on the wire, but how to do that will hopefully be more clear when we see other modules like iscsi_offload. Or maybe iscsi_offload will not use the lib and it will just be iscsi_iser and iscsi_tcp and maybe the iscsi_tcp_tgt if that is allowed in mainline. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] iscsi: fix up iscsi ehMike Christie2006-04-141-9/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current iscsi_tcp eh is not nicely setup for dm-multipath and performs some extra task management functions when they are not needed. The attached patch: - Fixes the TMF issues. If a session is rebuilt then we do not send aborts. - Fixes the problem where if the host reset fired, we would return SUCCESS even though we had not really done anything yet. This ends up causing problem with scsi_error.c's TUR. - If someone has turned on the userspace nop daemon code to try and detect network problems before the scsi command timeout we can now drop and clean up the session before the scsi command timesout and fires the eh speeding up the time it takes for a command to go from one patch to another. For network problems we fail the command with DID_BUS_BUSY so if failfast is set scsi_decide_disposition fails the command up to dm for it to try on another path. - And we had to add some basic iscsi session block code. Previously if we were trying to repair a session we would retrun a MLQUEUE code in the queuecommand. This worked but it was not the most efficient or pretty thing to do since it would take a while to relogin to the target. For iscsi_tcp/open-iscsi a lot of the iscsi error handler is in userspace the block code is pretty bare. We will be adding to that for qla4xxx. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] iscsi: add sysfs attrs for uspace sync upMike Christie2006-04-141-54/+208
| | | | | | | | | | | | | | For iscsi boot when going from initramfs to the real root we need to stop the userpsace iscsi daemon. To later restart it iscsid needs to be able to rebuild itself and part of that process is matching a session running the kernel with the iscsid representation. To do this the attached patch adds several required iscsi values. If the LLD does not provide them becuase, login is done in userspace, then the transport class and userspace set ths up for the LLD. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] iscsi: rm kernel iscsi handles usage for session and connectionMike Christie2006-04-141-33/+73
| | | | | | | | | | | | | | | | | | | | | | | | from hare@suse.de and michaelc@cs.wisc.edu hw iscsi like qla4xxx does not allocate a host per session and for userspace it is difficult to restart iscsid using the "iscsi handles" for the session and connection, so this patch just has the class or userspace allocate the id for the session and connection. Note: this breaks userspace and requires users to upgrade to the newest open-iscsi tools. Sorry about his but open-iscsi is still too new to say we have a stable user-kernel api and we were not good nough designers to know that other hw iscsi drivers and iscsid itself would need such changes. Actually we sorta did but at the time we did not have the HW available to us so we could only guess. Luckily, the only tools hooking into the class are the open-iscsi ones or other tools like iscsitart hook into the open-iscsi engine from userspace or prgroams like anaconda call our tools so they are not affected. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] SCSI core kmalloc2kzallocJes Sorensen2006-02-271-2/+1
| | | | | | | | Change the core SCSI code to use kzalloc rather than kmalloc+memset where possible. Signed-off-by: Jes Sorensen <jes@sgi.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] iscsi update: rm unused sessions listMike Christie2006-02-041-5/+0
| | | | | | | | | | | | | | rm unused sessions list. This patch is last becuase I was not sure if this patchset was going to be applied over the kmalloc2kzalloc one by JesS. If it is then this patch will not apply and can be dropped for now. I will resend later when things setttle down. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: Alex Aizman <itn780@yahoo.com> Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] iscsi update: use gfp_tMike Christie2006-02-041-1/+1
| | | | | | | | | Use gfp_t. I accidentally removed this in our last update. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: Alex Aizman <itn780@yahoo.com> Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] iscsi update: set deamon pid earlierMike Christie2006-02-041-6/+10
| | | | | | | | | | | | | >From michaelc@cs.wisc.edu: If the transport lookup fails we set the daemon pid too late. This can cause us deadlock since the netlink code will think we meant to call back into our iscsi_if_rx function. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: Alex Aizman <itn780@yahoo.com> Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
* [SCSI] iscsi update: setup pool before usingMike Christie2006-02-041-7/+6
| | | | | | | | | | | | | >From andmike@us.ibm.com: Ensure that pool data is setup prior to calling mempool_create as it will call the the alloc function during create. Signed-off-by: Mike Anderson <andmike@us.ibm.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: Alex Aizman <itn780@yahoo.com> Signed-off-by: Dmitry Yusupov <dmitry_yus@yahoo.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
OpenPOWER on IntegriCloud