correct deregistration from scsi_transport_fc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

What is the correct sequence to register and deregister host/rport/scsi_devices
at the scsi stack?

ZFCP's sequence is like follows:

scsi_add_host
fc_remote_port_add (if port succesfully configured/opened in/by zfcp)
scsi_add_device (if unit successfully configured/opened in/by zfcp)

If a zfcp-adapter is set offline I do the following to get rid of the
entries within /sys/class/fc_*:

fc_remote_port_delete (for each rport registered for this adapter)
fc_remove_host
scsi_remove_host

Setting zfcp adapters offline it happens that the entries target0:0:0
for the old host_id 0 are still present in /sys/class/fc_transport.
The symlink "device" points to a non-existent directory
../../../devices/css0/0.0.000f/0.0.50d3/host0/rport-0:0-0/target0:0:0
of the removed host.

I observed the same behaviour when trying to delete the SCSI device
using its delete attribute before removing the host.  Furthermore I
put some printk into the release function for the SCSI device
(scsi_device_dev_release in scsi_scan.c) but this funtion is never
called -- neither if the delete attribute was used nor when the host
was completely removed.

Is there a problem with proper deregistration of kobjects for SCSI
devices in the SCSI subsystem if fc_transport is used? Or is this
obvious memory leak caused by a wrong usage of the scsi_transport_fc
interface?

Any thoughts about this problem?


Regards,

Andreas

-
: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux