Found with misspell-fixer.
Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: If062df0189d92e4fb2da3f055fb981909780dc04
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15207
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This is in prep for adding a new compressDev accel_fw
module that will contain all of the DPDK compressDev specifics
on it, the vbdev will make calls to the accel_fw instead.
As the accel_fw has SW based compression, we want the configure
option to apply to building the vbdev module but not the accel_sw
software implementation or the upcoming compressdev module.
Renamed to "compress" as reduce is a term specific to the vbdev
implementation of the compression to be provided by the accel_fw
and thus the same reason why we leave the test flag called REDUCE
because it's controlling tests for the reduce library as well as
the vbdev module that is using reduce. The flag does not apply
to the SW implementation of compression.
This does not affect upcoming accel_fw compressdev module, that
will have its own configure option.
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: If8ed3e48e1e3dabcaad1cd161289e78122cd9d58
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15179
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: Aleksey Marchuk <alexeymar@nvidia.com>
While lvs->destruct is set in a few places, it is never read. Since it
is not used, it is removed.
Signed-off-by: Mike Gerdts <mgerdts@nvidia.com>
Change-Id: Iee21e92c9049d143fca13930b4b5f328f9ec38f0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15716
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: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
If calloc failed, there was a NULL pointer deref.
Signed-off-by: plestk <plestringant@kalray.eu>
Change-Id: I8e4104589a283349e7251c32b1decdfdd850b9ec
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15779
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
With DPDK 19.02 the private session mempool was introduced.
See patch below in SPDK:
(5c1c946) bdev/crypto: compile with DPDK 19.02
As of latest SPDK, the privae session mempool was always
passed to rte_cryptodev_sym_session_init(). Since #ifdefs
for older DPDK versions were removed.
This patch makes it obvious which mempool is used.
Change-Id: I6572c925d8532a6cf81c516e3e274eef45236fb1
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15434
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Starting with DPDK 22.11 the struct rte_cryptodev_sym_session
is no longer part of public API. Instead the void * is used.
There is no need for SPDK to track the type of session variable,
so replace that with void * regardless of DPDK version.
Change-Id: I29f82e87a593dd1886673fe2a56145da2dbe8354
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15433
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This patch separates out the session creation and freeing
to two static functions. Later in the series it will
limit the required changes.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I9fb1070d0f5a062991ba82580886ff41c2eeaa4a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15432
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This patch is first in series that updates bdev crypto
to support DPDK 22.11. See changelog entry from DPDK:
* cryptodev: The structure ``rte_cryptodev_sym_session`` was made internal.
The API ``rte_cryptodev_sym_session_init`` and
``rte_cryptodev_sym_session_clear``
were removed and user would only need to call
``rte_cryptodev_sym_session_create``
and ``rte_cryptodev_sym_session_free`` to create/destroy sessions.
The API ``rte_cryptodev_sym_session_create`` was updated to take a single
mempool
with element size big enough to hold session data and session private
data.
So this patch abstracts out lookup for vbdev_dev as it will be used from
multiple places later in the series.
Change-Id: Ibd9ca3456b297c84f8cec162fae27f4ef064cd42
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15431
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Previously, it was possible to execute spdk_bdev_io_get_buf() on a
different thread than the one that the IO was submitted on, which is
unsafe. Now, the buffers are always allocated on the correct thread and
we do spdk_thread_send_msg() only for the rbd library functions.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I07be5a4d0bd1463e0b7cf1aaee146edc575df387
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15671
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Previously, it was possible to execute spdk_bdev_io_get_buf() on a
different thread than the one that the IO was submitted on, which is
unsafe. Now, the buffers are always allocated on the correct thread and
we do spdk_thread_send_msg() only for the reduce library functions.
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change-Id: I50bf9aa3054073636204ec3a147d464f194a8c8f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15667
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
bdev_daos_writev() had a typo where local variable `io` wasn't advancing
in a loop over iovs. To avoid such issues in the future, function argument `iov`
is used instead, there's no need for original value and it seems less error prone.
bdev_daos_readv() was updated as well to be consistent with bdev_daos_write()
Signed-off-by: Denis Barakhtanov <denis.barahtanov@croit.io>
Change-Id: I06d39f207c7b881aca950c5721f250c17d41c328
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15581
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Use the string value instead of int in raid_bdev json info.
Rename raid_bdev_parse_raid_level() to match raid_bdev_str_to_state().
Change-Id: I135269fe6de0746e661828cb1d36514b082011bd
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15308
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Community-CI: Mellanox Build Bot
Added io_outstanding in struct nvme_io_path to record outstanding
I/O number in each path, which will be used by multipath to select
I/O path.
io_outstanding gets updated for I/O sent to a namespace and not get
updated if sent to a controller.
For FLUSH case, it calls bdev_nvme_io_complete() directly and
io_outstanding is not updated for this case.
spdk_bdev_io_get_buf() is executed in the generic bdev layer.
Hence, we do not update io_outstanding for spdk_bdev_io_get_buf().
Change-Id: I47b515e0f254e5daa7e1e88799a832032b23ff34
Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15032
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Directly call bdev_nvme_io_complete() for FLUSH case.
This is a preparation for io_outstanding update in nvme_io_path. For
IO sent to a namespace, io_outstanding gets increment/decrement. For
IO sent to a controller, io_outstanding is not updated. For FLUSH
case, it's not sent to a namespace nor a controller. Directly call
bdev_nvme_io_complete() here to make it easier to understand why
io_outstanding not gets updated for FLUSH.
Change-Id: Idcf4b37a0816a327256fe87004705fb65df1b06c
Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15517
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
`BDEV_IO_NUM_CHILD_IOV` and `BDEV_RESET_IO_DRAIN_RECOMMENDED_VALUE`
are public macro definitions without `SPDK_` prefix, so we add the
`SPDK_` prefix to them.
Change-Id: I4be86459f0b6ba3a4636a2c8130b2f12757ea2da
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15425
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Currently this translation was only done for IOs that were successfully
submitted. This needs to be done on submission too, in order to pass the
proper error code to the bdev layer.
Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
Change-Id: I69bf7b33b4d3a89199e1105c7f49ceeb7ab07da4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15486
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Add an option "--generate-uuids" to bdev_nvme_set_options
RPC to enable generation of UUIDs for NVMes devices that
do not provide this value themselves. The identifier is
based on a serial number of the device, so a bdev
using this NVMe will always be assigned the same UUID.
Part of enhancement from #2516.
Change-Id: I86d76274e5702d14ace89d83d1e9129573f543e2
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15151
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
Use common structures, decoders and free functions in
RPC methods that use only bdev name as a parameter.
Signed-off-by: Rafal Stefanowski <rafal.stefanowski@intel.com>
Change-Id: I49668d744dcb7ba901df42cb5279c9e425f71041
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15457
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Checking the raid_bdev state is sufficient.
Change-Id: I86c7f4b547236a58031e8f480c7621e40f63ce12
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15472
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
It is much more straightforward to just use raid_bdev instead.
Change-Id: I887e527be3de67a688e10ff68bbc87ccd5ac3261
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14290
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Those lists match exactly the values of raid_bdev->state.
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Change-Id: I0e7fb84ef77036608afd3a71318032f536bff4e8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14187
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
per Intel policy to include file commit date using git cmd
below. The policy does not apply to non-Intel (C) notices.
git log --follow -C90% --format=%ad --date default <file> | tail -1
and then pull just the 4 digit year from the result.
Intel copyrights were not added to files where Intel either had
no contribution ot the contribution lacked substance (ie license
header updates, formatting changes, etc). Contribution date used
"--follow -C95%" to get the most accurate date.
Note that several files in this patch didn't end the license/(c)
block with a blank comment line so these were added as the vast
majority of files do have this last blank line. Simply there for
consistency.
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Id5b7ce4f658fe87132f14139ead58d6e285c04d4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15192
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>
Community-CI: Mellanox Build Bot
Support injecting data corruption for processing read/write I/O.
Add two parameters, corrupt_offset and corrupt_value, and an error
type corrupt_data.
For write I/O, inject data corruption before submitting write I/O
to the underlying bdev. For read I/O, inject data corruption after
read I/O successfully returned.
Cause the data corruption by xoring the value at the corrupt_offset
with the corrupt_value. corrupt_value is required to be non-zero to
cause data corruption necessarily.
Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: I67d8d252b06d7a221413e74996f7f894e6519556
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15028
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Community-CI: Mellanox Build Bot
This is a preparation to inject data corruption at completion for
read I/O.
Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: I839f454d643254f2b805f3d4c65282deee037d71
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15003
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
The bdev*_with_md APIs now allow to pass NULL md
pointer, so calling this function without checking
for metadata simplifies code
Signed-off-by: Alexey Marchuk <alexeymar@nvidia.com>
Change-Id: Ie4137f7a6a7628a13d14c7c9a5e9aa1ceb99d322
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15091
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Fixes commit c3a5848 where support of memory
domains was added without usage of the ext API
Signed-off-by: Alexey Marchuk <alexeymar@nvidia.com>
Change-Id: I7b318f515d7421b8876d4717c0ef293084401bbc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15089
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Fixes commit c3a5848 where support of memory
domains was added without usage of the ext API
Signed-off-by: Alexey Marchuk <alexeymar@nvidia.com>
Change-Id: Ia0d7132f11c233e334965669ab0d237c24074745
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15088
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: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
The following patches will support data corruption.
For write I/O, data corruption will be injected before submission,
and for read I/O, data corruption will be injected after completion.
To do these cleanly, use switch-case and reorder to process error
injection at submission.
Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: I3b830b4331cb4c7d0794a555957cdcc73902c14f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15026
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Community-CI: Mellanox Build Bot
If we use error bdev in general use cases, the upper layer may submit
I/O commands other than read, write, unmap, or flush.
However, before this patch, the upper layer could submit only read,
write, unmap, and flush.
To improve the usability of error bdev, pass thorugh I/Os other than
read, write, unmap, or flush.
Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: Ia642b13771f42505055f1372733825153085b805
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15027
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: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
This will make it easier to add more parameters for error injection.
Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: Ie5b22c31b5ba9d8c256d369213fa8fb4b985fa26
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15025
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: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
This is a small clean up.
Use custom JSON decoders for the io_type and error_type parameters
in the bdev_error_injection_error RPC.
Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: I528fe4a31fac7eddb8ec33594b90e107d71693be
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15024
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: Aleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
If during a channel creation, an error happens, due to incorrect parameters
e.g. wrong pool / container name, or some other internal DAOS errors (like
reaching CART context limit), bdev_daos_io_channel_create_cb() signals
about such errors, however, spdk_io_device_register() does not takes them into account.
The device creation succeeds, returning successful RPC response and leaving bdev
in the bdev lists but it's completely unusable and not amendable.
This patch tries to detect it early and return an RPC error on failure.
Signed-off-by: Denis Barakhtanov <denis.barahtanov@croit.io>
Change-Id: I04758e6243566b4e619a1420aa7c01f6041441a6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15168
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
For write, verify DIF/DIX before submission and for read, verify
DIF/DIX after successful completion.
As same as the NVMe bdev module and the NULL bdev module, DIF/DIX
verification is done based on the DIF type and DIF insert/strip is
not supported.
In near future, the bdev I/O APIs bring an I/O flag to the underlying
bdev and the malloc bdev module will be able to decide DIF/DIX
verification based on the I/O flag.
One important feature is to setup protection information when
creating a malloc disk. Otherwise, all initial reads will fail
if protection information is enabled.
For users, add some explanation about the dif_type parameter
into doc/jsonrpc.md.
Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: I93757b77c03cade766c872e418bb46d44918bee2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14985
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
The malloc bdev module supports both of interleaved and separated
metadata in this patch.
Different from the NULL bdev module, opts->block_size is a data block
size and a block size is caculated internally as a sum of
opts->block_size and opts->md_size if opts->md_interleave is true, or
opts->block_size otherwise. This will be more intuitive. Additionally,
opts->md_size accepts only either of 0, 8, 16, 32, 64, or 128.
Protection information (T10 DIF/DIX) will be supported in the
following patches.
Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: Icd9e92c8ea94e30139e416f8c533ab4cf473d2a8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14984
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Community-CI: Mellanox Build Bot
Define a options structure, malloc_bdev_opts, and use it directly for
the bdev_malloc_create RPC. To do this, bdev_malloc.h includes
bdev_module.h instead of bdev.h to have the definition of the struct
spdk_uuid, and the struct malloc_bdev_opts has a instance of struct
spdk_uuid. Clean up file inclusion together. Furthermore, use
spdk_uuid_copy() to copy uuid from the malloc_bdev_opts to the malloc
disk rather than the = operator, and remove a duplicated size check.
These are helpful to add more parameters for creation.
Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: Ief25f12586c21b1666180ce10cfc6256ede8eba9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14982
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
If we use a custom decoder for malloc disk's uuid for the
bdev_malloc_create RPC, the code is simplified. Furthermore,
when we add an options structure, we will be able to include
the options structure into struct rpc_construct_malloc directly.
Signed-off-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Change-Id: Ib36fa628569f973218f2cc5ce65a51181cd9fb71
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15125
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
spdk_nvme_probe_poll_async() can only return 0 or -EAGAIN.
But the code currently indicates that other values might be
possible - so change the code to remove that confusion.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I8e7b2e1183f6650043dd751d610d434d626efa7e
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15110
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Change 'bdev_nvme_compare_trids' to name 'bdev_nvme_check_secondary_trid'
and 'bdev_nvme_compare_namespaces' to 'bdev_nvme_check_secondary_namespace'
which better explain the aim of these function.
RPC bdev_nvme_attach_controller only response "invalid parameter"
if the path is not sucessfully added due to not meeting the conditions
in bdev_nvme_compare_trids. Add more log.
Change-Id: If9ba6ec1d397d49689aa2ed6ab74fbfa96e16afa
Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14251
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot