From 1054432d0647e30eac6b20aca33c7dae67fe0160 Mon Sep 17 00:00:00 2001 From: Cunyin Chang Date: Fri, 10 Mar 2017 13:07:33 +0800 Subject: [PATCH] doc: Add initial documentation for iscsi hotplug. Change-Id: I432b83c9bf4a39cd061579d0318b91903299e080 Signed-off-by: Cunyin Chang --- doc/Doxyfile | 1 + doc/iscsi/hotplug.md | 21 +++++++++++++++++++++ doc/iscsi/index.md | 1 + 3 files changed, 23 insertions(+) create mode 100644 doc/iscsi/hotplug.md diff --git a/doc/Doxyfile b/doc/Doxyfile index a09a856a2..dbf05753f 100644 --- a/doc/Doxyfile +++ b/doc/Doxyfile @@ -768,6 +768,7 @@ INPUT = ../include/spdk \ ioat/index.md \ iscsi/index.md \ iscsi/getting_started.md \ + iscsi/hotplug.md \ nvme/index.md \ nvme/async_completion.md \ nvme/fabrics.md \ diff --git a/doc/iscsi/hotplug.md b/doc/iscsi/hotplug.md new file mode 100644 index 000000000..7ecd06651 --- /dev/null +++ b/doc/iscsi/hotplug.md @@ -0,0 +1,21 @@ +# iSCSI Hotplug {#iscsi_hotplug} + +At the iSCSI level, we provide the following support for Hotplug: + +1. bdev/nvme: +At the bdev/nvme level, we start one hotplug monitor which will call +spdk_nvme_probe() periodically to get the hotplug events. We provide the +private attach_cb and remove_cb for spdk_nvme_probe(). For the attach_cb, +we will create the block device base on the NVMe device attached, and for the +remove_cb, we will unregister the block device, which will also notify the +upper level stack (for iSCSI target, the upper level stack is scsi/lun) to +handle the hot-remove event. + +2. scsi/lun: +When the LUN receive the hot-remove notification from block device layer, +the LUN will be marked as removed, and all the IOs after this point will +return with check condition status. Then the LUN starts one poller which will +wait for all the commands which have already been submitted to block device to +return back; after all the commands return back, the LUN will be deleted. + +@sa spdk_nvme_probe diff --git a/doc/iscsi/index.md b/doc/iscsi/index.md index a5951cac6..66a4477cc 100644 --- a/doc/iscsi/index.md +++ b/doc/iscsi/index.md @@ -1,3 +1,4 @@ # iSCSI Target {#iscsi} - @ref iscsi_getting_started +- @ref iscsi_hotplug