LoginSignup
0
0

More than 3 years have passed since last update.

fc_remote_port_add契機のSCSIデバイススキャン処理

Posted at

linuxのSCSIはUpper,Middle,Lowの3層から成っている。参考: Linux SCSI サブシステムの徹底調査
SCSIのシステムを構成する要素の一つにscsi_transportという層がある。(これがどの層にあたるかは不明。Middleかな?)その中でもFibreChannel用のscsi_transport_fcというモジュールがある。
scsi_transport_fcがなにをするものかというとソースを見るにFibreChannel特有の処理をsysfsインターフェースから行えるようにするもののようだ。

FiberChannel transport specific attributes exported to sysfs.

主要なFCドライバはscsi_transport_fcをサポートしており、初期化時のLUスキャン処理などもscsi_transport_fc経由で行われる。本記事では調査した備忘録を兼ねてscsi_transport_fc経由のスキャン処理を記述する。シーケンス図および説明を以下に示す。

remote_port_add.png

  1. FCドライバがターゲット(remote fc port)を見つけると、fc_remote_port_addを呼び出し、scsi_transport_fcにターゲットの存在を通知する
  2. scsi_transport_fcはremote_portに対応する構造体の作成と、WorkQueue経由でKernelにSCSIのスキャン処理を依頼する。作成した構造体はFCドライバに即返す。
  3. Kernelはevents/XからWorkQueueに積まれたscan_workを実行し、SCSIドライバのスキャン処理を実行する
  4. SCSIドライバはscsi_scan_targetから連なる一連のSCSIスキャン処理を実施しLUを認識する
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0