Currently GPT keeps the bdev it is examining open, even after determining there is no GPT on it.
It is due to spdk_gpt_base_free() not notifying bdev layer to free base bdev_part.
Additionally release of bdev module for that bdev was moved to bdev_part_free,
as the module is not claimed until bdev_part on base bdev are created.
Functional tests added to verify the changes.
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Id75f88259267847e8ec476d19750dc1e2690f11a
Reviewed-on: https://review.gerrithub.io/378621
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Reported-by: Cunyin Chang <cunyin.chang@intel.com>
Change-Id: I94ec3a5f43839f1fa4379d2f275c4e19f81e1a52
Reviewed-on: https://review.gerrithub.io/378003
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This moves towards the ability to queue ios while
a reset is in progress.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ibb8efbcec3931f966eb43030ea91945dfaaa5a77
Reviewed-on: https://review.gerrithub.io/377827
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
First, improve packing of spdk_bdev_io. Move any
fields which must be zeroed into the first cacheline.
Also change type and status from enums (needing 4 bytes)
to int16_t which is still a far bigger range than
needed.
Next, modify spdk_bdev_get_io to only zero the
first cacheline (actually a bit less).
SPDK_BDEV_IO_TYPE_INVALID is also added, making it
explicit that 0 is an invalid value for the IO type.
Previously this was somewhat inferred.
There are still additional improvements that can
be made to this area - primarily combining
spdk_bdev_get_io() and spdk_bdev_io_init() into
a single function.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I1916d6d5db02c93622b9725ec1095148e3f384d8
Reviewed-on: https://review.gerrithub.io/377799
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
spdk_bdev_io_submit() always returns 0, so the return
value is unnecessary. This eliminates a slew of checks
on that return value.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I493ecefc7b72d3b3a44bd92df70bd5c653453ff0
Reviewed-on: https://review.gerrithub.io/377627
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
We no longer support resubmitting an existing I/O to
a lower bdev. This enables accurate tracking of I/O
at each bdev layer for purposes of reset handling and
QoS.
__submit_request() in bdev.c is now only called
from spdk_bdev_io_submit(), so just collapse these
two functions together while we are here.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I1b46df42b1a6476f9dbd8c61dd3380dbd145315d
Reviewed-on: https://review.gerrithub.io/377626
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
split, gpt and error all have a lot of similar code, and
are based on the presumption of one or more "partition" bdevs
on a "base" bdev. This results in quite a bit of duplicated
code between these three bdev modules. The error bdev
module does follow this same model - it just always has only
a one-to-one mapping between the error bdev and its base bdev.
As all of the modules move to allocating their own bdev_io
rather than allowing for adjusting an existing bdev_io and
resubmitting it, there will be even more duplicated code
between these modules.
So this patch adds a set of helper functions in the common
bdev library to eliminate all of this duplicated code.
This patch also moves the split module to use it - future
patches will also convert gpt and error.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Id8032331b46c32da9fca18a077580ccb274c6204
Reviewed-on: https://review.gerrithub.io/376423
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Add new versions of all of the I/O calls that take parameters in blocks
instead of bytes. These are intended to replace the old APIs, but
we'll keep them for now to preserve compatibility.
Change-Id: I85ab665c653e8c697016c628837d49aa0c3bfcd0
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/376255
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
The bdev modules now take all read, write, unmap, and flush requests in
terms of blocks rather than bytes.
The public bdev APIs still accept offset and length in bytes for now.
Change-Id: I57f0955d52272f57755f0ff4dbc56721fdc2ef51
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/376037
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
bdev_virtio requires us to do SCSI inquiry for
each device and wait for a response. It currently
polls inline for this response, taking up entire
reactor exclusively. Making it async would allow
other pollers to run while bdev_virtio still has
to wait.
Change-Id: Iefc88e0a2efb5b791ffe23b2e623b7c50d759084
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/375573
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
spdk_bdev_init_complete could have been called twice.
While here, also simplify bdev_initialize error path.
On allocation failure, bdev subsystem will now finish
with bdev_mgr->module_init_complete set to false.
Fixes: 7fefd60fab ("bdev: make module init synchronous again")
Change-Id: Ia4b5d571d26beb34f0e6c0f4c7b3176215eec69f
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/375572
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Replace SPDK_TRACE_DEBUG with component-specific flags.
Change-Id: Iee7eafab5e6ac8713f247323a18552b5afb0e86a
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/375834
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This matches the name to the behavior and prepares for addition of a new
log macro for "info" log level.
Change-Id: I94ccd49face4309d3368e399528776ab140748c4
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/375833
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This makes it consistent it with other parts of this structure.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ie36488813b53ce20663c50a5c9f049c4c9723d3a
Reviewed-on: https://review.gerrithub.io/375494
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
gencnt is no longer really used since there is no more
differentiation between "soft" and "hard" reset. The
original idea was that a hard reset would complete I/O
known to the bdev layer even if the underlying bdev
module had not actually completed it yet. We do not
actually support that concept, and it was a bit flawed
anyways.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ifa2c85bb474c7dd55eb7386d6cad5079f5edbccc
Reviewed-on: https://review.gerrithub.io/375484
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Allow passing the NVMe namespace optimal I/O boundary through the bdev
layer.
Change-Id: I27a2d5498df56775d3330e40c31bd7c23bbc77a5
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/374532
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Add functionality to the bdev layer to handle the nvme write_zeroes
function.
Change-Id: I0dadad273b28c16db5a2275f7d8d57e98253a8d3
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/372171
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Change-Id: I33506d6b9ff09c45c057326f7339d742eebc45b4
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/372861
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Swap the meaning of the return value to match the name of the function.
Change-Id: I89dc09e3b309a06586adf2ab750092f06077ffd9
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/372859
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This is far simpler, although it does limit the bdev
layer to unmapped just one range per command. In practice,
all of our code reports limits of just one range per command
anyway.
Change-Id: I99247ab349fe85b9925769e965833b06708d0d70
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/370382
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
bdev could be unregistered multiple times when all it's descriptors have
been instantly closed via it's remove_cb without any deferred
event/poller
Change-Id: I128716077b0512c6334bdd113220684f8cfcbecb
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/370949
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Patch afe860ae deferred freeing the io_device. However, for nvme, the
io_device context (spdk_nvme_ctrlr) is still being destructed before
io_channels are destroyed, causing segfaults on hotremove.
This patch defers io_device context destruction and fixes nvme
hotremove.
Fixes: afe860aeb1 ("channel: Correctly defer unregisters if channels exist")
Fixes: 5533c3d208 ("util: defer put_io_channel")
Change-Id: I7af699174cac0c6c6a6faa2cc65418c47347eb9a
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/370459
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Change-Id: Ie25a87c4b3f781299fa744fdcff6c9a63d473935
Signed-off-by: Roman <roman.sudarikov@intel.com>
Reviewed-on: https://review.gerrithub.io/365723
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Otherwise we'd fail sanity checks when closing the claiming descriptor.
Current approach works because we never close the claiming descriptor.
Fixes: 4fc7e66614 ("bdev: add vbdev claim/release semantics")
Change-Id: I1c1f0c11450e749419726df460334ab97b43b584
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/370179
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
When device has more than one open descriptor, remove_cbs of particular
descriptors could be called more than once.
Consider the following scenario:
bdev X with 2 open descriptors A and B.
X is removed (hotremoved for instance)
bdev_unregister(X) is called
* bdev->status = REMOVING
* A->remove_cb is called
* some poller is started
* B->remove_cb is called
* another poller started
* poller from A->remove_cb finishes it's work and closes the desc:
* bdev_close(A)
* A is removed from bdev->open_descs list
* bdev->status is REMOVING, so bdev_unregister(X) is called again!
* B->remove cb is called again!
* another poller starts? segfault?
Fixes: 57d174ff67 ("bdev: add spdk_bdev_open/close")
Change-Id: I0a898ec0aee521d0b2a1168fe7d469cc41a8ef4f
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/369727
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This enables checking permissions - for example,
spdk_bdev_write will fail if the descriptor was not
created with write permissions.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I68b65a560f471f2e0f71a7f42cfa6689b911110f
Reviewed-on: https://review.gerrithub.io/369493
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
We still will sort the bdev_module list so that modules
with an examine() callback are initialized first. This ensures
they have a chance to initialize before later modules start
registering physical block devices.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I792cfb41b0abe030fe2486a2c872cbf329735932
Reviewed-on: https://review.gerrithub.io/369486
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Module initializaiton was made asynchronous recently
to support bdev modules like gpt which need to do
asynchronous I/O. But all modules now do any
asynchronous I/O in their examine() routines, and
init functions only do very basic operations to be
ready to handle examine() callbacks.
So simplify the bdev code and modules to go back to
a synchronous init procedure.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Idb16156796ad7511d00f465d7a2db9acda6315b6
Reviewed-on: https://review.gerrithub.io/369485
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
This includes file names, functions, #defines, etc.
There are still a few uses of "blockdev" outside of
include/ and lib/ - these can be handled later.
This preps for a future patch to consolidate vbdev
modules and bdev modules into just bdev modules.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I70e575709ae1b0a116b08515fd38ae793de05377
Reviewed-on: https://review.gerrithub.io/369325
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
vbdev modules still open/close bdevs as normal, but
should open bdevs read only when tasting (i.e. reading
the GPT to see if there are SPDK partitions). When
a vbdev module is ready to claim the bdev for purposes
of creating virtual bdevs on top of it, it calls
spdk_vbdev_module_claim_bdev(). It can pass its
open descriptor as well to have it promoted to
write access (required for future vbdev modules like
logical volumes).
Note: error vbdev was changed to copy the base bdev
parameters one-by-one instead of a blind memcpy - we
do not want to copy the base bdev's vbdev_claim_module
into the new bdev!
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: If2ee67dc78daf96050343c473671aa3402991bb1
Reviewed-on: https://review.gerrithub.io/368628
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
This allows vbdev modules to be ready for examine
calls for (physical) bdev modules when the latter
initialize.
This requires the following modifications to existing
bdev modules:
1) error and split now search their config sections
at examine time (instead of init) to see if the
bdev should be consumed by the vbdev module
2) gpt is simplified considerably - it no longer
needs to save bdevs to examine when
gpt initializes later
3) nvme must register its io device before registering
the bdev, since vbdevs may immediately start trying
to send I/O to the new nvme bdev
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I8fe5686092ffb15fc8bdbc068b09add229d9da6c
Reviewed-on: https://review.gerrithub.io/368598
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Add additional fields to the g_bdev_mgr to enable
deferring spdk_bdev_init_complete when modules have
finished initialization, but vbdevs are still processing
examination callbacks due to asynchronous I/O.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I12dc7cb08e44e022b5bad75ba9a946571eb65957
Reviewed-on: https://review.gerrithub.io/368832
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Add a new spdk_vbdev_module_examine_done() API which
vbdev modules can use to notify the generic bdev layer
once a base bdev examination is complete.
This is especially required for asynchronous vbdevs
like GPT which must issue I/O to the base bdev.
As part of this patch, add examine callbacks
for both split and error, which for now only call
this new functions. Later patches will move code from
the init callback to the examine callback for these
modules. examine callbacks are now required for all
vbdev modules.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I49f2d012d1675b878bcd23afff427c740c6502c7
Reviewed-on: https://review.gerrithub.io/368831
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This eliminates overloading of the term "register"
in the context of bdevs, as well as opens up the
idea of examining bdevs not just when they are
registered, but also after they are closed with
write access.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I9e15f9dc0fa4e02214f188f987f9da2dbc8db1f7
Reviewed-on: https://review.gerrithub.io/369042
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ic3051b63942770e45be22af0ae03a78a7c543f81
Reviewed-on: https://review.gerrithub.io/368597
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Add a name parameter to the MODULE_REGISTER macros, and then
modify each bdev module to pass a string for its name.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: If878617ce3c3eacfcf5df44ed6f194f11c66f78f
Reviewed-on: https://review.gerrithub.io/368596
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Retire the old claim/unclaim semantics in favor of
open/close. Clients must now open a bdev to get
an spdk_bdev_desc, then pass this desc to get an
I/O channel.
This allows multiple clients to open a bdev,
although only one may open a bdev with write
access.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I4d319f1278170124169a8a75fd791e926b3f7171
Reviewed-on: https://review.gerrithub.io/367611
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Each virtual bdev now has a pointer to its base
bdev, and a base bdev has a pointers to any virtual
bdevs built on top of it.
Also add a new set of leaf iterators, to get only
bdevs that have no virtual bdevs built on top of
them. These iterators are now used by the bdevio and
bdevperf utilities, in advance of the claim/unclaim
semantics getting removed in a future patch.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I669783764407cdd4920b5ee121959e2a58c8d436
Reviewed-on: https://review.gerrithub.io/367610
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Abstract these through the bdev API to break this
dependency on the event framework.
Change-Id: I108505bf27e94b2985f53d0a4dc0b847ae264d25
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/366340
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
This breaks the dependency on the event subsystem logic.
Change-Id: Ic47a219bc1e272c3421b265f74bba959e1aa5f62
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/365730
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Much like bdev modules inside the bdev directory,
add a subsystems directory inside of event. The subsystem
specific code for the bdev library is placed in to
a separate library in that directory, breaking the
strict dependency of the bdev library on the event subsystem
code.
Change-Id: I255941b823a9ec3e2d62f22a586414949d8ff5ad
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/365055
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This also requires vbdev modules to call spdk_bdev_reset
explicitly on the base bdev, rather than just resubmitting
the original reset bdev_io.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ie33d506f68506096306c9f0a9ff5e11141578b15
Reviewed-on: https://review.gerrithub.io/365712
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
We can do all of the completion work first, and then
make the decision at the very end on whether to
defer the callback or not.
This also removes the bdev_io defer_callback member -
we no longer need it since we now only defer the
callback itself, instead of deferring the full
execution of the spdk_bdev_io_complete() routine.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I3285e34d2fbce34d4254dca2119561ff825ee9e8
Reviewed-on: https://review.gerrithub.io/365711
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ia45876fb6f0eefd987cdb36521ecb591ef1f9499
Reviewed-on: https://review.gerrithub.io/365669
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
This ensures a reset is completed after any I/O completions
that may have been deferred.
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I9efe5c07435371ff8c8e0c826349e9349ade02f3
Reviewed-on: https://review.gerrithub.io/365663
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Switch from the SPDK event library event to the spdk/io_channel.h thread
message abstraction. This partially decouples the bdev layer from the
SPDK event library.
Change-Id: I2300b8d84c357d6d8cab0d370d7681e948fe97d0
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/365077
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
These commands should be treated as aborted by spec,
so correctly deliver abort notifications when a
qpair is deleted.
Change-Id: I8af47a3f42f5695ef8e1a70813662e69102720b2
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/364681
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>