8f633fa1 | 10-Nov-2021 |
Kai Li <lik271@chinatelecom.cn> |
bdev/nvme: display all ctrlrs for this bdev when dump bdev nvme controller
After multipath feature is supported, one bdev will have more than one nvme ctrlr. Fore ease of view, display each ctrlr's
bdev/nvme: display all ctrlrs for this bdev when dump bdev nvme controller
After multipath feature is supported, one bdev will have more than one nvme ctrlr. Fore ease of view, display each ctrlr's trid info.
Moreover, rename nvme_bdev_ctrlr_get as nvme_bdev_ctrlr_get_by_name here to keep consistent with nvme_ctrlr_get_by_name.
Signed-off-by: Kai Li <lik271@chinatelecom.cn> Change-Id: I417506699bbea6ed13dac0fee942749757d2ae47 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10129 Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
show more ...
|
84ac18e5 | 18-Oct-2021 |
Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> |
bdev/nvme: Update ANA state if I/O failed by ANA error
If I/O got ANA error, ANA state may be out of date. So in this case read ANA log page and update ANA states. Mark nvme_ns to be updating to avo
bdev/nvme: Update ANA state if I/O failed by ANA error
If I/O got ANA error, ANA state may be out of date. So in this case read ANA log page and update ANA states. Mark nvme_ns to be updating to avoid using while updating ANA state.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: Ia43d38b3a589c84d6d0479dedcced033e76fb194 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9458 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
show more ...
|
f3fec96c | 16-Sep-2021 |
Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> |
bdev/nvme: Protect ANA log page from concurrent reads by using an new flag
If an I/O failed by ANA error, the corresponding ANA state might be out of date. In the following patches, for this case, r
bdev/nvme: Protect ANA log page from concurrent reads by using an new flag
If an I/O failed by ANA error, the corresponding ANA state might be out of date. In the following patches, for this case, read the latest ANA log page and update the ANA state. Such reading ANA log page may be done on multiple threads concurrently including AER ANA change. Hence protect ANA log page by adding an new flag ana_log_page_updating to struct nvme_ctrlr and using it.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: I8bb84091d50a5fdc0d9893b585be972dfd31c0f1 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9526 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
show more ...
|
43adb646 | 25-Oct-2021 |
Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> |
bdev/nvme: Retry failed I/O up to retry_count times
Add bdev_retry_count to spdk_bdev_nvme_opts and retry_count to nvme_bdev_io, respectively.
Set type of both to int because we want use -1 for inf
bdev/nvme: Retry failed I/O up to retry_count times
Add bdev_retry_count to spdk_bdev_nvme_opts and retry_count to nvme_bdev_io, respectively.
Set type of both to int because we want use -1 for infinite retry.
Set the default value of bdev_retry_count to zero for the backward compatibility.
bdev_retry_count is configurable by the RPC bdev_nvme_set_options.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: I9bc746fcea54aa8722c76f79c70c2ae2b375aa53 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9864 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
show more ...
|
a59b3f92 | 08-Oct-2021 |
Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> |
bdev/nvme: Retry I/O immediately if it got I/O path error
The previous patch supported I/O retry when no available io_path was found at submission.
This patch supports I/O retry when we get I/O pat
bdev/nvme: Retry I/O immediately if it got I/O path error
The previous patch supported I/O retry when no available io_path was found at submission.
This patch supports I/O retry when we get I/O path error at completion.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: I93a1664944b15ab0a826a321e2ea7a2574263afe Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9850 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
show more ...
|
ef409194 | 07-Oct-2021 |
Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> |
bdev/nvme: Retry I/O a second later if any I/O path may become available
If ANA state is inaccessible or qpair is disconnected, I/O cannot be submitted.
But if qpair is connected, ANA state may bec
bdev/nvme: Retry I/O a second later if any I/O path may become available
If ANA state is inaccessible or qpair is disconnected, I/O cannot be submitted.
But if qpair is connected, ANA state may become accessible, or if qpair is disconnected, it may become connected via resetting.
Hence even if find_io_path() returned NULL, queue I/O and retry it one second later if qpair is connected or ctrlr is resetting.
Sort retried I/Os by expiration values in ticks, and activate a timed poller per nvme_bdev_channel only if there is any retried I/O. So the poller function bdev_nvme_retry_ios() always returns BUSY because if the poller runs earlier than the closest retried I/O or runs when there is no retried I/O, it is more like a bug of the framework.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: Id28110a0d63ebc1c5772814e2ff8a47934df1644 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9830 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
show more ...
|
c93b5564 | 25-Aug-2021 |
Ben Walker <benjamin.walker@intel.com> |
bdev/nvme: Use an RB_TREE to hold namespaces in the controller
If NN is very large this saves a lot of memory. This lookup is not generally used in the I/O path anyway.
Change-Id: I98e190006843ad5d
bdev/nvme: Use an RB_TREE to hold namespaces in the controller
If NN is very large this saves a lot of memory. This lookup is not generally used in the I/O path anyway.
Change-Id: I98e190006843ad5d0bac8483bf9feb800d4a665a Signed-off-by: Ben Walker <benjamin.walker@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9884 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: GangCao <gang.cao@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
show more ...
|
2b70bf92 | 08-Oct-2021 |
Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> |
ut/bdev_nvme: Fix bug in spdk_nvme_ctrlr_reset_async/poll_async() stubs
In the SPDK NVMe driver, spdk_nvme_ctrlr_reset_async() sets ctrlr->is_failed to false and spdk_nvme_ctrlr_reset_poll_async() s
ut/bdev_nvme: Fix bug in spdk_nvme_ctrlr_reset_async/poll_async() stubs
In the SPDK NVMe driver, spdk_nvme_ctrlr_reset_async() sets ctrlr->is_failed to false and spdk_nvme_ctrlr_reset_poll_async() sets ctrlr->is_failed to true if it fails.
On the other hand, in the unit test for the NVMe bdev module, the stub for spdk_nvme_ctrlr_reset_async() does nothing and the stub for spdk_nvme_ctrlr_reset_poll_async() sets ctrlr->is_failed to false if it succeeds.
This bug made us very difficult to write unit test for I/O retry.
Hence fix this bug.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: Ic0dcf1109ce543a53fca74708fc86c8c74a17692 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9829 Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
show more ...
|
ccee9a91 | 16-Sep-2021 |
Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> |
bdev/nvme: find_io_path() excludes io_path whose ANA state is not accessible
bdev_nvme_find_io_path() selects an io_path whose qpair is connected and ANA state is optimized or non-optimized.
Signed
bdev/nvme: find_io_path() excludes io_path whose ANA state is not accessible
bdev_nvme_find_io_path() selects an io_path whose qpair is connected and ANA state is optimized or non-optimized.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: I79c978795562b606ee27aa43020684d8bcbf50c5 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9405 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
show more ...
|
56e2d632 | 28-Sep-2021 |
Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> |
bdev/nvme: Reset all ctrlrs of a bdev ctrlr sequentially
Reset all controllers of a bdev controller sequentially. When resetting a controller is completed, check if there is next controller, and sta
bdev/nvme: Reset all ctrlrs of a bdev ctrlr sequentially
Reset all controllers of a bdev controller sequentially. When resetting a controller is completed, check if there is next controller, and start resetting the controller.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: I169a84b931c6b03b36bb971d73d5a05caabf8e65 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7274 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
show more ...
|
5d62af41 | 08-Oct-2021 |
Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> |
bdev/nvme: Complete outstanding reset after canceling pending resets
Previously the NVMe bdev module had completed the outstanding reset and then canceled pending resets. This was complex.
On the o
bdev/nvme: Complete outstanding reset after canceling pending resets
Previously the NVMe bdev module had completed the outstanding reset and then canceled pending resets. This was complex.
On the other hand, the generic bdev layer cancels pending resets and then completes the outstanding reset.
Following the generic bdev layer simplifies the code and makes us easier to control retry reset, delay retry reset by a few seconds, or stop retry after repeated failures and then delete ctrlr.
Update unit tests accordingly.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: I9a68422918ebcb052b3a281316ffba9b3450ecd4 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9816 Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
show more ...
|
d456cd93 | 28-Sep-2021 |
Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> |
bdev/nvme: admin_passthru() submits to the first found unfailed ctrlr
bdev_nvme_admin_passthru() chooses the first ctrlr which is not failed.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hi
bdev/nvme: admin_passthru() submits to the first found unfailed ctrlr
bdev_nvme_admin_passthru() chooses the first ctrlr which is not failed.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: If41a1d1e1bde4bddfa92e5a385509daa3f0ce4de Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9525 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot 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>
show more ...
|
e49f77ec | 25-Aug-2021 |
Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> |
bdev/nvme: find_io_path() returns io_path instead of ns and qpair
We have io_path structure now and returning io_path rather than ns and qpair match the function name. The following patches will cac
bdev/nvme: find_io_path() returns io_path instead of ns and qpair
We have io_path structure now and returning io_path rather than ns and qpair match the function name. The following patches will cache the returned io_path into nvme_bdev_io.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: I5d773da18591fc324667f6b5c489a38f497bf3d8 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9295 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
show more ...
|
c19ec843 | 27-Sep-2021 |
Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> |
bdev/nvme: Add multiple namespaces to a single nvme_bdev
This patch removes the critical limitation that ctrlrs which are aggregated need to have no namespace. After this patch, we can add multiple
bdev/nvme: Add multiple namespaces to a single nvme_bdev
This patch removes the critical limitation that ctrlrs which are aggregated need to have no namespace. After this patch, we can add multiple namespaces into a single nvme_bdev.
The conditions that such namespaces satisfy are, - they are in the same NVM subsystem, - they are in different ctrlrs, - they are identical.
Additionally, if we add one or more namespaces to an existing nvme_bdev and there are active nvme_bdev_channels, the corresponding I/O paths are added to these nvme_bdev_channels.
Even after this patch, ANA state is not utilized in I/O paths yet. It will be done in the following patches.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: I15db35451e640d4beb99b138a4762243bee0d0f4 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8131 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
show more ...
|
be6a2fef | 11-Oct-2021 |
Ben Walker <benjamin.walker@intel.com> |
bdev/nvme: bdev_nvme_delete now takes a path_id
Specifying only a transport id is not enough. We need to be able to describe the host parameters too.
Signed-off-by: Ben Walker <benjamin.walker@inte
bdev/nvme: bdev_nvme_delete now takes a path_id
Specifying only a transport id is not enough. We need to be able to describe the host parameters too.
Signed-off-by: Ben Walker <benjamin.walker@intel.com> Change-Id: Iadbea553aee4b38e7cacab0b486e7e5746d0d1ab Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9825 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot 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: Aleksey Marchuk <alexeymar@mellanox.com>
show more ...
|
7d28aae7 | 21-Sep-2021 |
Ben Walker <benjamin.walker@intel.com> |
bdev/nvme: Rename connected_trid to active_path_id
This is the currently active path identifier in a failover scenario. The path is defined by more than just the transport identifier, so fix the nam
bdev/nvme: Rename connected_trid to active_path_id
This is the currently active path identifier in a failover scenario. The path is defined by more than just the transport identifier, so fix the name.
Signed-off-by: Ben Walker <benjamin.walker@intel.com> Change-Id: I682c6f4c54f75307e2615bf80e70358180d99fe2 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9576 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
show more ...
|
0262859f | 14-Sep-2021 |
Ben Walker <benjamin.walker@intel.com> |
bdev/nvme: Rename nvme_ctrlr_trid to nvme_path_id
This defines a unique path between a host and a target.
Change-Id: Ia3d24c1b34199a8b596aaf17900ca9694a9da77d Signed-off-by: Ben Walker <benjamin.wa
bdev/nvme: Rename nvme_ctrlr_trid to nvme_path_id
This defines a unique path between a host and a target.
Change-Id: Ia3d24c1b34199a8b596aaf17900ca9694a9da77d Signed-off-by: Ben Walker <benjamin.walker@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9505 Community-CI: Mellanox Build Bot Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
show more ...
|
c5ebb7ff | 09-Jul-2021 |
Konrad Sztyber <konrad.sztyber@intel.com> |
bdev/nvme: use asynchronous ctrlr detach functions
This patch replaces the synchronous `spdk_nvme_detach()` calls with its asynchronous counterparts in the controller unregister path.
An additional
bdev/nvme: use asynchronous ctrlr detach functions
This patch replaces the synchronous `spdk_nvme_detach()` calls with its asynchronous counterparts in the controller unregister path.
An additional poller is introduced to periodically poll the NVMe driver for detach completion. Once the detach is completed, the poller is unregistered and the nvme_ctrlr is destroyed. The poller uses the same period (1ms) as the async probe poller.
Since reset and detach cannot happen at the same time, reset_poller was renamed to reset_detach_poller and it can now store the pointer either to the reset or detach poller, depending on the circumstances.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com> Change-Id: I5eb2dd6383d98d25d1f9748af08c1a13d18acb0e Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8729 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
show more ...
|
14739d6e | 08-Sep-2021 |
Ben Walker <benjamin.walker@intel.com> |
bdev/nvme: bdev_nvme_detach_controller is now much more flexible
It can match by any provided parameter to remove paths.
Change-Id: I5e7a87342bbb90943dc97fb52f142814fcf0acfa Signed-off-by: Ben Walk
bdev/nvme: bdev_nvme_detach_controller is now much more flexible
It can match by any provided parameter to remove paths.
Change-Id: I5e7a87342bbb90943dc97fb52f142814fcf0acfa Signed-off-by: Ben Walker <benjamin.walker@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9453 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
show more ...
|
a91079fd | 22-Sep-2021 |
Ben Walker <benjamin.walker@intel.com> |
bdev/nvme: connected_trid is now an nvme_ctrlr_trid
Instead of storing an spdk_nvme_transport_id, store the object that contains it. This will make a few later patches easier.
Change-Id: I36b74889f
bdev/nvme: connected_trid is now an nvme_ctrlr_trid
Instead of storing an spdk_nvme_transport_id, store the object that contains it. This will make a few later patches easier.
Change-Id: I36b74889fe39af3b7ab2b900fb3ea4b3f39e1f83 Signed-off-by: Ben Walker <benjamin.walker@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9484 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
show more ...
|
9381d8d3 | 20-Sep-2021 |
Alexey Marchuk <alexeymar@mellanox.com> |
nvme: Update spdk_nvme_ctrlr_get_memory_domain
Allow to return more than one memory domain. This change aligns bdev and nvme API and provides more flexibility for custom transports.
Signed-off-by:
nvme: Update spdk_nvme_ctrlr_get_memory_domain
Allow to return more than one memory domain. This change aligns bdev and nvme API and provides more flexibility for custom transports.
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com> Change-Id: Ica9b12ad8463c361be6cb62ee2c0513eec0b486d Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9546 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot 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>
show more ...
|
75f1d648 | 07-Sep-2021 |
Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> |
bdev/nvme: Aggregate multiple ctrlrs into a single bdev ctrlr
This patch enables us to aggrete multiple ctrlrs in the same NVM subsystem into a single bdev ctrlr to create multipath.
This patch has
bdev/nvme: Aggregate multiple ctrlrs into a single bdev ctrlr
This patch enables us to aggrete multiple ctrlrs in the same NVM subsystem into a single bdev ctrlr to create multipath.
This patch has a critical limitation that ctrlrs which are aggregated need to have no namespace. Hence any nvme bdev is not created. However it will be removed in the next patch.
The design is as follows.
A nvme_bdev_ctrlr is created to aggregate multiple nvme_ctrlrs in the same NVM subsystem. The name of the nvme_ctrlr is changed to be the name of the nvme_bdev_ctrlr.
NVMe bdev module has both the failover feature and the multipath feature now. To choose which of failover or multipath to use, add an new parameter multipath to the RPC bdev_nvme_attach_controller.
When we attach a new trid to the existing nvme_bdev_ctrlr, we use the failover feature if multipath is false, we use the multipath feature if multipath is false.
nvme_bdev_ctrlr has a list for nvme_ctrlr and it is guarded by the global mutex. Callers can query nvme_ctrlrs from a nvme_bdev_ctrlr via trid as a key. nvme_bdev_ctrlr is not registered as io_device.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: I20571bf89a65d53a00fb77236ad1b193e88b8153 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8119 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
show more ...
|
14535253 | 15-Sep-2021 |
Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> |
bdev/nvme: Reset the nvme_ctrlr if an I/O qpair is disconnected
Previously, if an I/O qpair is disconnected, we tried reconnecting the qpair. However, this reconnect operation was very likely to fai
bdev/nvme: Reset the nvme_ctrlr if an I/O qpair is disconnected
Previously, if an I/O qpair is disconnected, we tried reconnecting the qpair. However, this reconnect operation was very likely to fail and will not match the upcoming asynchronous connect/reconnect operation. We need an extra callback to make this reconnect operation asynchronous, but we do not want to have it.
Hence if an I/O qpair is disconnected, we free the I/O qpair and then reset the corresponding nvme_ctrlr immediately. If the admin qpair is also disconnected, the nvme_ctrlr is reset immediately. However this event may never happen. So we do not wait for the error of the admin qpair.
The NVMf host may disconnect connections by itself intentionally. In this case, resetting the nvme_ctrlr will surely fail. But resetting the nvme_ctrlr frees all I/O qpairs of the nvme_ctrlr and these I/O qpairs are not created again until resetting the nvme_ctrlr succeeds. Resetting the nvme_ctrlr once at most is more efficient than repeating reconnecting the I/O qpair. So this change is valuable even for such intentional disconnection. However, it is helpful to know the event that I/O qpair is disconnected. Hence change DEBUGLOG to NOTICELOG in the disconnected callback. The disconnected callback is not repeated, and we do not need to worry about NOTICELOG flooding.
Refine the unit test case to verify this change.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: I376b749c2f55d010692bf916370e8bb4249b795f Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9515 Community-CI: Mellanox Build Bot Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
show more ...
|
cf0dbbb9 | 25-Aug-2021 |
Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> |
ut/bdev_nvme: Copy probe_ctx->opts to ctrlr->opts
In unit tests, spdk_nvme_ctrlr had opts but did not use it.
Hostnqn will be checked to determine if multipath can be created.
Hence we implement t
ut/bdev_nvme: Copy probe_ctx->opts to ctrlr->opts
In unit tests, spdk_nvme_ctrlr had opts but did not use it.
Hostnqn will be checked to determine if multipath can be created.
Hence we implement the stub spdk_nvme_ctrlr_get_default_ctrlr_opts() and copy probe_ctx->opts to ctrlr->opts as we do in lib/nvme.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: I13980424d5f463877eae7f7cd1e5ffcae888aebe Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9333 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Konrad Sztyber <konrad.sztyber@gmail.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
show more ...
|
2ee6ab36 | 20-Jul-2021 |
Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> |
bdev/nvme: bdev_nvme_reset() follow spdk_nvme_ctrlr_reset() about return value
Previously bdev_nvme_reset() returned -EBUSY if ctrlr is being destructed and returned -EAGAIN if ctrlr is being reset.
bdev/nvme: bdev_nvme_reset() follow spdk_nvme_ctrlr_reset() about return value
Previously bdev_nvme_reset() returned -EBUSY if ctrlr is being destructed and returned -EAGAIN if ctrlr is being reset.
These did not match what spdk_nvme_ctrlr_reset() returned.
Reset operation will be more important than current when multipath is supported and reset operation is made asynchronous.
Hence change bdev_nvme_reset() to follow spdk_nvme_ctrlr_reset(). bdev_nvme_reset() returns -ENXIO if ctrlr is being destructed and returns -EBUSY if ctrlr is being reset.
Additionally change the return value of bdev_nvme_failover() accordingly. After the change bdev_nvme_failover() returns -ENXIO if being destructed and returns -EBUSY if ctrlr is being reset.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: Ie2c6f8601050b1043d83de9cf01490751784e4e5 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8859 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Reviewed-by: Konrad Sztyber <konrad.sztyber@gmail.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
show more ...
|