Commit Graph

11194 Commits

Author SHA1 Message Date
Wojciech Malikowski
b75b3553aa lib/ftl: Move zone reset logic from band to core
Sine core module is responsible for handling IO it
should also handling zone reset logic.

Change-Id: Id8be4bb221cc85f207d44bd45761a72e263ea5ce
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/551
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-02-10 10:24:38 +00:00
Tomasz Kulasek
c3e0eb456b nvme/rpc: fix memory leak when cmdbuf decode fails for bdev_nvme_send_cmd
Change-Id: I265f7b87d85c99f1fd709418b575c500a686e093
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/622
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-02-10 10:24:28 +00:00
Michal Berger
83086b5973 test/blobfs: Refactor exit behavior
The on_error_exit() function was being called via the local ERR trap
to cleanup after the tests in case any failure occurred during the
execution. However, this was masking the backtrace trap so the
on_error_exit() had to also call print_backtrace() to compensate -
this was resulting in an additional function being unnecessarily
placed onto the stack and included in the actual backtrace.

Avoid the above by refactoring on_error_exit() into simple cleanup()
function called upon exit()ing from the script. The rationale is that
cleanup has to happen regardless if the script failed or not and
elements like $conf_file are always created from the very scratch by
the script itself anyway prior running the tests.

Change-Id: I6bb8f4155525037624f0bd5aab288f8c502141f6
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/456
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-02-10 10:24:01 +00:00
Sylvain Didelot
1fd3d8e994 lib/trace: Don't initialize traces if requested num entries is 0
Context:
Every-time the SPDK starts, it creates a large file under
/dev/shm (130 MB in my setup) which is never removed when
the application terminates.

The number of trace entries can be tuned using the SPDK runtime
option 'num_entries'. A value of 0 for this option considerably
reduces the size of the trace file (few MBs) but it is still
created.

This patch adds a special case in the code when num_entries=0:
the trace system would not be initialized, and the trace file
would not be created in this case.

The rest of the code properly handle the case where the trace
system is never initialized.

Signed-off-by: Sylvain Didelot <sdidelot@ddn.com>
Change-Id: If54a548de4a2ce2def8e57d527d0dc20bc55fe4d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/606
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-02-10 10:23:53 +00:00
Michal Berger
a11aab73e8 test/common: Check if igb_uio is loaded before removing it
igb_uio doesn't necessarily have to be loaded into the kernel as SDPK
still may be built with support for it but only particular set of
tests is actually using it. If such a condition is met then rmmod will
fail the entire test run since it always exits with != 0 if given
module is not found.

Avoid this by checking first if igb_uio is actually in use.

Change-Id: Ib97488797c657f810b588a0b427e578807ebe6c6
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/625
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>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2020-02-10 10:23:39 +00:00
Ben Walker
f17e02a01b nvme: Fix indentation in struct spdk_nvme_registers
Change-Id: I56a43ab886ee91ca6e63dce06116ffb0b3317fe4
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/417
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-02-06 09:46:27 +00:00
Tomasz Kulasek
8e3b0c159b rpc: fix allow to use bdev_nvme_apply_firmware in rpc.py
Change-Id: I53c5c69b7b954a491e29a72305bfc1b6c57aabb1
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/532
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-02-06 09:46:17 +00:00
Karol Latecki
3d8a0b19b0 doc: Fix Markdown MD032 linter warnings
"MD032 Lists should be surrounded by blank lines"
Fix this markdown linter error by inserting newlines or
adjusting text to list points using spaces.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I09e1f021b8e95e0c6c58c393d7ecc11ce61c3132
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/434
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
2020-02-06 09:46:06 +00:00
Jim Harris
acac4b3813 build: quiet generation of include/spdk/config.h
A recent commit accidentally removed the leading $(Q)
when generating include/spdk/config.h.  Add it back to
reduce clutter when building SPDK.

Fixes: b41f404 (make: Fix python command in Makefile)

Signed-off-by: Jim Harris <james.r.harris@intel.com>

Change-Id: I2084d1e0b24a6a3eafc7c6aef201ca3b8ddd181c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/449
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Tested-by: <sys_sgci@intel.com>
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/452
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-02-06 09:45:52 +00:00
Darek Stojaczyk
3ac9ba25f3 env_dpdk: fix potential null dereference
Change-Id: Iff5cfa780506191b3a7fb218c6b5948df2ac16a4
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/523
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-06 09:45:42 +00:00
Seth Howell
a9a472b99b scripts: update to point to review.spdk.io
Change-Id: I10c79cd421bd735ced2e17919cfa38abec74edf2
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/451
Reviewed-by: Jim Harris
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: <sys_sgci@intel.com>
2020-02-04 23:05:51 +00:00
Michal Berger
9ba80de0dd test/nvme: Don't wait for spdk_stub0 if stub dies prematurely
If stub terminates right after execution, e.g. due to lack of system
resources (requested number of cpu cores to run on, right amount of
memory, etc.) start_stub() would end up blocking forever since there
wouldn't be any entity around that would mknod spdk_stub0 for it to
break the loop.

Avoid the above scenario by checking if $stubpid is still visible
under procfs and return if it goes missing.

To make sure kill_stub() is still called to clean up after start_stub()
declare proper trap prior the call to start_stub().

Additionally, avoid potential stderr noise in case kill|wait are told
to act on a PID that's not visible in the ns anymore.

Change-Id: Ief41200c57957f84b4f96a54baabc8da1f27dd43
Signed-off-by: Michal Berger <michallinuxstuff@gmail.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/482653
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>
2020-02-04 20:22:23 +00:00
Michal Berger
4b1dbc948b test/common: Don't take randomize_va_space default setting for granted
Currently, kill_stub() doesn't gracefully handle this particular sysctl
since it overwrites it with assumed default that doesn't necessarily
have to be a part of kernel's config on a given system.

Don't presume what the setting should be, instead, read and save the
current value and try to restore it whenever kill_stub() is called.

Change-Id: I1f1ee85c29d5e2ec2f442a54f700e3bc45ee2437
Signed-off-by: Michal Berger <michallinuxstuff@gmail.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/482652
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>
2020-02-04 20:22:23 +00:00
Jonathan Richardson
b41f404d9f make: Fix python command in Makefile
Remove detection of python command. If PYTHON_COMMAND isn't set, PYCMD
defaults to python which doesn't exist in some python3 only environments
such as yocto. genconfig.py has already been updated to deprecate
python2 support.

Change-Id: I1a289bc0e30a2de9396e1397a72d8f0e81912a68
Signed-off-by: Jonathan Richardson <jonathan.richardson@broadcom.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/483418
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Scott Branden <sbranden@gmail.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-02-04 20:09:21 +00:00
Tomasz Zawadzki
16cc6464db lib/log: do not put trailing whitespace in fdump
fdump puts out buffer in following format:
"00000000  76 61 6c 00                                        val.            "

Each buffer is displayed with hex values up to maximum, then
followed up with a value. This is done to keep starting value
with the same alignment between each consecutive line.
Value contents should end at its length instead of
adding trailing whitespace.

After this patch, output is changed to:
"00000000  76 61 6c 00                                        val."

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I26b327e83f296ba3865f1a337f4a70764a80e2b0
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/483706
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>
2020-02-04 20:08:02 +00:00
Tomasz Zawadzki
2d687618f3 test/match: do not ignore all input when passing \n
Match script before this change ignored all input
when passing just a new line in ignore file.
This was because \n symbol was stripped from that
particular line (chop()) leaving empty string.
This always matched all of the input when using index().

Now when comparing the input line and ignore line,
we check that ignore line is not empty.

Besides that, to still allow ignoring new lines
we check and compare both strings directly.

Changed chop() to chomp() to prevent further breakage,
difference is that chomp() only strips new line characters.
As that was the original intention anyway.

The loop changed so we exit on first instance of ignored
line matching, rather than mention particular line
multiple times for each matched ignore.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I62d48e1130c600ffff6713d2748239cc955bbe9e
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/483834
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>
2020-02-04 20:08:02 +00:00
Tomasz Zawadzki
dc06a06d12 test/blob: fix match tool with blobcli
Empty line in ignore file caused all output from the match
tool to be ignored. This made the test to always pass,
regardless of changes made.

Next patch in series will be fixing the match tool,
meanwhile this patch focuses on making the blobstore
test match and ignore files right.

This patch adjusts match file in following ways:
- keep EAL and crypto output up to date
- use $(N) to match any blob id
- adjust out of date xattr value print

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ia0a2312d9691487acbdd06dc08451232171cc46d
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/483705
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>
2020-02-04 20:08:02 +00:00
Maciej Wawryk
4c67fe81eb scripts/pkgdep.sh: Separate minimal required dependencies
We want to split pkgdep.sh to install packeges that are required to run SPDK
and that are needed by developers.
This patch is only split one install command to divide the minimal
dependencies from the developer tools.

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I332cbc430bd04e6ef2872ab762da99e837bf0fc2
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/481595
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-02-04 19:50:26 +00:00
Jesse Grodman
62deaa8315 thread: don't log an error when returning null in spdk_get_thread
the purpose of this commit is to avoid an entry into the error log in
the case that a thread does not exist, since there is no separate
function to check if a thread exists

Signed-off-by: Jesse Grodman <jgrodman@gmail.com>
Change-Id: Iec79b87e11e411bde59004baae1dc996864cec4d
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/481576
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>
2020-02-04 19:28:43 +00:00
Darek Stojaczyk
a531e9d70c test/lvol: rewrite destroy_lvol_store_nonexistent_lvs_uuid to bash
Again, smuggle it into one of the existing test case
to create more opportunities for this test to fail.
We'll now trying to remove an inexistent lvolstore
when there's a valid lvolstore present.

Change-Id: I64a72a8ffe38ba6939d0818d2c6c81e49748a33c
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462468
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: Maciej Szwed <maciej.szwed@intel.com>
2020-02-04 19:27:53 +00:00
Darek Stojaczyk
0fa664624c test/lvol: rewrite delete_lvol_store_underlying_bdev to bash
This test case is about hotremoving a malloc with
an empty lvolstore on top. We rewrite it to bash,
but also introduce one more similar test case but
with a single lvol in the lvs.

Change-Id: Iea9666080fe5e73befd97ec5e0b2898d8b30ecd6
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462467
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: Maciej Szwed <maciej.szwed@intel.com>
2020-02-04 19:27:53 +00:00
Darek Stojaczyk
9751011fa9 test/lvol: rewrite destroy_multi_logical_volumes_positive to bash
Change-Id: Ia9e2bc269c4c7ee77afca3b001a6ef52612c5264
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462466
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: Maciej Szwed <maciej.szwed@intel.com>
2020-02-04 19:27:53 +00:00
Darek Stojaczyk
e9c4aaf260 test/lvol: rewrite bdev_lvol_delete_lvstore_with_lvol_bdev_positive to bash
Those test cases were basically testing hotremove, so
that's how we're going to name them now.

Change-Id: Ib79ab7e50e3022df981f7092436b0a0991d5c9b9
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462189
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>
2020-02-04 19:27:53 +00:00
Darek Stojaczyk
713a14bd2e test/lvol: rewrite destroy_lvol_store_use_name_positive to bash
The test case covers destroying the lvolstore using its
human-friendly name instead of uuid. We destroy lvolstores
all over the basic construct tests, so we just smuggle
one removal by name into one of those existing test cases.

Change-Id: I5027382f727be226f601573367bfcd214baf474a
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462190
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>
2020-02-04 19:27:53 +00:00
Darek Stojaczyk
26b840163c test/lvol: verify the same lvs can't be deleted twice
We didn't really test it so far.

Change-Id: I58e57a47465e3c4bc409d497706a56c7aa5cdaa1
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462465
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: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
2020-02-04 19:27:53 +00:00
Darek Stojaczyk
a551ad8756 test/lvol: remove destroy_lvol_store_positive
We already perform the same steps as a part of different
test case in basic.sh.

Change-Id: I0e1931307b3de69df95b2a2994b87147028677e1
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462464
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: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
2020-02-04 19:27:53 +00:00
Darek Stojaczyk
cf628b09d0 test/lvol: test resizing lvols using their names
We did not test it so far.

Change-Id: I0769c31691535b5d8f9c49e07899f035208efebb
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462188
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: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
2020-02-04 19:27:53 +00:00
Darek Stojaczyk
9d044f25f1 test/lvol: test resize with ongoing I/O traffic
Resize tests were extremely basic so far, extend them
with a test case that actually tries to do some I/O
before and after the resize.

I would like to keep it as a separate test case,
because it uses NBD which used to be quite buggy at
some point. If the resize tests fail on this new test
case, it means the previous very basic resize tests
have passed and the lvol resize functionality itself
doesn't show any failures - this might potentially
simplify some root causing later on.

Change-Id: I7ee45243ee4fc025fc71f6eee4c946211c07a78a
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462187
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>
2020-02-04 19:27:53 +00:00
Darek Stojaczyk
4c945d2332 test/lvol: rewrite negative resize tests to bash
Change-Id: I8f8daa5e1afd747712f8d562966486b7618ba047
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462186
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: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
2020-02-04 19:27:53 +00:00
Darek Stojaczyk
5ff75ec292 test/lvol: rewrite test_lvol_resize_basic to bash
Added resize.sh. There won't be too many test cases
in there just yet, but eventually we'd like to lift
some restrictions on lvol resizes and there will be
a fair amount of extra cases to cover.

Change-Id: I3d9db16003ac806241678cfd8441281d557c214c
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/462185
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: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
2020-02-04 19:27:53 +00:00
Darek Stojaczyk
67ab15d6e7 test/lvol: rewrite construct_lvs_with_cluster_size_min/max to bash
Change-Id: Ifa772d238fd0cbee1d8c9c2bdee67dd6839eaeab
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461881
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: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
2020-02-04 19:27:53 +00:00
Darek Stojaczyk
c6e1399118 test/lvol: rewrite nested_construct_lvol_bdev_on_full_lvol_store to bash
Change-Id: I6a33d54260f2181995b962db21efc9556a5a4c0c
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461880
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: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-02-04 19:27:53 +00:00
Darek Stojaczyk
912f3b4c12 test/lvol: rewrite construct_lvs_name_twice to bash
Change-Id: Ia14fc807c7812e3de4035f3753dc021bdc8df463
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459679
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: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-02-04 19:27:53 +00:00
Darek Stojaczyk
580b19f9df test/lvol: rewrite construct_lvs_on_bdev_twice to bash
Change-Id: Idd0b6e5f54111e22a3f9b5ea1e347d457069829c
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459678
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: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-02-04 19:27:53 +00:00
Darek Stojaczyk
c3cc245401 test/lvol: rewrite construct_lvs_nonexistent_bdev to bash
Change-Id: I5e362ec53544f57a11584f449222827bd9be4369
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459677
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: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
2020-02-04 19:27:53 +00:00
Wojciech Malikowski
b9d8382154 lib/ftl: Prevent from sending writes on resetting zone
When reset operation is ongoing mark zone as busy
to avoid write operation on it.

This path fixes issue #1171.

Change-Id: I30097e1db1bfbbabebd7e6adeab6e8810dc8b2b1
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/483264
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Mateusz Kozlowski <mateusz.kozlowski@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-02-04 19:01:48 +00:00
Jacek Kalwas
e1d1695cef nvmf: check if listener already exists in subsystem earlier
It fixes memory leak e.g. when add_listener rpc called twice with the
same trid on the same subsystem (ref = 2). In such case kill or
remove_listener decrements ref only once.

Signed-off-by: Jacek Kalwas <jacek.kalwas@intel.com>
Change-Id: Ib19f2e50838feff1c9108957ee82a42da66e54a2
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/482446
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-02-04 18:27:46 +00:00
Shuhei Matsumoto
bad8847f7a bdevperf: Use spdk_thread_send_msg() instead of spdk_event_call()
Use spdk_thread_send_msg() for notification of bdev hotplug
and test completion instead of spdk_event_call().

Each I/O target group is associated with SPDK thread now. Hence
use spdk_thread_send_msg() to do bdevperf_target_gone() on the
specified thread. The group is held in struct io_target by the
previous patchm and remove target->lcore safely because it is
not used anymore.

Then use spdk_thread_send_msg() to notify master thread.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I88eadbdd1f120161cf484793f14f5eb0b44d010f
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478818
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-02-04 18:24:11 +00:00
Shuhei Matsumoto
728481f491 bdevperf: Register bdevperf as I/O device and make its start/stop asynchronous
Register the global bdevperf object as an I/O device by
spdk_io_device_register().  Create and destroy I/O target groups
asynchronously by using spdk_for_each_thread() and
spdk_for_each_channel().

spdk_for_each_thread() and spdk_for_each_channel() serialize the
execution among multiple threads, and any lock is not necessary.

Additionally, for bdevperf_submit_on_core() and
bdevperf_stop_io_on_core(), replace for their loop + event call by
spdk_for_each_channel() and rename them by
bdevperf_submit_on_group() and bdevperf_stop_io_on_group(),
respectively.

This advances the work to move bdevperf from core based to thread
based.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I63b512d0b8e734e862afe1f7a4053414b99204d7
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478780
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-02-04 18:24:11 +00:00
Maciej Wawryk
3d2ee8d1ce scripts/vagrant: allow password authentication
Add password authentication to vagrant for future
boxes building functionality

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Iad9c3c4000ac43243900ee6b5396863b9ab820ff
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/477062
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>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-02-04 18:19:43 +00:00
Alexey Marchuk
f1539c2820 nvme/rdma: Use transport_retry_count from controller opts
This allows to configure desired retry_count instead of using
hard coded value

Change-Id: I25c9601997ace916dfb735469a4b443c0cd2a96b
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/482499
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-02-04 18:19:20 +00:00
Alexey Marchuk
9727aa281f tcp: refactor of header/data digest support check
Some functions performed incorrect header/data digest
support check, align it with NVMEoF spec. Use a table
to check if PDU supports digest depending on its type.

Change-Id: I6170dd19ace017f37fda0a923f604732799460b9
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/483375
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2020-02-04 18:18:49 +00:00
Alexey Marchuk
48f38636ce tcp: Cleanup nvme_tcp_pdu structure
With the recent changes which added usage of writev_async to
both TCP target and initiator, nvme_tcp_pdu::writev_offset
becomes useless since it is not updated in data path. This
field is only used in UT. Remove this field from nvme_tcp_pdu
structure, now nvme_tcp_build_iovs builds iov which fully
describes the PDU. Update UT accordingly.

Field padding_valid_bytes is not used at all, delete it too

Change-Id: I2d6040ae64d6847cb455f59f65ec5677de8e5192
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/483374
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.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>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2020-02-04 18:18:49 +00:00
Shuhei Matsumoto
6146c67856 lib/thread: Assert if spdk_poller_unregister() is called on wrong thread
Bdevperf tool had not called spdk_poller_unregister() called on the
same thread that called spdk_poller_register(). But it had not caused
any issue because spdk_poller_unregister() simply set the state to
unregistered. This design flaw has been fixed recently.

However the new pause feature has been added to poller and this
design flaw might cause any unexpected behavior if paused poller is
unregistered.

We do not know any other case such that spdk_poller_unregister()
is not called on the same thread that called spdk_poller_register(),
but we have no way to know it even if it exists. Hence let's add
assert for such cases.

Parsing poller lists managed by thread may be another option but
spdk_poller_unregister() is performance critical. So we do not check
list.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I9d91daaeb81fa33d5f042dbe7ddbd8ab6ea98d55
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479391
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-02-04 18:11:18 +00:00
Shuhei Matsumoto
655e8e16e3 lib/thread: Assert if spdk_put_io_channel() is called on the wrong thread
spdk_put_io_channel() was designed to be called on the same thread
that called spdk_get_io_channel(). spdk_put_io_channel() sends a
message to its own thread, to allow the context to unwind before
releasing the resources. This had the side effect to allow an
incorrect thread to call spdk_put_io_channel(). This patch will fix
that.

Bdevperf tool had a design flaw that needed the side effect, but
it was fixed recently.  We do not know if we have any other case.

Hence add assert to spdk_put_io_channel() to find other case.

We found that unit test for blobstore had called
spdk_put_io_channel() and fix it together in this patch.

Besides, correct the comment for spdk_put_io_channel() in
include/spdk/thread.h not to create any other case in future.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I6ec7bf074818abef43b23ca40bc9385adac70a75
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479390
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2020-02-04 18:11:18 +00:00
Wojciech Malikowski
05e4366519 lib/ftl: Remove read thread support
There is no need to support read operations on separate thread.

Change-Id: I10b595b8eeaf5fd0182f05913fdd5baa4b84961f
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471910
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2020-02-04 18:10:01 +00:00
Wojciech Malikowski
dcd3fc1fd1 bdev/ftl: "use_append" parameter for bdev_ftl_create RPC
Allow for using appends instead of writes.

Change-Id: I2f0d3bcdbb0eee034f7b0b6349de854ddbf7273d
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/481839
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
2020-02-04 18:10:01 +00:00
Wojciech Malikowski
b627646359 test/ftl: Update deprecated RPC calls
bdev_nvme_detach_controller call should be used instead of
delete_bdev_controller

Change-Id: Iaa8bb2580d108eaf28c64a9fa7e352991cf2608d
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/481837
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>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2020-02-04 18:10:01 +00:00
Wojciech Malikowski
9b4091dbe5 test/ftl: Update deprecated RPC calls
ftl_bdev_create call should be used instead construct_ftl_bdev

Change-Id: If361ca6be8c5118dd55579e8c0a219041b7f1e94
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/481811
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>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
2020-02-04 18:10:01 +00:00
Wojciech Malikowski
aa44b69a52 doc: Update FTL documentation
Update FTL documentation according to recent changes in API.

Change-Id: I86de8c115f2dedaff5f281d17a35bce34c35cef0
Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/481807
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-02-04 18:10:01 +00:00