When we moved to shared session a limitation of one crypto
volume was accidnetally introduced. Add a limit to keep the
session pool size down and print debug message when its hit.
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Ic55efd554f37c4f44149edfbfe037420d8d61ce6
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/474264
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
The patch adds zone address to Open Channel LBA translation as well as
initial support for read and write commands. Each IO command is
currently limited to a single zone (chunk).
Change-Id: I3ee6d58323871f0651ac1d5e8dda28eb6d687a95
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467149
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Other NVMe bdev modules (e.g. OCSSD) need the definition of the
nvme_io_channel to be able to send IO requests, so this structure has to
be defined in the common header.
Change-Id: I550d15d091078588c6c7ab824d883e049ec5a72c
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470019
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Added a way to create and delete OCSSD bdevs on top of OC NVMe
controller. The controller can be created using the regular NVMe bdev
RPC call. For instance, the following (assuming 0000:00:04.0 is an
OC device):
rpc.py bdev_nvme_attach_controller -b nvme0 -a 0000:00:04.0 -t pcie
rpc.py bdev_ocssd_create -c nvme0 -b nvme0n1
creates Open Channel controller nvme0 and OCSSD bdev nvme0n1 on top of
it. The bdevs can be deleted either by the bdev_ocssd_delete call or by
deleting whole NVMe controller, in which case all bdevs are destroyed.
Change-Id: I9f2f02103fc5570a53bd26479c8690be206829c3
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468984
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This patch adds initial Open Channel zoned bdev implementation. The
bdev will allow to use the zoned API on top of OCSSD devices.
Added the ability to create the OCSSD NVMe controller. The controller
is created using the regular NVMe's RPC when the controller is detected
to be Open Channel.
Change-Id: I31d271126dba4369ac2eaebd4cc7bdd460e5f808
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467147
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
A recent change in the CryptoDev API means that failure to enqueue
all attempted submissions does not automtically mean busy. We need
to check the status of the last submitted op and only retry if
busy, otherwise fail the IO.
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I0873d07a430a08f5aee25581e47187ef60ba8542
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472400
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Previously we would sit in the submission routine and spin on the
poller and then retry in the event that we could not get CryptoDev
to take all of the ops that we had available.
The implementation was fine however a recent CryptoDev change
requires us to now check the status of attempted submissions
instead of assuming that the device was busy. If there was
another reason for the failure we don't want to retry or we'll
be stuck in an endless retry loop.
Changing the current device full handling to match what was
done in the compression vbdev makes it easier to handle the
new condition and also makes the two vbdevs more consistent
with regards to how they manage the DPDK framework API.
This patch only changes how we handle full conditions to put
the ops on a linked list and resubmit them the next tie the
poller runs naturally. A following patch will handle the
CryptoDev API change that instigated this change.
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Idcb6e06b6826045f23e59b64eca051f3eee2b850
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472309
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This was previously named "active" as in "active
namespace". But we're really using this flag to keep
track of whether the namespace structure is currently
populated with data structures, bdevs, etc. for the
associated namespace. If we find an active namespace
on an SSD that is not populated with bdevs in the
bdev/nvme module, then we need to populate it.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ie66a5ffbcb52dd0e8f8e67a14f66f19d325d91bd
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475933
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This gives per-type ns handlers a way to associate
the generic nvme_bdev_ns structure to any type-specific
context.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Id632b41bc3ad842c8ec5e836436bd081e8cad496
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475926
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This function can now be easily moved inline to
its single caller.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I55a20dfb9f6cdeee2541b02b63fd5422786c551c
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475925
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Some namespace types such as OCSSD need to do some additional
operations before being ready to populate bdevs for a namespace.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I67a56f1238e70b8d6fa8c4452fec7df3b7fddb03
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475924
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This is in preparation for making this code path
asynchronous. For now we will just call this function
immediately after calling the per-ns-type populate
namespace function.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I6e397901b2489287634b1d21e57f92e0abcf48e0
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475923
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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This is in preparation for making this code path asynchronous.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ifd0ca2a997f5d89307deb7ae686480544fb73140
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475922
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This is in preparation for making the per-ns-type
populate_namespace functions asynchronous.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I63176e0d117eb91de82b3f8b68a18de592e0a980
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475921
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
There's no need to support cb_fn/cb_arg parameters
to bdev_nvme_populate_namespaces. Just have it
call populate_namespaces_cb() directly.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I9cf5f1f79ea8650b2e82654a0ce770d89e0a06f7
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475920
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
OCSSD is handled specially now by nvme_ctrlr_populate_namespaces,
so we don't need any extra handling.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I39a9f0a9d14aa8c32c1fda6055e26d8eb712b107
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475919
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Some NVMe modes will be creating bdevs by their own.
For such case they have to have a way to add and remove
bdevs to/from controller.
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ia188ad43695689358569cfd230b6bc39c15efce2
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469980
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Rename common remove functions so that they align
with naming convention.
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I8200c2f916ff45e03fb097c5f78eff0782b96c86
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/474248
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This is a part of changes required by upcoming patch.
This will also require moving bdev_nvme_unregister_cb
function to common.c.
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Icc14534db4aec903542a94588d22b0ea9d43f47a
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470439
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
The OCSSD ones are just nops for now.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Iab87bd8110dac2ba2f81d056f0034a53818e2b17
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475799
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Let's reuse this function in the remove path, to avoid
some code duplication.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I33519e093dafc71e7ccb6aad40638d33a820a0a5
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475798
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Now call it nvme_ctrlr_depopulate_namespace, to match
some of the recent renaming.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I3953530e3322925ca0b4a5c72bfba4a90cecf35c
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475797
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This will better match the recent renaming to the
functions associated with this flag.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ia7a0f3a50ae59b1d76d66443c91a98dc576f4d09
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475796
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Eventually these may be defined by the NVMe spec, but
for now add something local to the bdev/nvme module.
These will currently only differentiate "standard"
namespaces from ocssd namespaces.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I7853c97f3d3c28fd9f2fcd2440c57dc262954b46
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475795
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
These basically do the same thing. We'll basically
keep the populate function name, but apply it to the
existing update function.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I005e983c86f2f714a240b3ba77bd2ca9463687ee
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475794
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
We're going to reuse this code in a more common path
which would raise the visibility of these noticelogs
significantly. These aren't exceptional conditions,
so there's no need to print them when they happen.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I1b56e3a4e5603e223bae07dc1c9e1ada03ba5901
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475793
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
A controller with no namespaces is perfectly valid.
So remove the noticelog when a controller with no
namespaces is found. This helps reduce some complexity.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ica184f1209414185dd4df3531f3a1002a2899590
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475792
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
It is done to allign with the new way of handling NVMe
bdevs vs namespaces.
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ic541e3ef244e538dff3990bf2be003dcc0349721
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471703
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Close can't fail. And if it did, we still want to release
the sock memory.
Change-Id: I0e4f4d23d49f32132f4526fef8587823ace0a774
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475311
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This will allow us to reset the controller when we get disconnect events
from the underying transports.
Change-Id: I825985219f98ff65cfcf7581757bd26db5bd08ba
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473762
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>
When doing a controller reset on an nvme bdev, we should always use the
bdev_nvme_reset function which ensures that we destroy all of the I/O
qpairs before performing the reset. This prevents us from performing a
reset and leaving the I/O qpairs in a disabled state preventing I/O from
being processed.
Change-Id: I6309421322f6c884327ade4515fc9402b25c0c1a
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473743
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>
The generic bdev layer currently has a lot of snychronization built into
spdk_bdev_reset. However, in a couple patches I am going to introduce a
few instances where I call bdev_nvme_reset directly from this module.
The reason I call bdev_nvme_reset directly from this module is so that I
don't have to open a descriptor to the bdev in the module itself.
In order to be able to call bdev_nvme_reset from both this module and in
response to a bdev_io, we need to synchronize and queue reset requests.
Change-Id: I7ece41119cba705a7481d365d20a1eb746a80f64
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473754
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>
This is used to calculate more accurate interval between two
calls of bdev_get_iostat RPC.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ib561b056bc8095aa23d04cb5f9ae6f558b157124
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475167
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: GangCao <gang.cao@intel.com>
Two parameters' order in deference and definition are inconsistent.
Change-Id: I62c6ef81b8044a75646dd3279ad2e6861436ef41
Signed-off-by: Hailiang Wang <hailiangx.e.wang@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/475192
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Signed-off-by: Yao Liu <yotta.liu@ucloud.cn>
Change-Id: Ic060a62f20c97dcc0c52ad761f848074efaade3d
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/474180
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>
Signed-off-by: Yao Liu <yotta.liu@ucloud.cn>
Change-Id: I9a3bf72175d8bf9ede7149fb6ea14dc9931ce1f6
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/474179
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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Signed-off-by: Yao Liu <yotta.liu@ucloud.cn>
Change-Id: If86ef2dad60260b5261fc05d075625dfa2ed0340
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/474178
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>
This is the data structure we end up using here anyways, and it will
make this function a little bit more versatile.
Change-Id: I530cb5b1b94f57cad4bb3931fc4b7a6335b6a00e
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473742
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>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Also, add a small callback function to display an error when reset
fails.
Change-Id: I74c9e9f6842cbd3b608eae2178bd3605cd642fbd
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473741
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
The new name, _bdev_nvme_reset_create_qpairs_done will help distinguish
it from a future function _bdev_nvme_reset_complete which will become
the new completion point for a reset.
Change-Id: I4f538a57e3c3de6c21afdd79febcdf01ad079342
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/474606
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Some future NVMe namespace types will be able to
create multiple bdevs per one namespace. This
patch makes it possible.
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I47b4c1fc545c59dcc3171ab0960f1835b6aa6d24
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471620
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
In future implementations it will be possible to create
different types of namespaces (standard, OCSSD, ...).
This patch introduces new nvme_namespace type which
will make possible to implement such cases.
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I27747d3985915f45c0e0a28dd5f391cca06b13cc
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471273
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.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>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Add registration and unregistration of block zoned bdev. Attach it to the
underlying bdev during creation and unattach at deletion.
Signed-off-by: Mateusz Kozlowski <mateusz.kozlowski@intel.com>
Change-Id: I773aff6c7609952f28c02dd1794f0529a781b2e1
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468033
Community-CI: Broadcom SPDK FC-NVMe 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: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Adding new bdev module - zoned block device virtual bdev. It should be
possible to build on top of a regular (ie. non-OCSSD) bdev and surface
a zoned device API instead.
Added create and deletion functions for this bdev.
Signed-off-by: Mateusz Kozlowski <mateusz.kozlowski@intel.com>
Change-Id: Ia383483007117d1c826298fd391467a51fa2fe4e
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468030
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Add a function pointer to raid_bdev_module to be called before the bdev
is registered and a corresponding one to be called before the bdev is
unregistered. This allows setting up the bdev parameters and any custom
initialization/cleanup required for the raid module.
Change-Id: Ib9fe8f0365ca47f499a50630f582399e7bb9fd0f
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/472714
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This function should only be called for raid_bdev in 'configuring'
state, so convert the 'if' statement that checks that to an assert. Also
add an assert for the number of discovered base bdevs.
Suggested-by: Jim Harris <james.r.harris@intel.com>
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Change-Id: Ib2fdf2af64ff0e9b458af4070321d138508a3df8
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473966
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>