Erez Zilber wrote: > Mike Christie wrote: >> Erez Zilber wrote: >> >>> Mike, >>> >>> We're trying to solve a problem, but first the motivation: a user may >>> want to stop the InfiniBand modules (/etc/init.d/openibd stop) while >>> open-iscsi is running. In order to do that, we must remove ib_iser. >>> >>> Now, the question: is it ok to modprobe -r ib_iser (or iscsi_tcp) before >>> >> It is and it isn't :) >> >> >>> stopping iscsid? From what I see in the init.d scripts in open-iscsi, we >>> kill iscsid first. Is there a reason for that? >>> >>> >> We kill iscsid first because it has a ref to scsi_transport_iscsi (load >> that module and run iscsid and then do a lsmod). So if you ran iscsid, >> then just modprobe -r ib_iser, it would leave scsi_transport_iscsi loaded. >> >> > > If I run /etc/init.d/openibd stop, it will (with a patch that I'm going > to submit) call iscsi_conn_failure for all iSER connections, and then > remove ib_iser. scsi_transport_iscsi will be removed later when
This does not sound right or even possible with current kernels. If a session is runing and scsi_devices exists for it and if a user has a device open then there are references to the ib_iser module. If the user does a close then it needs the scsi_host_tempalte that was allocated in the ib_iser module. For libiscsi/scsi_transport_iscsi there is similar problems with the those modules accessing the iscsi_transport struct allocated in the module. The thing is that scsi-ml should be incrementing the ib_iser refcount if a device is open. And open-iscsi should be incrementing the ib_iser refctoun if there is a session. So you should not be able to remove the ib_iser module if there are connections. > /etc/init.d/iscsi stop is called. BTW - libiscsi will also remain loaded > and will be removed when iscsi is stopped. > >> The iscsi script will also remove the running sessions, before killing >> iscsid, because if there is a session running then ib_iser would also >> have a module refcount greater than 0, and the modprobe -r would fail. >> > > This won't happen with the new patch (will send it today). I do not see how your patch works. As far as libiscsi knows there are still sessions right? Is the openib script stopping sessions and unmounting file systems? --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/open-iscsi -~----------~----~----~----~------~----~------~--~---