]> git.proxmox.com Git - ceph.git/blob - ceph/src/spdk/doc/iscsi/hotplug.md
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / spdk / doc / iscsi / hotplug.md
1 # iSCSI Hotplug {#iscsi_hotplug}
2
3 At the iSCSI level, we provide the following support for Hotplug:
4
5 1. bdev/nvme:
6 At the bdev/nvme level, we start one hotplug monitor which will call
7 spdk_nvme_probe() periodically to get the hotplug events. We provide the
8 private attach_cb and remove_cb for spdk_nvme_probe(). For the attach_cb,
9 we will create the block device base on the NVMe device attached, and for the
10 remove_cb, we will unregister the block device, which will also notify the
11 upper level stack (for iSCSI target, the upper level stack is scsi/lun) to
12 handle the hot-remove event.
13
14 2. scsi/lun:
15 When the LUN receive the hot-remove notification from block device layer,
16 the LUN will be marked as removed, and all the IOs after this point will
17 return with check condition status. Then the LUN starts one poller which will
18 wait for all the commands which have already been submitted to block device to
19 return back; after all the commands return back, the LUN will be deleted.
20
21 @sa spdk_nvme_probe