Commit Graph

41 Commits

Author SHA1 Message Date
Shuhei Matsumoto
bf9dbb9f3b bdev: Use not C++ style comments // but C-style comments /* */
Change-Id: Ic3026ae58e8495586fc9c6e61a570cd050819b67
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/431080
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-10-31 22:01:47 +00:00
Jim Harris
13e69db5c0 bdev/iscsi: attach poller to lun instead of channel
There is no guarantee that the first io_channel created for
a LUN will be the last one destroyed.  So we need to attach
the poller to the LUN, not the io_channel.

While here, and related to this patch, remove the assert()
that the last channel destroyed must be on the LUN's
master thread.  This assertion simply isn't true.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I3e0dfddde2de70caec479bf1b6703f01c9d7b3a2

Reviewed-on: https://review.gerrithub.io/431375
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Liang Yan <liang.z.yan@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-10-31 16:30:13 +00:00
Darek Stojaczyk
c6eb4da6c0 doc/bdev: document iSCSI bdev module
Most to-do items in lib/bdev/iscsi/README have been
done a long time ago, leaving this file greatly outdated.
It is removed now and the iSCSI bdev description is
added to doc/bdev.md.

Since most of the to-do items have been done, this
patch also adds a CHANGELOG entry announcing that
iSCSI bdev is no longer in experimental state.

Change-Id: I186c9e1489547152655e1e036b27ab6bc17fcf11
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/429896
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-10-18 22:02:48 +00:00
paul luse
16f9d58ab5 doc: small update to iscsi bdev readme
Added reminder to build with the iscsi configuration option.

Change-Id: I1e4e325394368f2bc3462761a3793f4b0edb065c
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/428397
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-10-09 21:15:56 +00:00
Seth Howell
60a208c004 iscsi: free lun after bdev_destruct_done returns
This prevents us from using the bdev embedded in the lun after it has
been freed.

Change-Id: I780cf3eccca05a58d3461366fec024be42b8ff74
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/425174
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-09-10 21:08:39 +00:00
Ben Walker
c94020001a thread: Add a name parameter to spdk_register_io_device
This is a string name used for debugging only.

Change-Id: I9827f0e6c83be7bc13951c7b5f0951ce6c2a1ece
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/424127
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-09-05 16:00:54 +00:00
Dariusz Stojaczyk
5a5630acb2 bdev/iscsi: unregister io_device on bdev destruction
Fixes a memory leak and a possible data race.

Change-Id: Ib094ca62e66d8d3a88b0acccc92e69214d413e72
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/420573
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-07-27 18:58:53 +00:00
Dariusz Stojaczyk
dbd4e57994 bdev/iscsi: properly free pending connections on module fini
Besides the obvious memory leaks, we also need
to call the async completion callback, which may
also free some resources.

Change-Id: Ia80799be4b220053b82dfb4ee2453181c90136a1
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/420571
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2018-07-27 18:58:53 +00:00
Dariusz Stojaczyk
2a55d70387 bdev/iscsi: fix lun->mutex leak
It was never destroyed.

Change-Id: If10b23b0a6784994a5aac85968f7efb99fa6ba70
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/420570
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-07-27 16:25:17 +00:00
Dariusz Stojaczyk
244c9ab9eb bdev/iscsi: fix memory leaks on connection failures
create_iscsi_lun freed the provided parameters under
one condition, and did not under some other. The
behavior is now clarified.

When create_iscsi_lun succeeded, the parameters are
passed to an iscsi bdev and will be freed together
with its removal, but if the bdev could not be created,
the params need to be freed manually.

Change-Id: I010421d48461b365a324488029e11c90a4e20a37
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/420569
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-07-27 16:25:17 +00:00
Dariusz Stojaczyk
3d9690a5e5 bdev/iscsi: remove g_iscsi_lun_head
It is not required anymore.

Change-Id: Ic16003311a451a223a626eca63cd9308a196bbdc
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/420568
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-07-27 16:25:17 +00:00
Dariusz Stojaczyk
ab0c11353e bdev/iscsi: simplify module finish
Bdev module fini is triggered after all bdevs get
unregistered - this includes all iscsi bdevs. There's
no need to unregister/free them manually.

A few words for the iscsi_logout_async call, which was
never possibly called, but is now completely removed:
Destroying the iscsi context, which is done at bdev
destruction, will "tear down any existing connection"
as the libiscsi docs say, so there's apparently no
need to perform a manual logout.

Change-Id: Id163668a19a1d4b9bcd7538ecd1c0febae0fe47a
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/420567
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-07-27 16:25:17 +00:00
Chunyang Hui
5d53d43e3b bdev/iscsi: add inquiry for unmap support
Check logical block provisioning unmap (lbpu) bit
to check whether unmap is supported when
constructing device.

Change-Id: Id45f1e44b25af6377563cc217460e2d00dd205c0
Signed-off-by: Chunyang Hui <Chunyang.hui@intel.com>
Reviewed-on: https://review.gerrithub.io/419974
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-07-25 15:41:58 +00:00
Chunyang Hui
ee909296b4 bdev/iscsi: fix bdevperf iscsi reset
When testing iscsi reset with bdevperf, all tasks
before will be canceled. And the return status will
be set to CANCELED. We need to trace this status.

For submit_td, sometimes, segfault is thrown because
in bdev_iscsi_io_complete the iscsi_io->submit_td points
to a invalid address. And assigning the submit_td in
bdev_iscsi_submit_request prevent this from happening.
Already tested with bdevperf and bdevio for all io types.

Change-Id: Ib2bf8e2a111c4b3edb5ed88dfd2c91ed6acc5c48
Signed-off-by: Chunyang Hui <Chunyang.hui@intel.com>
Reviewed-on: https://review.gerrithub.io/419932
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-07-24 01:06:23 +00:00
Chunyang Hui
8658d568a6 bdev/iscsi: Add reset function for iscsi initiator
Change-Id: I77c2b81878ebcb18dd9efffa394c1d07f523f780
Signed-off-by: Chunyang Hui <Chunyang.hui@intel.com>
Reviewed-on: https://review.gerrithub.io/417797
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
2018-07-12 20:28:57 +00:00
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
Chunyang Hui
8b38468db4 bdev/iscsi: Add unmap support for iscsi initiator
Change-Id: I6dc83322385ecd332f6898f182192773824375cf
Signed-off-by: Chunyang Hui <Chunyang.hui@intel.com>
Reviewed-on: https://review.gerrithub.io/417086
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-06-28 18:19:52 +00:00
Tomasz Zawadzki
160850f0a6 rpc/bdev: construct RPC return a string instead array
Construct calls that create single new bdev,
now return a string instead of array with single element.

Change-Id: Iad841b8e5eab0265693efb6be472354ea616c562
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/416081
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-06-22 21:12:43 +00:00
Tomasz Zawadzki
6be654aad7 bdev: add delete_iscsi_bdev call
Since delete_bdev should be used only for debug purpose,
this patch adds delete call specific for iSCSI bdev.

No changes in spdkcli, since it is not implemented yet.
Tests unchanged, because test is only done by running
bdevperf and exiting. Without time to delete_iscsi_bdev.

Change-Id: I8341bfb65932a1deb1fb6463e11ef932d6f6d597
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/415678
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-06-22 17:24:18 +00:00
Jim Harris
7717cfcacc bdev/iscsi: fix double spdk_bdev_module_finish_done() call
bdev_iscsi_lun_cleanup() was not accounting for LUNs
getting cleaned up before the module_finish function
was called.  This resulted in the bdev/iscsi module
calling spdk_bdev_module_finish_done twice which
resulted in io_device_unregister not found errors and
possible seg faults.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I42c3e0af250e0abcea1cd88ffd3c041ebdaeea49
Reviewed-on: https://review.gerrithub.io/415372
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-06-15 20:57:08 +00:00
Ziye Yang
4f47c066c9 iscsi initiator: remove the deleted variable.
I do not think that this variable is needed.
The rpc system will be always executed in the first
call, so there is no sync issue, add a deleted variable
and put the free in the loop sounds not very clear.

For the ASAN issue (use req after free), I think
that the correct solution is that: we should store
the context first instead of defer the free of req.

Change-Id: I49ca2708ddc2c5533bb3a0aee4622ae23bfe47c6
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/414726
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-06-14 02:54:27 +00:00
Vishal Verma
9380f06bdc iscsi: Correct return code values of bdev iscsi pollers
This corrects return code value of the bdev iscsi pollers. It was
needed to ensure all the pollers output consistent return code
values. This will further help in measuring consistent poller busy,
idle or unknown tsc stats.

Change-Id: I19c678bee9079f6aa453a4b925819a5ea1086534
Signed-off-by: Vishal Verma <vishal4.verma@intel.com>
Reviewed-on: https://review.gerrithub.io/414722
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-06-12 20:52:45 +00:00
Pawel Wodkowski
bd52bfecb5 bdev/iscsi: add poller when there is no master channel
Target might want to send Asynchronous Message that we need to handle.
Of course this need further work but at least we can respond to NOP

This patch also open a way to remove bdev_iscsi_conn_req structure as it
make more troubles than need when managing connections request.

Change-Id: Ib5bc8ae3bc5f90219bb4e13aee1b2e637b458236
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/410891
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-06-12 18:01:03 +00:00
Chunyang Hui
c739083169 bdev/iscsi: Add bdev_iscsi_flush
Change-Id: I6afb19f205be983206ce33c5c79718eb32ff5467
Signed-off-by: Chunyang Hui <Chunyang.hui@intel.com>
Reviewed-on: https://review.gerrithub.io/413715
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-06-12 17:44:57 +00:00
Ben Walker
a83f91c29a thread: Replace #include of io_channel.h with thread.h
Change-Id: I6babd4cf990bf19b510db88bdfb0ca81e29d9252
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/414700
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Madhu Pai <mpai@netapp.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-06-12 15:24:07 +00:00
Jim Harris
c796b90747 bdev/iscsi: break out common code for completing a conn_req
Suggested-by: Ziye Yang
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I6ca7f08aed2e12c59518269c7b277895b4817bd8

Reviewed-on: https://review.gerrithub.io/413844
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-06-06 16:05:57 +00:00
Pawel Wodkowski
fba68d61e1 bdev/iscsi: add RPC support and cofnig dump
Also, as we are here, switch to new spdk_json_write_named_* API in
bdev_iscsi_dump_info_json()

Change-Id: Ib29466eb5c6d6496dd1d8efc1f2064577bf56272
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/406635
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-06-05 17:52:06 +00:00
Pawel Wodkowski
06fdb62b3b bdev/iscsi: make connection poll time 0.5ms
Change-Id: Ib8d77b44ef10b03d6554c32f78e92f197f6c7e7f
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/412839
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-06-05 17:52:06 +00:00
Pawel Wodkowski
a76cc7ce61 bdev/iscsi: add create callback
Also convert bdev_iscsi_set_module_init() into new callback.

Change-Id: I439369180e1e10eab5dee6aba27ffb0489ea2550
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/410095
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-06-05 17:52:06 +00:00
Ben Walker
bcff4c89b8 bdev: Rename spdk_internal/bdev.h to spdk/bdev_module.h
This will become the public interface for implementing
bdev modules. Right now the file exposes too much of
the guts of the bdev layer to modules, so it needs
to be stripped down.

Change-Id: Ie8b8c3271d51fdb8d0c24a80244b3f3e510c8790
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/412297
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-05-25 16:02:22 +00:00
Pawel Wodkowski
9a7d4d53b3 bdev/iscsi: set user/password if provided in URL
Change-Id: I30748b4f53a966750cdcbd890a2d5bae72e8bf54
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/411434
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-05-25 16:01:40 +00:00
Pawel Wodkowski
c099f120cc bdev/iscsi: save initiator iqn name
This was omitted in one of previous commits.

Change-Id: I93ed4bae671bb36bf2b714ff6649b1f33a692647
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/410094
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-05-17 17:11:59 +00:00
Pawel Wodkowski
19e207dbcc bdev/iscsi: set target name during connection
Change-Id: I6143bc32331d2eea6d9b524816c9a7f0041e00aa
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/410093
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-05-17 17:11:59 +00:00
Pawel Wodkowski
5f2ad2620b bdev/iscsi: save string url rather than struct iscsi_url
iscsi_url is not need after bdev creation. Also implementing get_config
RPC call in next patches is quite problematic as information how bdev is
created using iSCSI URL is lost (eg username).

Change-Id: I8b097617c09bd4636c28531ca20a59919b2b4f84
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/407769
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
2018-05-17 17:11:59 +00:00
Pawel Wodkowski
81866c26d8 bdev/iscsi: move libiscsi code from initialize to create function
Change-Id: I75876cca6a35b366ce7d52cbd0eda0df4b6d9817
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/410890
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-05-17 17:11:59 +00:00
Pawel Wodkowski
d2bd0a77a3 bdev/iscsi: add ERRLOG in iscsi_connect_cb
Change-Id: I05ea1cb5c3b331338623dea1c6d113f2bb7388ca
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/410092
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-05-17 17:11:59 +00:00
Daniel Verkamp
87295c3c2c bdev/iscsi: silence clang enum conversion warning
This assignment is converting from the libiscsi sense key enumerated
type to the SPDK one, and clang issues a warning for this case.  We know
that these enums are equivalent, so just add a cast to avoid the
warning.

Change-Id: Ie2619b3ddeda46419df1a37755125bfeb6ddf636
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/409963
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-05-09 16:57:12 +00:00
Ziye Yang
9df6188781 iscsi_initiator: Make the disconnect in async mode.
Change-Id: I06335ea1c552afba4025eb0c52abdd3488b02262
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.gerrithub.io/407236
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-04-25 20:20:34 +00:00
Ziye Yang
ec5cf8a221 bdev/iSCSI: Make the connection connect in async mode.
Change-Id: I9d3b56ed908273c6853014241a28237f8d077cfa
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/405537
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-04-18 12:31:31 -04:00
Pawel Wodkowski
5f6c428dbc bdev/iscsi: initialize g_iscsi_lun_head staticly and make iqn per bdev
Change-Id: I3cdf920a937209fd03cf3998c7927e505504b5f9
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/407767
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-04-16 19:14:54 -04:00
Jim Harris
2af15344ab bdev: add iSCSI initiator bdev module
This uses libiscsi to implement an iSCSI initiator bdev
module for SPDK.  Still a lots of work to do on this - posting
it in case anyone is interested in working on this further.

A number of todo items are listed in a README in the lib/bdev/iscsi
directory.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Change-Id: I060e33de0cd6796246789bf0e1bb4f2df59d8f71
Reviewed-on: https://review.gerrithub.io/390313
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-03-21 20:35:42 -04:00