Commit Graph

11474 Commits

Author SHA1 Message Date
Pawel Kaminski
33981a6d30 test/vhost: Replace ini config with json in shared test
Change-Id: Iad98a16f3a01c68c34e23bcd880035c8c6550da4
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/765
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-02-25 10:31:49 +00:00
Michal Berger
64a55791cc test/blobfs: Use Bash's time builtin instead of the separate binary
Some distro installations don't provide the time package by default.
Since Bash is capable, use its time instead.

Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I8ca31e233c23d9c89be6afba29affe45f3f9882c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/961
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-02-24 08:02:48 +00:00
Michal Berger
6d230de495 test/blobfs: Don't allow run_bsdump() to fail from within the trap call
If this call fails, for whatever reason, $ROCKSDB_CONF won't be
removed.

Change-Id: I6fff996b04415fc760d3593c0f628d2631ce96ba
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/960
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-02-24 08:02:48 +00:00
Michal Berger
75df5fec18 test/blobfs: Dump *_db_bench.txt to stderr in case db_bench fails
Since both stdout and stderr of the db_bench run is redirected to a
file, xtrace won't write out anything of value in case said run fails.

Example:
  https://ci.spdk.io/public_build/autotest-per-patch_4071.html

To avoid looking into the file directly, try to locate last .txt that
was written out and dump its contents to stderr to increase the
visibility of what might have caused the failure.

Change-Id: Ic4873626e979130f2722a4f2d5266d93bc2bde76
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/959
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-02-24 08:02:48 +00:00
Tomasz Kulasek
03842fd950 test/nvme: fix correct controllers name in nvme-cli cuse test
Fixes issue #1223

Change-Id: I16bf739d9be54249600e135a07fdeb554c77f4cf
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/981
Reviewed-by: Michal Berger <michalx.berger@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-02-24 08:02:41 +00:00
Jacek Kalwas
c55cdc4fca nvmf: fix SHIFT_4KB redefinition by NVMF_ prefix
it is defined in memory.h

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I3a65f82e565dc56c5d4e3e0211571e1d1dddf393
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/920
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-02-21 09:40:47 +00:00
Jacek Kalwas
a00efdbfda nvmf: add util to get subsystem from ctrlr
Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: I28e51e1ca9f1334bf267c08b47b8fb6b961a0aa0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/919
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-02-21 09:40:47 +00:00
GangCao
e41d1a9411 vbdev: close the base bdev on its opened thread
With the JSON configure, the base device will be opened on the
same thread (RPC thread) to handle the JSON operation. Later the
virtual device upon the base device can be opened on another
thread. At the time of virtual device destruction, the base
device is also closed at the thread where opening the virtual
device, it is actually different than the original thread where
this base device is opened through the JSON configure.

Add a thread here to record the exact thread where the base
device is opened and then later route it back to handle the base
device close operation.

Change-Id: I4f48e829a70a83bd71d05dbb13f88819201d9c15
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/969
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-02-21 09:40:32 +00:00
Richael Zhuang
5e1b30bd28 test: fix error about unittest_nvmf uninitialised parameters
When running unittest_nvmf in fedora29 with memcheck, there are
many errors about "Conditional jump or move depends on uninitialised
value(s)". The failed tests are:
in ctrlr_ut:
  test_reservation_notification_log_page
  fused_compare_and_write
in ctrlr_bdev_ut:
  spdk_nvmf_bdev_ctrlr_compare_and_write_cmd

Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
Change-Id: Ib1e6a744e86876c15ee53206909364e853574dd1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/965
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-02-21 09:39:52 +00:00
Alexey Marchuk
157b1a339a configure: Check nasm - redirect stderr to null device
configure prints an error if nasm is not installed on the system:
./configure: line 554: nasm: command not found
Notice: ISA-L, compression & crypto auto-disabled due to nasm dependency.
These features require NASM version 2.13.03 or newer.  Please install
or upgrade then re-run this script.
Redirect stderr to null device to disable error printing

Change-Id: Ifa596fba19ecaf5270614ab22f09f0a66af08475
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/871
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>
2020-02-21 09:39:41 +00:00
paul luse
5c9c24e11c module/malloc: rename 2 functions to match new accel names
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: Iae5137f5030be55b6c1e146b6dac7d9081ff7504
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/947
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-02-21 09:38:51 +00:00
Allen Zhu
52a0feb404 bdev/nvme: handle namespace resize event
while the size of namespace is changed,
the resize event will be notified.

Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Signed-off-by: Allen Zhu <allenz@mellanox.com>

Change-Id: I5d85f17df898dc21c0ae1eb9f529dcb624a457ac
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/849
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-02-21 09:38:42 +00:00
paul luse
75c2135de5 module/ioat: fix pci device cleanup on exit
Using bdevperf, for example, with CBDMA on a malloc backend
with zcopy disabled, 16 messages like this would appear on
exist (each for a different BDF):

Device 0000:00:04.0 is still attached at shutdown!

Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I05dd84c9f6a7c398ac1ee705b1c292530d283042
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/839
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>
2020-02-21 09:38:09 +00:00
Tomasz Zawadzki
83e8cc3b90 ut/blob: always use local blobstore pointer
Always call API on pointer that was received from blobstore
initialization or load, instead of relying on global one.

Where necessary added declaration, assignment and asserts.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ic4198ac984c13a8b77428deaa32ce9864e6750c1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/942
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>
2020-02-21 09:35:27 +00:00
Tomasz Zawadzki
56cec80813 ut/blob: make use of simpler CUnit test addition
CUnit provides a helper macro CU_ADD_TEST() that
simplifies using CU_add_test() function.
Test name no longer needs to be provided,
instead test is named after test function name.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I9f5d9e0d8e72ab36b2a5c04e33c336e6c0a1fa6a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/931
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>
2020-02-21 09:35:27 +00:00
Tomasz Zawadzki
b88f0c4f20 ut/blob: simplify error handling for UT
Failure to prepare CUnit for tests is always a fatal error,
and application exits.
Most test managment functions in CUnit set some CU_ErrorCode,
that can be retrived by return code from a function or CU_get_error().

Thus usual structure of UT in SPDK checked every output from every
test managment function.
There is a helper function CU_set_error_action() that when set to
CUEA_ABORT, will abort the application run with proper error return code.
Along with nice error message.

For example if one were to add same UT twice:
"Aborting due to error #32: Test having this name already in suite."
Application return code set to 32.

Using CU_set_error_action(CUEA_ABORT), removes the need for error checking
on test managment functions in CUnit.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ida7de5e040b714509e79957d47a006ee518a42b8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/930
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>
2020-02-21 09:35:27 +00:00
Tomasz Zawadzki
a324e6d001 ut/blob: issue to consecutive md syncs
Expands blob_simultaneous_operations to cover case
when second md sync is perfomed without waiting for the first
one to complete.

The blob state is forced in UT, but in normal usage could be
changed by modifying xattr, allocating thin clusters or other.

Related to #1170

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I880d289cdf957d4513c080efdcb7a5d8c6b3b447
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/775
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>
2020-02-21 09:35:27 +00:00
Tomasz Zawadzki
a123ac277e ut/blob: add tests for persiting metadata
This new UT is checking validity of md sync being run
along another md sync with changed metadata.

At this time added case where first md sync is being
interrupted by removal of xattr with second md sync.
This interruption is perfomed at increasing number of
poller executions, until the number is enough to
complete first md sync.

There are two expected states of used_md_pages array,
either with xattr or without. The state is verified
after md syncs.

This UT will be expaned in similar manner by other
operations (than xattr) that casue changes in persisted metadata.

Related to #960

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I251dca92ffc3080d8dc503a7f1ff342aa59adef9
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/774
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>
2020-02-21 09:35:27 +00:00
Tomasz Zawadzki
030be573f3 lib/blob: queue up blob persists when one already is ongoing
It is possible for multiple blob persists to affect one another.
Either by blob->state changes or blob mutable data.
Safe way to prevent that is to queue up the persists.

Next persist will be executed only after previous one completes.

Fixes #1170
Fixes #960

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Iaf95d9238510100b629050bc0d5c2c96c982a60c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/776
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>
2020-02-21 09:35:27 +00:00
Tomasz Zawadzki
dd80edb2b4 lib/blob: move starting persist to separate function
_spdk_blob_persist_check_dirty() function will be
called in subsequent patch at the end of persist
in _spdk_blob_persist_complete() to proceed
with any queued up persists.
Please see following patch for this.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ieeb334e23cde329743647f728e70dd60333c224a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/872
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>
2020-02-21 09:35:27 +00:00
Tomasz Zawadzki
248fbf2aec ut/blob: use poll_thread_times()
Making use of recently added utility to poll exact number of times.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I23a9dc702c899285626522ace8ec77a9ba0f7757
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/773
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>
2020-02-21 09:35:27 +00:00
Tomasz Zawadzki
d7aff25df0 ut/common: add poll_thread_times() to poll select number of iterations
Right now functions poll_thread() and poll_threads(), polled
always until there were no further messages to process.
This allows to put next operation to execute only after
previous one completed.

Function poll_thread_times() allows to poll certain thread
for exact number of executions. If 0 is passed to max_polls,
then this function executes single message and all pollers,
until no messages are left.

With this change it is possible to only run a thread
selected number of iterations. Allowing to add another operation
without first one finishing.

It will become useful in blobstore UT, where two operations
will be executed with slight delay between them.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I4a6537695389f30130ea2fd2fd43d7b2cb2dea39
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/772
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>
2020-02-21 09:35:27 +00:00
Darek Stojaczyk
94675ba17b test/autotest_common: cleanup discover_bdevs
$rpc_server is hardcoded inside the function and can't
be empty, so remove the check for that.

Change-Id: Ic819089eb113b14a7c2407cd5ce882bcdee044bb
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/522
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>
2020-02-21 09:34:14 +00:00
Darek Stojaczyk
712a3f69d3 Makefile: don't override MAKEFLAGS in submake
Apparently make doesn't like it:
make[2]: warning: -jN forced in submake: disabling jobserver mode.

We only did it because of scan-build - it detects a ton
of issues (or false positives) in our dependencies. To
disable it, we don't have to override MAKEFLAGS, but
just CC - that's what we'll do now.

Fixes #896

Change-Id: I5eea984d6bbfbf4caabdd704850fac840fed3524
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/927
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>
2020-02-21 09:33:45 +00:00
Sudheer Mogilappagari
8ba2c0159f sock/posix: Set sendbuf and recvbuf before connect call
For client side connections, SO_RCVBUF needs to set
before connect call() so this patch moves those calls
accordingly.

Signed-off-by: Sudheer Mogilappagari <sudheer.mogilappagari@intel.com>
Change-Id: Ifa8373145b3699e697e34e93132b5c006e7fbf83
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/757
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-02-21 09:33:31 +00:00
Changpeng Liu
beaf69617a blobfs: try to free a valid file cache buffer when allocating new caches
When allocating a new cache buffer, we will pick up a file and try to
free cache buffers with this file, but sometimes the file lock maybe
hold by other thread, so we use pthread_spin_trylock() here, when
pthread_spin_trylock() return a negative value, we will break the
loop, this is not efficient as the orginal logic, which may result
cache buffer allocation failure, so we will break the loop only when
there is a valid cache free.

Change-Id: I7be2fddb33c38dba466c2fcc2584ccf7ac16ea7a
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/950
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>
2020-02-21 01:28:43 +00:00
Konrad Sztyber
b70c23feb0 bdev/ocssd: check namespace population
Added population checks before any media event processings is performed,
as a namespace can get depopulated at any time.  This will guarantee
that depopulated namespaces are never touched.

Change-Id: I071404158e099b5f3195c1e3e50563b22cdf5c59
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/921
Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-02-20 14:43:44 +00:00
Artur Paszkiewicz
339fb7cd15 genconfig.py: allow numbers in config option names
To make it possible to add CONFIG_RAID5.

Change-Id: I1712bde5bae552811343fb1865f1224d3adb1c7e
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/854
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-02-20 14:40:19 +00:00
Artur Paszkiewicz
11495b5c63 ut/raid: put bdev_raid.c into 'raid' subdirectory
To make room for other raid module unit tests.

Change-Id: Icf8b8ff0c9051ccb4c7ebd784807370f8be1a8fb
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/853
Reviewed-by: Paul Luse <paul.e.luse@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>
2020-02-20 14:40:19 +00:00
Artur Paszkiewicz
1d3ca5c4c0 module/raid: don't support flush or unmap if there is no raid module handler
Change-Id: If248d8b0d00c0f02bbc7b25324d83139267945f3
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/852
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-02-20 14:40:19 +00:00
Artur Paszkiewicz
0a5194fadc module/raid: check for the minimum required base bdevs
Define the minimum number of base devices required for a raid level in
struct raid_module and check that when starting the array.

Change-Id: Ic70d107721e0df48ef8d9406132c103eee3cc9d4
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/851
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-02-20 14:40:19 +00:00
Artur Paszkiewicz
a193dcb8f3 module/raid: use macro to iterate over raid base bdevs
Change-Id: Ie3c074e86a3624bcca5b479505efb4380f79cbdd
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/850
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-02-20 14:40:19 +00:00
Artur Paszkiewicz
79bde4d379 module/raid: fix scanbuild warning
The issue:
bdev_raid.c:1323:60: warning: Division by zero
        raid_bdev->strip_size = (raid_bdev->strip_size_kb * 1024) / blocklen;

Fix this by adding assert.

Change-Id: Ic83ee2f8f74bc1bd0bcd90b75c796b1b4c2491d9
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/873
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@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>
2020-02-20 14:40:19 +00:00
Darek Stojaczyk
463e8a1cd8 test/lvol: remove delete_bdev_positive
This is a duplicate of test_hotremove_lvol_store_base,
previously known as test case 301.

Change-Id: I2e49652a0d94fc32f8193f724a254a50484844cc
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/682
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@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>
2020-02-20 09:57:20 +00:00
Shuhei Matsumoto
ffc2cf1c4d bdevperf: Three Cleanups for bdevperf_construct_target()
Firstly, change unmap suppor and I/O size checks to do once per
bdev.  It is enough to check if unmap is supported and check if
I/O size is multiple of data block size once per bdev.  Hence move
these checks from bdevperf_construct_target() to
_bdevperf_construct_targets().

Secondly, use calloc() to remove unnecessary zeroings in
bdevperf_construct_target().

Thirdly, factor out getting next io_target_group from
bdevperf_construct_target().  This is a preparation to make
bdevperf_construct_target() asynchronous by using
spdk_for_each_channel().

These may be better to break-up but these are already included in
the long patch series.   So to reduce the burden of reviewers,
squash these into a single patch.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I2cb94c8aa2b6b1a1b9e9a04da533e1fd093f8f29
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/640
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>
2020-02-20 09:54:50 +00:00
Shuhei Matsumoto
ba9ce36527 bdevperf: Factor out constructing multiple targets for a bdev into a function
Factor out constructing multiple targets for a single bdev from
bdevperf_construct_targets() into an new helper function
_bdevperf_construct_targets().

Then change the return type of bdevperf_construct_targets() to void
and continue creating targets for subsequent bdevs even if failing
for any bdev. Additionally, remove a couple of comments in the source
code to avoid misunderstanding.

These changes will make us easier to use spdk_for_each_channel()
in bdevperf_construct_targets().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I3363931749b863c8de619939939d401f14e43d15
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/638
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>
2020-02-20 09:54:50 +00:00
Shuhei Matsumoto
4579fc9d2c bdevperf: bdevperf_construct_targets_tasks() calls bdevperf_test() at its end by swapping
Creating targets, creating tasks, and then running I/O is the actual
ordering of start-up. So adjust ordering of function calls to make
easier us to follow.

Change the return type of bdevperf_construct_targets_tasks() from
int to void, and call bdevperf_test() at the end of
bdevperf_construct_targets_tasks(). Then replace bdevperf_test() by
bdevperf_construct_targets_tasks().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Id1396ff4ba199778300f5ddaf79db5f8f2e0ccb6
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/642
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>
2020-02-20 09:54:50 +00:00
Shuhei Matsumoto
039360d302 bdevperf: Call bdevperf_test() at the end of bdevperf_construct_targets()
Move bdevperf_test() into bdevperf_construct_targets() from
_bdevperf_init_thread_done() and rpc_perform_tests(). Following the
last patch, this consolidation will make the code a little cleaner.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ided4653941f45ff6ac8edbea504560cc8a9fb5a0
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/637
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>
2020-02-20 09:54:50 +00:00
Michal Berger
dfe17a39e8 test/config_converter: Declare $rootdir, $testdir paths
Make sure that $rootdir and $testdir are accessible in the sourced
environment. This is to follow the convention seen throughout the
entire repo and make sure that nothing that depends on these paths
fails in case they are missing.

Change-Id: Ie20754fc7aca7aab3636cb022499e9ff2f2dd30b
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/777
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-02-20 09:54:15 +00:00
Konrad Sztyber
acc88da2c5 lib/ftl: use scatter/gather write commands
This will allow the requests to be built from non-consecutive write
buffer entries.

Change-Id: Ifbb26c47ea1f3175e6529dba4b89350de92efe8e
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/899
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Maciej Szczepaniak <maciej.szczepaniak@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-02-20 09:53:03 +00:00
Konrad Sztyber
f4e42560b4 lib/ftl: use parent's iovecs during child initialization
Fill in the child's iovec during its initialization by calculating it
based on the parent's iovecs and the request's block offset.

Change-Id: I61a1d5cf8a1ceae71e996d50db31077c43c4e3d9
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/898
Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Maciej Szczepaniak <maciej.szczepaniak@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-02-20 09:53:03 +00:00
Konrad Sztyber
4a3bf3a942 lib/ftl: use user's iovec instead of copying it
There's no need to copy user's iovec, as it's bound to be valid until
request's completion.  Storing a pointer to user's iovec is both faster
and simplifies the IO allocation path.

Change-Id: Ia5b37fcbc230edac6f52989c8ef09655af8ec178
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/897
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Maciej Szczepaniak <maciej.szczepaniak@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-02-20 09:53:03 +00:00
Konrad Sztyber
3a228b6c75 lib/ftl: remove num_blocks parameter from submit_child_write()
This parameter always has to be the same (device's write unit size), so
it's redundant.

Change-Id: I8775171fe2d526a6e87337e0398f3c9d18bc184d
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/896
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Maciej Szczepaniak <maciej.szczepaniak@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-02-20 09:53:03 +00:00
Konrad Sztyber
26f39f1e34 bdev/zone: scattered zone append
Added scatter/gather version of the zone append command.

Change-Id: I6f999be335fe3e896456ca7e17d0f02743f06ca1
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/895
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-02-20 09:53:03 +00:00
Konrad Sztyber
7f45a12636 lib/ftl: use iovecs instead of single data pointer
Allow ftl_io initialization with a iovec array instead of a single data
pointer.  It'll make it possible to use the vector version of the IO
commands.

Change-Id: I34c1e398cea681f59321605e081366785aa29128
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/894
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Maciej Szczepaniak <maciej.szczepaniak@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-02-20 09:53:03 +00:00
Wojciech Malikowski
a4b7f495f2 lib/ftl: Do not put "reloc move" back to move_queue during free
Reloc move should not be put back to move queue
in ftl_reloc_free_move().

Change-Id: I9c84238b9f716e6e73a251e833f32661d17a7eab
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/624
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>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2020-02-20 09:51:28 +00:00
Wojciech Malikowski
3505d3a65c lib/ftl: Set l2p table initial state with memset()
This patch improve FTL initialization time.
For 16TB volume it reduces init/restore time
by about 30 seconds.

Change-Id: I76463c5447b983eb9428c0317933d06c40b2974e
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/546
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>
Reviewed-by: Maciej Szczepaniak <maciej.szczepaniak@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2020-02-20 09:51:28 +00:00
Wojciech Malikowski
a6a040eb86 bdev/ftl: Do not register ftl bdev as io device
Bdev ftl could use io channel directly from ftl library
instead creating its own. This patch removes ftl_bdev_io
and ftl_io_channel structures.

Change-Id: I5f13b6d2c46da2ccfbf7cc01547525ef0f912703
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/623
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>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2020-02-20 09:51:28 +00:00
Wojciech Malikowski
7fc67cd248 bdev/ftl: Complete IO immediately
There is no need to have separate IO poller for FTL bdev.

Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Change-Id: I19d42f3dc1faad6bb0094681bfe90ad29b88aae4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/545
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.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>
2020-02-20 09:51:28 +00:00
Wojciech Malikowski
e047840adc lib/ftl: Process read's on user thread
Since read thread was removed user IO read
should be processed on user thread.

Change-Id: I4088c215e342ac6ef1255057617a0a12976129aa
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/544
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>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2020-02-20 09:51:28 +00:00