Commit Graph

11871 Commits

Author SHA1 Message Date
Ben Walker
4b8b624068 bdevperf: Rename end_job to bdevperf_job_drain
This function kicks off the draining process, so name it appropriately.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: Ic447aaa01612f6355ff4404d476419b55a3d0cff
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1386
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-03-25 07:52:43 +00:00
Ben Walker
3cd14ee3bd bdevperf: Wait for final performance dump to finish before exiting
In practice this worked out fine because the next step did an
spdk_for_each_core() which would always complete after the
performance dump with our current event library. But just in case,
make this an explicit wait.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I07b96772ba15113cd04453243c980c6e405be872
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1385
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-03-25 07:52:43 +00:00
Ben Walker
1af5ff8078 bdevperf: Rename g_bdev_count to g_construct_job_count
More descriptive name. This is the number of outstanding
construct_job operations.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I5c79ae06a521a8b6ef930146b0ce08791370a25c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1384
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-03-25 07:52:43 +00:00
Ben Walker
29162b3208 bdevperf: Clarify help for -T option
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: I939216a508b5ce7fcee03b6d59a4198b6dd4fe67
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1383
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-03-25 07:52:43 +00:00
Ben Walker
2478c02b87 bdevperf: Rename io_target to bdevperf_job
Begin shifting to a model of "jobs", each defined as a single-threaded
I/O pattern.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: If6c0cfc1a59d3acdec1e1e6ad65a16f810582aa8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1382
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-03-25 07:52:43 +00:00
Ben Walker
a6a8d51030 bdevperf: Rename io_target_group to bdevperf_reactor
There's one of these per core and it's a collection of other
jobs to run, so name it reactor.

In the longer term, this reactor will go away and each "job"
will map to a separate spdk_thread.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: Ica5b19e6edb2509b48059d829e22a734acd6b298
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1381
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-03-25 07:52:43 +00:00
Changpeng Liu
a3363de3c2 nvme/opal: consolidate two get_locking_ranges APIs into one
Actually we can just use one API to finish the requirement.

Change-Id: Ia0d3d589755e8c92f636d3d090ec642299511401
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1280
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>
2020-03-25 07:52:28 +00:00
Changpeng Liu
366fc57724 bdev/opal: use stack part_tailq in part configuration
This will eliminate one calloc() and add one small code cleanup.

Change-Id: I3d67f2b073a46e04304ae5342974afecf532794b
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1233
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>
2020-03-25 07:52:28 +00:00
Changpeng Liu
458214e2e7 nvme/opal: remove the revert asynchronous API
The revert asynchronous API doesn't run as the *real* asynchronous
way, because the drive can only support synchronous module and only
1 session is supported.  The reason why we added this API is that
RPC call has the default timeout value here, while the revert may
take over several minutes, the API itself doesn't short the revert
action, so just remove it and use the synchronous API instead.

The revert action will erase all the users data and bring the drive
back to the factory state, it should run in the synchronous mode,
so just remove the asynchronous API and we can increase the timeout
value when using RPC to call this API.

Change-Id: I08a082edea6385e378399423bbb229d05f8bc262
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1232
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>
2020-03-25 07:52:28 +00:00
Changpeng Liu
3502a45db2 nvme/opal: remove unnecessary NULL checks and a API
The APIs even don't have a chance to be called if the drive can't
support OPAL feature, so just remove the NULL check, and we will
store level 0 discovery descriptors after initialization, so
spdk_opal_cmd_scan() isn't necessary here, remove it as well.

Change-Id: I24f12f2c352996d9ebe76dc015cd0b7502798359
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1231
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>
2020-03-25 07:52:28 +00:00
Changpeng Liu
8c1d107487 nvme/opal: add erase locking range method support
The previous erase locking range API didn't take the real
erase action, it's kind of secure erase, so rename it with
another name and add the real erase support.

This method is used to cryptographically erase user data within
a specific LBA Range and to reset the access control Locking
of that LBA Range.

The TPer SHALL reset the ReadLockEnabled, WriteLockEnabled,
ReadLocked, and WriteLocked column values to False for the
Locking object on which the method is invoked.

Change-Id: I0c83df589382b0a2f189642d8119e389aa4bc559
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1210
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>
2020-03-25 07:52:28 +00:00
Changpeng Liu
3020a6fb30 nvme/opal: use static locking ranges table
There are maximum 8 locking ranges per TPer, so we don't need to use
calloc() for each range.

Change-Id: Ie9d96ba28736dd7a91cb615ece99ebcefa695fc8
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1209
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>
2020-03-25 07:52:28 +00:00
Changpeng Liu
2fe1f500e8 nvme/opal: use stack spdk_opal_key value in session
Both spdk_opal_key and opal_common_session are used in the same context,
so we don't need to save spdk_opal_key pointer in opal_common_session,
juse use the stack value.

Change-Id: I24b64711b45f09a60f9aca1175319e32de4c7e10
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1193
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>
2020-03-25 07:52:28 +00:00
Changpeng Liu
4700fc8175 nvme/opal: remove unnecessary temporary calloc for active key
For active key we don't need to store in the calloc() data
structure, because we'd better not to store any password
related structure, and it's only used in specific context,
so just use stack variable instead.

Change-Id: I4711e279ffe9a97d471f0db0b625b95a36b55d38
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1192
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>
2020-03-25 07:52:28 +00:00
paul luse
ab911f5db6 nvme: fix simple typo in a comment in the spec header
Signed-off-by: paul luse <paul.e.luse@intel.com>
Change-Id: I85788c1f90398542177db0eb54258e75909ccd54
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1398
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-03-24 15:56:32 +00:00
Karol Latecki
963ddcac06 test/make: inform user about processed objects in confirm_abi_deps()
Inform the user that something actually happened
during the test, rather than just displaying
"Test start/end".

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I69a048a5a2fd47a3f18ea2988a06aee439c06fc3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1412
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-03-24 15:56:19 +00:00
Karol Latecki
d97d1aa577 test/make: remove redundant ls from ABI test
"ls" is not needed in for loops based on filename
expansions.
Additionally "ls" was treated as first
element of for loop which cased "No corresponding
object" message to be printed which could be
mistakenly considered a problem during the build.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: If5bfdb15410da36c98d9992cd04a02906599a3e0
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1411
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-03-24 15:56:19 +00:00
Tomasz Zawadzki
3c92d9f166 test/compress: add selection of pmd to run test against
This will allow to test parts of compress bdev on systems
that do not have all types of PMDs.

Once case if for testing in VMs.

For reference on changes in execution time. Current times:
Per-patch = 8 seconds
Nightly = 84 seconds

Running the script twice in this patch, most likely doubles the time.
It is not an issue in per-patch, but if increasing nightly times is blocking
different solution could be done here.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I684569651f2290956f94fcec99cebf0fe13ba0d2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1364
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: Aleksey Marchuk <alexeymar@mellanox.com>
2020-03-24 12:24:16 +00:00
Tomasz Kulasek
c241161ad2 bdev/nvme: set default admin poll period to 10ms
Sending large amounts  of data from host to the controller with 1s
admin polling time, take a lot of time (e.g. 1M firmware file in 4k
chunks takes ~17min).

Reducing this time to 10ms whole operation takes about 3s.

Change-Id: I2dabe9f60acab57e348c34bfabc3cc7479dedec9
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1393
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-03-24 12:24:04 +00:00
Michal Berger
f86e25c064 test/nvmf: Handle lack of nvme devices in a more graceful way
In case there are no /dev/nvme* devices found, the test will continue
regardless trying to pass literal glob strings as an argument to nvme.
This, of course, fails, e.g:

  ci.spdk.io/public_build/autotest-per-patch_7066.html

Avoid this by generating list of the nvme devices and abort the test
gracefully in case it's empty.

Change-Id: I71628aa78a5cfc6c5696f1fc17ed3480d4c642ee
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1392
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>
2020-03-24 12:23:50 +00:00
Tomasz Zawadzki
c65b591b7d lib/blob: move sequential extent page write to the caller
This will help with making the _spdk_blob_persist_write_extent_pages()
batch all writes of extent pages.

No functional change occurs with this patch, this is just refactor
for future change.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I8c93b1d6473db660f7ad5e04c8ec9f3331b2055c
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/986
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>
2020-03-24 07:39:47 +00:00
Tomasz Zawadzki
28a44891f1 lib/blob: add error path on persisting dirty bs
super->clean value signifies if blobstore was unloaded
cleanly.
If it was not, then during bs_load the _spdk_bs_recover()
procedure if called.

Meanwhile bs->clean is always set to 1 after load, causing very first
blob_persist to also re-write super block with the super->clean
set to 0. To signify that md has changed and possibly trigger
the recovery if clean bs unload does not occur.
When the re-write of super block succeeds the bs->clean is set to 0,
because further re-writes of super block are not needed on next
blob persist.

This patch resolves issue when:
1) reading super block fails - execution should backoff, to prevent
writing an empty buffer as super block !
2) writing super->clean = 0 to the super block fails - execution
again should fail, and bs->clean should not be set to 0. It will
cause next persist to attempt re-write again.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ia07cc5c6c107310059b50886edb7283c176b9169
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1164
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-03-24 07:39:47 +00:00
Alexey Marchuk
a843098732 nvme: Cleanup resources when memory allocation fails
Several resources remain allocated when malloc fails.

Change-Id: I2b6df59978100833a91915c3267f3a54f6fc0de4
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1336
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-03-24 07:39:19 +00:00
Pawel Kaminski
c0db2b6d6a test/lvol: rewrite thin_provisioning_check_space to bash
Change-Id: I4a6fcad56c3e97995440262a3bdc0930408eaf68
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/703
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-03-24 07:38:59 +00:00
Pawel Kaminski
e8fa077f83 test/lvol: rewrite SIGTERM to bash
Change-Id: I6d98bd447030db361e8f702a481aa41b44780dfd
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/702
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-03-24 07:38:59 +00:00
Pawel Kaminski
99a89f83a9 test/lvol: rewrite bdev_lvol_rename_nonexistent and bdev_lvol_rename_EEXIST to bash
Change-Id: I47c8cf085556e7ce1df5384c27ab513a8808b3c0
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/701
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>
Reviewed-by: Michal Berger <michalx.berger@intel.com>
2020-03-24 07:38:59 +00:00
Pawel Kaminski
35db02d253 test/lvol: rewrite rename_lvs_nonexistent and rename_lvs_EEXIST to bash
Change-Id: Ida7b005e62d8798333ba57e9b1ef2e9f9ae81fb7
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/700
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-03-24 07:38:59 +00:00
Pawel Kaminski
48a373f483 test/lvol: rewrite rename_positive to bash
Change-Id: I54df8b70c644291062d582f11f4da3aecc9dd9c9
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/699
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-03-24 07:38:59 +00:00
Karol Latecki
051a6902d8 rpc/client.py: replace use process_time() instead of time()
time.clock() was depreceted since Python 3.3 and was finally
removed in Python 3.8.
https://docs.python.org/3.8/whatsnew/3.8.html#api-and-feature-removals

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I3ffe372b61c8afc0ddbbee0064b95059fa184616
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1369
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-03-23 09:37:44 +00:00
Darek Stojaczyk
fdba47584a dpdk: include minor rte_vhost fix
Pull "rte_vhost: do not treat empty socket message as error"

Change-Id: Ib2f59ef3c9126eb3a1de36e6b700e4f4cc47c915
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1326
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-03-23 09:37:35 +00:00
Tomasz Zawadzki
a1591e23c4 ut/blob: verify success of spdk_bs_create_snapshot() on power failure
This change verifies that not only it is possible to open
the snapshot, but also the spdk_bs_create_snapshot() reported
success.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ifb7fcc91802c838710f1f9be41090057268a5900
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1262
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-03-23 09:37:27 +00:00
Tomasz Zawadzki
2eada474ba ut/blob: recreate bs on each create_snapshot power fail UT
blob_create_snapshot_power_failure() test always attempted
snapshot creation until the snapshot did open.
Which meant that on bs reload after dirty shutdown,
the original blob might be in unrecoverable state.

UT did not verify create call beyond that point.
Next patch will stop after snapshot is possible to be opened,
AND the spdk_bs_create_snapshot() returned success.

This patch makes it easier to recreate same starting
conditions after snapshot did not open.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I1901b29a8319b2203a855e7879821ed3850f4917
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1261
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-03-23 09:37:27 +00:00
Tomasz Zawadzki
0f5157377f lib/blob: merge EP of a clone when deleting a snapshot
In general it is not possible to delete snapshot when
there are clones on top of it.
There is special case when there is just a single clone
on top that snapshot.

In such case the clone is 'merged' with snapshot.
Unallocated clusters in clone, are filled with the ones
in snapshot (if allocated there).

Similar behavior should have occurred for extent pages.

This patch adds the implementation for moving EP from
snapshot to clone along with UT.

The UT exposes the issue by allowing delete_blob
to proceed beyond just unrecoverable snapshot blob.

Fixes #1291

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ib2824c5737021f8e8d9b533a4cd245c12e6fe9fa
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1163
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-03-23 09:37:27 +00:00
Karol Latecki
4f24f2ca4a scripts/pkgdep: change archlinux pmdk installation dir
By default "make install" installs pmdk header files in
/usr/local/include while autotest scripts expect them
to be in /usr/include.

Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Change-Id: I906ffd8a7858a37525758c3fc8129cb22286a8f5
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1368
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
2020-03-23 09:37:17 +00:00
Changpeng Liu
5f66e5b160 test/fuse: make the --with-fuse option be consistent with configure
Change-Id: I47dce4dfe01a7badb493978257577c1a8fc0be93
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1404
Reviewed-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-by: <dongx.yi@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
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-03-23 09:36:46 +00:00
Michal Berger
004b52fe6c test/bdev: Move part_dev_by_gpt() into blockdev.sh
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Change-Id: I9a888f80148d5fd2eec5feed299b0c81bb78b984
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1282
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>
2020-03-20 13:59:17 +00:00
Michal Berger
1db267cf0d test/bdev: Convert setup_nvme_conf() to RPC calls
Change-Id: I49415a159a5849232637f281fd9360636691d339
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1018
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>
2020-03-20 13:59:17 +00:00
Michal Berger
ae2d8097c3 test/bdev: convert setup_bdev_conf() to RPC calls
Change-Id: I479bb9df75468b13f739c49c60b38ab0861bf0af
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1017
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>
2020-03-20 13:59:17 +00:00
Michal Berger
54e713036e test/bdev: Cover default setup_bdev_conf() run in its own case
Change-Id: Ibd24c65ac8921083c5999721b720dadfa3c8de5b
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1016
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-03-20 13:59:17 +00:00
Michal Berger
a940721a29 test/bdev: Use separate function for cleaning lingering files
Change-Id: Ib44dbf1a4ec8e44f26cb8219e53b3ed1ae03d48b
Signed-off-by: Michal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1095
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
2020-03-20 13:59:17 +00:00
Ziye Yang
465f4c1254 sock/uring: Add the async network I/O support for socket
This patch is used to add the async network I/O support in
sock layer. If code is configured with I/O uring, --with-uring,
we can use io uring in Linux (version >=5.4-rc3).

PS: We also make VPP's default priority > uring, because
for the iSCSI or sock test linked with VPP. It tests VPP with
a given address (which is not a special VPP can only open address),
so using uring can also listen those address succefully. And if we make
uring with priority > VPP, actually, VPP will not tested in those cases.

Additionally, the current CI pool is not ready for test, we need
wait for the CI system ready. And I test on my local platform, it works.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Ie8ee3c8ddf8d2a7264f2b382376733e002816dcc
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/952
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-03-20 08:41:28 +00:00
Maciej Szwed
3524dd0153 pkgdep: Add ncurses to pkgdep
ncurses library will be required by upcoming spdk_top app.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I16268c2ac772a45abdbd12d8a761d46041ce6e20

Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1247
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
2020-03-20 08:41:11 +00:00
Maciej Szwed
725c6bf8a0 thread: Add pollers number to threads stats
This will be used by upcoming spdk_top application.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I066567f0f14d70e6744821e8e805934a3d790882
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1235
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-03-20 08:41:11 +00:00
Shuhei Matsumoto
c3d0a83347 nvme/rdma: Move post WRs on send/recv queue after poll CQ
If nvme_rdma_qpair_submit_sends() returns -ENOMEM,
nvme_rdma_qpair_process_completions() returns immediately.
In this case, nvme_rdma_qpair_process_completions() does not
poll CQ.

However, nvme_rdma_qpair_process_completions() can poll CQ even
when there is no free slot in SQ.

Hence move nvme_rdma_qpair_submit_sends() and
nvme_rdma_qpair_submit_recvs() after the loop to poll CQ.

nvme_rdma_qpair_submit_sends() and nvme_rdma_qpair_submit_recvs()
output error log and so checking return code of them is not
necessary and is removed in this patch.

This fixes part of the github issue #1271.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Icf22879c69c3f84e6b1d91dc061b6f44237eedd1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1342
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-03-20 08:39:53 +00:00
Shuhei Matsumoto
a4a8080fad lib/thread: Factor out main loops of spdk_thread_poll() into a helper function
This is another preparation to extende spdk_thread_poll() to update
thread stats correctly on multiple SPDK threads per CPU core
configuration as an new function spdk_thread_poll_ext().

As another preparation, factor out main loops of spdk_thread_poll()
to _spdk_thread_poll(). _spdk_thread_poll() will be called in
spdk_thread_poll_ext() in the next patch.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ie006359c00afc2e9b90e15f918f76cf1af0b7ce1
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1255
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2020-03-19 08:52:15 +00:00
Shuhei Matsumoto
82ef75748a lib/thread: Factor out updating thread stats from spdk_thread_poll()
Subsequent patches will extend spdk_thread_poll() to update
thread stats correctly on multiple SPDK threads per CPU core
configuration as an new function spdk_thread_poll_ext().

Thread stats will be updated separately by spdk_thread_poll() and
spdk_thread_poll_ext(), but updating thread stats itself is
the common operation.

Hence as a preparation, factor out updating thread stats operation
from spdk_thread_poll() to _spdk_thread_update_stats().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I93c40eb0363ca34f2150299b09c49f1401583832
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1242
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
2020-03-19 08:52:15 +00:00
Changpeng Liu
347e1d39b5 nvme: update the comments about using hardware SGL
Change-Id: I60d2b63d650bc73d2548f8b35a6a10d5334c9207
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1258
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-03-19 08:52:03 +00:00
Changpeng Liu
86c4d33fbc nvme: rename is_shutdown flag to is_destructed
The shutdown flag is only used when resubmitting the AER, and it will not
be updated when hot remove happened, so rename it to is_destructed.

Change-Id: Iafc27bd6cb23a851ed6c96470a2a45546a399c88
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1254
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2020-03-19 08:52:03 +00:00
Shuhei Matsumoto
4b23e3f2b9 lib/iscsi: Use spdk_sn32_lt/gt() to compare two sequence numbers
This patch does drop in replacement of SN32_LT and SN32_GT by
spdk_sn32_lt and spdk_sn32_gt, respectively.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I5df1e461d2b25a2f20222e823fb1ec68ced049ad
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1347
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-03-19 08:51:31 +00:00
Shuhei Matsumoto
ded6d2c7f2 lib/util: Add spdk_sn32_lt/gt() to compare two numbers based on serial number arithmetic
Previously the macro SN32_LT and SN32_GT had been added to iSCSI
library. But such comparisons may be used in other libraries.
So add two inline helper functions spdk_sn32_lt() and spdk_sn32_gt()
to include/spdk/util.h.

Add unit test for these functions. These functions are located in
header file but math.c is the place if they are located in source file.
Hence add unit test as the one for math.c.

The next patch replaces the macro SN32_LT and SN32_GT by
spdk_sn32_lt() and spdk_sn32_gt() in iSCSI library, respectively.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Id3e4d80fea98ad4ae1516e27b9c9e8ec6f37e7a8
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1346
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-03-19 08:51:31 +00:00