- 论坛徽章:
- 0
|
fc驱动(比如emulex 的lpfc)扫描lun的代码路径似乎和一般的scsi总线(如Buslogic)的扫描路径不一样。
后者会在初始化函数Buslogic_init中调用scsi_scan_host,进而调用scsi_scan_channel,scsi_scan_target和scsi_scan_lan来扫描Lun.
而前者,似乎是用fc_user_scan来调用scsi_scan_target来扫描lun的。
其中fc_user_scan是在fc driver在初始化时,通过fc_attach_transport把fc_user_scan赋给user_scan:
struct scsi_transport_template *
fc_attach_transport(struct fc_function_template *ft)
{
......
i->t.user_scan = fc_user_scan;
.....
}
而user_scan视乎是通过store_scan -> scsi_scan过来的。
但是我没有找到store_scan的调用,只在下面有static CLASS_DEVICE_ATTR(scan, S_IWUSR, NULL, store_scan);声明。不知道究竟是如何调用的? |
|