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>
Use a dedicated function to complete the raid bdev_io.
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Change-Id: I2ef0d19b31064b56c63866713f18deccafaeb8f7
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471087
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>
Pass raid_io instead of bdev_io to raid_bdev_queue_io_wait() and its
callbacks to eliminate unnecessary type conversions. Pass bdev and
io_channel directly as parameters instead of passing a base device
index.
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Change-Id: Iecbf351ec1598b29709e7ccff2efb1776faf11f9
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471086
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
These will also be used in the next commit.
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Change-Id: Iffd1a6e7fda2fc1688f3923777c085dcacc8613d
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473453
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>
Don't pass the error code to the function and instead move the -ENOMEM
check to the callers where it makes more sense.
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Change-Id: Ib2fa92315dc2973d4023fd9509950589de946614
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473452
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 make it easier to get to the raid_bdev when we only have the
raid_io.
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Change-Id: I91df14f788a51ada10b0f8356de2162c1f34520c
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471085
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 block size of non-disk files can't be automatically detected,
so add an argument to specify it.
Signed-off-by: Yao Liu <yotta.liu@ucloud.cn>
Change-Id: Ia11ab177b78c66ede4a09a997bba28827d83ec25
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473607
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Add a status field to the IO context struct and use it to track
whether an indiivdual crypto op has failed or not so we know
how to complete the bdev IO.
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: If93bc9938c578184c2db9e015eee50ab758c90f0
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471693
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 patch adds support for saving VMD subsystem's configuration to a
JSON formatted file. It allows saving and then loading configuration
with VMD enabled without having to send the `enable_vmd` RPC.
Change-Id: I59b380ec1e1f25f60f45d2363724ed7ac78c365c
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473405
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>
Signed-off-by: Yao Liu <yotta.liu@ucloud.cn>
Change-Id: I74b5b146c23e5395d26f80ca4f950631bd4721cb
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473373
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Without this flag, write requests will lead to I/O errors.
Signed-off-by: Yao Liu <yotta.liu@ucloud.cn>
Change-Id: I39a453683f7b2cbcd49fb8e0b532bf09f9180a8c
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473372
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>