spdk_nvme_detach() will do the normal shutdown notification for
most cases, and it will take some time e.g. 2 seconds to finish
the process for PCIe based controllers. If users' environment
has several drives, each drive will call spdk_nvme_detach() one
by one, and the shutdown process may take very long time.
Since users know exactly what they would like to do for the next
step, so here we provide an option to users, users can enable it
to skip the shutdown notification process so that they can have
very quick shutdown process, and when starting next time, the
controller can be enabled again.
Change-Id: Ie7f87115d57776729fab4cdac489cae6dc13511b
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463949
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Also release the IO channels with filesystem data structure.
Change-Id: I75a5d427fe4837ad7d85444d09ded9ab41e0ca8e
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464851
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>
We used "BLOBFS" as the signature when loading from blobstore, so define
a macro here.
Change-Id: Iff504a36686c2bc08c90c49b8a505b5533b62508
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464850
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>
This test is meant to simulate uncommon network situations where lots of
I/O are getting dropped before they get to the initiator. Essentially,
we are trying to trigger the initiator timeout in the kernel which
disconnects from the target and reconnects after 10 seconds.
This test is different from the other tests that we have currently
because it doesn't rely on killing either the target or initiator.
Instead it expects the target to stay up and properly respond to the
initiator error conditions. The hope is that the fio job running on the
initiator can still complete successfully and the target doesn't crash
due to improperly handling the disconnect and reconnect.
This test should be added to the nightly CI jobs because it is rather
time consuming.
Change-Id: Id457d9eb21a980140f065663547b89b2c69ace93
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464459
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: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
This will allow us to do interesting things in tests like configure a
bdev with a really long delay, and allow I/O to build up on a target to
see what happens, then decrease the latency to allow traffic to flow
through normally without ever having to delete and reconfigure the bdev.
Change-Id: Ibcb1101f8eed9fe3094ba239110cb4e49ace6554
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464454
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>
portal_host and portal_name were added to struct spdk_iscsi_conn long
ago but had not been used yet. Portal group and its portals can be
removed dynamically even if there is any binded connection. Using
cached pg_tag will avoid potential errors.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I56d02664a3e8b2398bbb9162b1c85856e991b5b4
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463879
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
pg_tag was added to struct spdk_iscsi_conn long ago but had not
been used yet. Portal group and its portals can be removed
dynamically even if there is any binded connection. Using cached
pg_tag will avoid potential errors.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ic7a96ef97c3cab7e5a58aa7f439364b53694a1e4
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463874
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This will reduce the potential malloc failure.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ibcd631bf318ef6ece4ac337219652323ca5fd8f1
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464136
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Some lines in this file are long and should be broken
as bdev/raid/raid_rpc.c was done recently.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I98a7f965b7230f32ab6a2d33a0f204591fa92ac1
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464484
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Ordering stub definitions by libraries or modules will be a little
easier to read.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I7568c94691229188c348a9c5e3fba8f2bc1ecf04
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464483
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Use cached pointer to g_io_output in IO verification to improve
readability.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I71ced5d1e438d5046b9a5913a1a2860f8435d79b
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464485
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Create a helper function set_io_output() to setup expected IO output.
Besides change the name of cached pointer to expeced IO output
from p to output because p is ambiguous.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I7574bf8362f7c5d7841e08b4fbd9a9b66836012a
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464482
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
create_construct_req() had been located just above raid_bdev_init().
However this location was not intuitive. Hence move create_construct_req()
to just above spdk_rpc_construct_raid_bdev().
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ia5998146ce7b4b9a3c3bdeb38b6dbc8dd21fa276
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464481
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Becomes important in next patch
Change-Id: Ida19f0b59c4b841d6f5120f9130e24b57ae91560
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464717
Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.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>
Changed initialization of io channels to be made in the core/read
thread themselves. This fixes potential hangs when using the ftl lib
directly, without bdev and initializing an ftl device from a different
thread than will be used for IO.
Signed-off-by: Mateusz Kozlowski <mateusz.kozlowski@intel.com>
Change-Id: I7089cc46cc6de5e9008e7c22cc01d2b4103ebb14
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464891
Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.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>
This is a preparation to the next patch which will change portal_host
and portal_port from malloc to fixed size.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I0f95d969edfd88efde41a43eaf0426fcd4b98987
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464135
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
conn->target is initialized to NULL in iscsi_op_login_phase_none
and then configured in iscsi_op_login_session_normal. Hence
subsequent references to target node can be done by conn->target and
related local variables can be removed.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I68b94cb8e136522ef1e0ed74c0035ec2b666bb9e
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463700
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Previously, aplications were always being linked against the
spdk_env_dpdk.a file even during the shared object build. Change this to
be consistent with our linking.
Also, the old behavior causes issues with resolving symbols in FreeBSD.
Change-Id: I96e2e6044c16e7579cff35ad46e3688ce6fa2b5a
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464733
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>
When building shared libs, we specifically don't set the --as-needed
flag so that we still link against libraries that have constructor
functions. LD reports on its man page that the default behavior is
equivalent to --no-as-needed.
For RHEL based distros like fedora and centos this works fine. While
the LD man page shipped with ubuntu distributions also states that
--no-as-needed is the default, they don't respect that behavior and do
--as-needed linking unless you force them with --no-as-needed.
Change-Id: I914ab849323de198af5c5e53fffb1f57fcaff5fe
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464621
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>
iSCSI poll groups are bind to SPDK thread through IO channel now.
This patch changes get_iscsi_connections RPC from synchronous to
asynchronous by using spdk_for_each_channel.
Core ID was removed from the output of the RPC but thread name
is added to the output of the RPC in this patch.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I20fdb7f11434acf838a89435ba5052b19869181c
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463569
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>
Factor out writing connection information to JSON context into
a helper function spdk_iscsi_conn_info_json.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I3e92bcb4f21cc7a36af182f850c944b8c5dd559f
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463568
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: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
This patch binds poll groups to SPDK thread through IO channel and
assigns connections to poll groups instead of cores.
iSCSI subsystem registers iSCSI global object as an IO device, and create
poll groups as context of IO channels of the IO device.
Each portal get and hold portal group on which the corresponding acceptor is
running.
When a connection is constructed, iSCSI subsystem assigns a poll group
to the connection by getting it from the corresponding portal.
When a connection enters full-feature phase, iSCSI subsystem schedules
the connection to a poll group by round-robin.
Then, each connection can know its running SPDK thread directly and can
use SPDK message passing infrastructure instead of SPDK event framework.
By this change, iSCSI connections are binded to SPDK thread, and not
binded to processor core anymore.
Some other changes in this patch are
- core ID is removed from the output of get_iscsi_connections RPC. The
upcoming patches will change the RPC to use spdk_for_each_channel and can
access SPDK thread safely, and add SPDK thread ID instead.
- utilize UT multithread framework added by the last patch to test
iSCSI poll groups by UT.
Change-Id: Iec73c778aa413bcabdb63141cc41d4160911ea0e
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463359
Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This is a preparation to the next patch to test IO channel. Separate
this from the next patch to clarify the intention.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Iaa456667b5509d5fd8470315e2716b0b9fe209a5
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464811
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>
Create a helper function create_get_raids_req() and move duplication
of category name and initialization of related global variables into
the function. Some operations are re-ordered accordingly.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I03e12e8d77872634a65a94b4cd4092554e376b13
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464480
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Create a helper function create_destroy_req() and move duplication
of bdev name and initialization of related global variables into
the function. Some operations are re-ordered accordingly.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I60f01103faec3ec7ec6c317470b043f84187a4c1
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464479
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Create a helper function create_construct_config() and move
create_test_req() and initialization of related global variables
into the function.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ia675f67e8332247cce4585a2d287b8062d4e1359
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464478
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Create a helper function create_construct_req() and move create_test_req()
and initialization of related global variables into the function.
The next patch will create an another helper function
create_construct_config() and move create_test_req() and initialization
of related global variables into the function.
Hence move the common part of create_construct_req() and
create_construct_config() into create_test_req().
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I6852fdc7966359a1029c809565ceb7230b749dc6
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464477
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
snprintf() do not write more than specified bytes including the
terminating null byte. If the output was truncated due to this limit
then the return byte is the number of chars excluding the terminating
null byte.
So remove NULL byte appends after snprintf() in this patch.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ic5b7719791721c6ae7b1dd8367be454b34df0fe5
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464476
Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Some places had used dynamically allocated strings but they were
just duplicated from string constants. Hence we change them to
use string constants to make refactoring easier.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I0a5c4c1a72ee4aede12703c2dd50057c47098e28
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464475
Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This simplifies the UT code a little bit.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I8aae0a8f0b0aa7e931ed4303b9504feabf76e2b0
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464358
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Data type of number of base bdevs are corrupted. uint8_t is enough
and unify almost all related variables into uint8_t.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I323aaa229a76c3d5b5361d7643c3a9591ccad340
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464357
Reviewed-by: yidong0635 <dongx.yi@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Checking if required parameters strip_size, num_base_bdevs, and
raid_level had been done in raid_bdev_config_add(). However, this
required us to use integer type.
If we do the check in raid_bdev_parse_raid(), we will be able to
use the same type between function parameters and variables of
struct, and hence do in this patch.
This will align with the next patch.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I10fd75f25ed9a5d40eb189b05c2a20c276fa3ad6
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464365
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: yidong0635 <dongx.yi@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
The following issue was observed.
The first thread returned the last IO channel and the second thread
then removed the first base device, but raid_bdev_cleanup() was
called before raid_bdev_destroy_cb() was called.
raid_bdev_destroy_cb() was accessed to the raid bdev already freed
by raid_bdev_cleanup() and caused segmentation fault.
The call sequence was as follows:
The first thread:
spdk_put_io_channel() -> ch->destroy_cb -> raid_bdev_destroy_cb
-> access raid bdev
The second thread:
raid_bdev_remove_base_devices() -> raid_bdev_deconfigure() ->
spdk_bdev_unregister() -> spdk_io_device_unregister() ->
spdk_bdev_destroy_cb() -> raid_bdev_destruct() -> raid_bdev_cleanup()
-> free raid bdev
The fix is to hold number of created channels in struct
raid_bdev_io_channel and use it in raid_bdev_destroy_cb().
Bdev layer, IO device/channel layer, and NVMe-oF layer already
process this case correctly.
Fixes#884.
Reported-by: yidong0635 <dongx.yi@intel.com>
Change-Id: Ie9d61bdddca479ce7f491ff9a08db45e71f16a8d
Signed-off-by: yidong0635 <dongx.yi@intel.com>
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463249
Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Seth Howell <seth.howell@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>
When this test was ran, it reported for each job:
"fio: verification read phase will never start because write phase uses all of runtime"
There was only randwrite phase, without any read phase with verification.
Alternatievly we can verify a set number of blocks during write using
"verify_backlog" argument.
With this patch writes to all bdevs will be verfied in 1024 chunks.
Change-Id: Ie79d543badd10f3b3ca91b3b56d9d8cb0dd332b2
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464646
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: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
After recent changes, that function can not return
NULL anymore, so remove all redundant checks from
various SPDK libraries.
Change-Id: If80344b6fa81ad5f87a7086804dba221522cd7e2
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464175
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
spdk_jsonrpc_send_error_response() is documented as a
shorthand for spdk_jsonrpc_begin_result() + end result,
but we used to call it already after doing
spdk_jsonrpc_begin_result(), which makes the response
completely invalid.
Fix it by deferring the initial spdk_jsonrpc_begin_result()
until after we did our error checking. While here, remove
the NULL checks from that function. After recent jsonrpc
changes it can never return NULL.
Change-Id: Ibb69803d4e6ce6516817673eec6626dcfc4f1abf
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464174
Tested-by: SPDK CI Jenkins <sys_sgci@intel.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>
Purpose: To reduce the duplicated code.
And one minor fix: add an empty line between two functions
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: I12c9ddba6526c094cd2bd945e14f9d8bf5209adf
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464504
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
'ResetControllerOnTimeout' was renamed to 'ActionOnTimeout' for a
long time, so we deprecate the support for this old configuration
option.
Change-Id: Ia44035a8749ca046c1df16f82601389b5bafeb76
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464491
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
SPDK_NVME_DEFAULT_RETRY_COUNT is the default value for each controller, so
we can move it out from public header file, and change the value if users
provide a new one.
"NvmeRetryCount" was deprecated for a long time, so we removed the support
for this configuration option as well.
Change-Id: I187251cc1e5342abb4fce96727d06631b7c16a01
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464489
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
We have defined NVMe controller initialization 'transport_retry_count' option, so
global 'spdk_nvme_retry_count' can be removed, we will remove the variable with
PCIe transport first, and make the retry count can be configured via RPC.
Change-Id: I4d54f78c8da2180d536635587e7291f44a57c4fb
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464472
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>
Fix SC2007: Use $((..)) instead of deprecated $[..].
SC2007 removed from check_format.sh exclude list.
Change-Id: Ifd858857e461d785d6d6f101acca13c326ee637e
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/464172
Tested-by: SPDK CI Jenkins <sys_sgci@intel.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>