numam-spdk/lib/bdev/iscsi
Ziye Yang 75dce8a25c iscsi, initiator: solve the use after issue.
In our current code, when we call the following statement:
spdk_bdev_destruct_done(&lun->bdev, 0);

Actually lun is already freed in bdev_iscsi_lun_cleanup function
(called by iscsi_free_lun). So this patch can be used to
prevent this issue by changing the order.

Change-Id: I5ec02319b8205fafc4d8074511f5a334b9bbb3ad
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/417630
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-07-03 17:44:39 +00:00
..
bdev_iscsi_rpc.c rpc/bdev: construct RPC return a string instead array 2018-06-22 21:12:43 +00:00
bdev_iscsi.c iscsi, initiator: solve the use after issue. 2018-07-03 17:44:39 +00:00
bdev_iscsi.h bdev: add delete_iscsi_bdev call 2018-06-22 17:24:18 +00:00
Makefile bdev/iscsi: add RPC support and cofnig dump 2018-06-05 17:52:06 +00:00
README bdev: add iSCSI initiator bdev module 2018-03-21 20:35:42 -04:00

This is a very rough initial cut at an SPDK iSCSI initiator bdev module.  It
only performs operations (connect, login, read cap, read/write).
But this passes basic verify tests with bdevperf and with fio.

Configuration file for iSCSI initiator is in the following format.
Note that the "/0" at the end means "LUN 0".

[iSCSI_Initiator]
  URL iscsi://127.0.0.1/iqn.2016-06.io.spdk:disk1/0 iSCSI0

To Do Items
===========
1) Create RPCs.
2) Use asynchronous polling for connect/login/disconnect.  Read/write is already
   using libiscsi event framework.
3) Choose initiator name as part of RPC configuration.  Currently this is hardcoded
   with g_initiator string.
4) Implement reset path.
5) Implement unmap path.
6) Use REPORT_LUNS to dynamically find all of the block devices attached to the
   iSCSI target node instead of hard-coding LUN 0.  This will need some extra
   investigation in libiscsi.  Currently the full URL is used which includes the LUN.
   Not sure yet how we can login to target node and then submit IO to different
   LUNs.  Let's treat this as low priority for now.