Commit Graph

987 Commits

Author SHA1 Message Date
Dariusz Stojaczyk
ad9a842c71 rpc/vhost_scsi: defer remove_scsi_dev RPC response
Defer writing RPC response until after the device has been hotremoved.

Change-Id: I052280b205415e4a2ffa1421653cc49b8e3b1445
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/371119
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-09-22 14:13:40 -04:00
Dariusz Stojaczyk
f61b71d71a vhost_scsi: implemented vhost device hot-attach
Devices can be added to a SCSI
vhost controller at any time now.

Change-Id: Ic5dd4b78465d3431479e0389b7ea902e1e25c337
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/371281
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-09-22 14:13:40 -04:00
Dariusz Stojaczyk
4c4492dcc4 vhost_scsi: removed internal eventq events ring
Since we are calling eventq_enqueue only from inside of the controller
reactor, such ring is not needed. Eventq events will now be sent
immediately. This simplifies the whole process greatly.

The abstract vhost event layer is being replaced with much simpler and
less error-prone vhost external spdk_event API.

This reverts commit 542b5415 [1] together with vhost scsi device
hot-attach feature. Hot-attach shall be reintroduced in upcoming
patches.

[1] 542b541588 ("vhost_scsi: implemented abstract vhost event layer")

Change-Id: I39a427332d573c4e0be548d1c8caf0cf2858f6a5
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/371117
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-09-22 14:13:40 -04:00
Liang Yan
4ac30f9f3c test:move env initialization steps after the parameters parsing
Move the nvme/reset tool's environment initialization steps
after the parameter parsing.

Change-Id: Id7a4302fa85b88b279895453293c701b982914a7
Signed-off-by: Liang Yan <liang.z.yan@intel.com>
Reviewed-on: https://review.gerrithub.io/379261
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-09-21 14:07:17 -04:00
Changpeng Liu
8181c59293 nvme: override the default queue depth if users specified the value
SPDK already uses DEFAULT_IO_QUEUE_SIZE and MQES to decide the correct
queue depth of NVMe queue pair, hardcoded it to NVME_IO_ENTRIES(512)
does not make sense if users want to set queue depth bigger than 512.

Change-Id: Iaa73fc79e055292ae9bd19af0c8c12f257ae5c46
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/379052
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-09-20 19:58:49 -04:00
Cunyin Chang
29bcd5a90d blob: Add support for crc of super block.
Change-Id: I424833a0af6e5e8265c03c168b9dfdbae1a49cd8
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
Reviewed-on: https://review.gerrithub.io/378233
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-09-20 19:56:57 -04:00
Seth Howell
70684937b7 test/blobfs: add timing for rocksdb benchmarks
Change-Id: Ibcbb75671e3526076d31f6dc53da490f3c0e6d3e
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/378830
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-09-20 19:33:50 -04:00
Jim Harris
f7eb7d6434 util: fail io_device unregister if foreach operations outstanding
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ic102dd4a352d3f796a4a46e4703bedefe014101f

Reviewed-on: https://review.gerrithub.io/378228
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-09-20 19:27:06 -04:00
Jim Harris
93cfe874b2 lib/util: handle channel being removed during spdk_for_each_channel
A channel may have been deleted between when a message was sent to
a thread and when it gets executed on that thread.  So we must look
for the channel when the messages gets executed - if it's not found,
just continue to the next thread(s).

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

Reviewed-on: https://review.gerrithub.io/378002
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-09-20 19:27:06 -04:00
Jim Harris
32a87ed9e3 test: add framework for simulating multithreading in unit tests
Use the mock wrappers to override pthread_self(), enabling the
unit tests to switch emulation between different threads
from the context of a single unit test thread.

Add this into the io_channel unit tests with some very basic
testing of allocating and freeing multiple threads.

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

Reviewed-on: https://review.gerrithub.io/377992
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-09-20 19:27:06 -04:00
Jim Harris
372df452a4 test: flesh out test_env implementation for mempools
Some modules rely on accurate memory buffer counts.
For example, bdev checks that all of its buffer pools
are back to original capacity during spdk_bdev_finish().

So flesh out the mempool implementation in test_env.c
to keep accurate counts of the number of buffers "available"
in the test mempool.  Note that test_env is only designed
for unit tests, so this functionality is not multi-thread
safe.

Still allow for NULL mempool pointers and just default
to old behavior in that case - some unit tests such as
the blobfs cache tree tests still rely on that behavior.

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

Reviewed-on: https://review.gerrithub.io/377969
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-09-20 19:27:06 -04:00
Karol Latecki
6264dfa956 test/iscsi: Add iscsi_tgt with lvol backend test
Test using multiple iscsi target nodes with LUNs backed by
logical volume bdevs

Change-Id: If87ed19dbef84fdc79d5758e063fc11d047e790e
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/378034
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-09-20 19:03:34 -04:00
Maciej Szwed
c783caabc7 bdev: remove bdev_opened_for_write restriction
This restriction causes bdevs examination/discovery to fail
when there are asynchronous operations. We should remove this
limitation for now. Future plan is to implement approach
similar to the one that is present in kernel.

Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: Ibe5572297672022412d25a4a835dc9527ce97f3e
Reviewed-on: https://review.gerrithub.io/378758
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-09-20 14:43:32 -04:00
Karol Latecki
564524a7dd test/nvmf: Add nvmf with lvol integrity test
Test for veryfing correct interoperability of nvmf with
use of lvol store / lvol bdev backends.

Also added initial test plan in which test is described.

Change-Id: Ided093091847dff2bca76063926798d5606d73bd
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/377529
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-09-20 14:21:45 -04:00
Tomasz Zawadzki
c0e6ecaa0b test/vhost: add vhost with lvol backends test
Script for testing vhost using lvols as backends for
virtual machines. Option for using nested lvol stores and
nested lvol bdevs also provided.

Change-Id: Iad8a196c97f292881a8b424b4433ec281f12aec6
Signed-off-by: Lukasz <lukaszx.galka@intel.com>
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/365798
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-09-20 12:53:28 -04:00
Daniel Verkamp
8011d8c0e6 nvmf: don't allow 0xFFFFFFFF as a NSID
FFFFFFFFh is reserved for the broadcast NSID and can't be used as a
NSID for a specific namespace.

Change-Id: I64a3cc80993d7b34324823462f4d992d1415773f
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/378849
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2017-09-19 17:16:59 -04:00
Seth Howell
9290e0bcf7 test/blobfs: consolidate run_tests.sh into rocksdb.sh
move the main portion of run_tests.sh into rocksdb.sh to simplify
rocksdb testing and allow for the provision of more granular timing
coverage.
Change-Id: I60649394c496a347f4dca948d1d499ad8578c4a0
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/378827
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-09-19 17:16:05 -04:00
Jim Harris
76774528be test/bdev: initialize descriptor array in open_write_test
A later patch in this series fails the test pool because
scan-build says we might be using garbage for one of the
descriptor pointer comparisons.  That later patch does not
touch this unit test file at all, and the bdev-related changes
do not touch the code path used around the bug report.  But
the report is valid - it's possible that with the additional
bdev.c changes that scan-build's ability to detect this
bug changed for the better.

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

Reviewed-on: https://review.gerrithub.io/378825
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-09-19 17:15:15 -04:00
Daniel Verkamp
5323a02613 nvmf: move fabrics command processing to ctrlr.c
This is the final set of command processing functions (admin and I/O
commands were already handled in ctrlr.c), and it allows us to clean up
the ctrlr.c API some more.

Change-Id: Ic73c56c44d7fd64bfaa72b6f5f6f0984b4dfa053
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/378018
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-09-19 17:14:52 -04:00
Daniel Verkamp
4ff0eba871 nvmf: merge connect handling into single function
Combine nvmf_process_connect() into spdk_nvmf_ctrlr_connect() to
simplify the logic and keep it all together in one function.

This also allows us to move the invalid connect helper function and
macros back out of the header into a static function in one file.

Change-Id: Ia3bd80d0309392520d51bf8f5830d3f23332c5e3
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/378016
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-09-19 17:14:52 -04:00
Daniel Verkamp
f4a4ddd8a1 nvmf: add subsystem ctrlr management functions
This moves the subsystem->ctrlrs list management fully into the
subsystem code, which will help simplify thread safety considerations
once we start adding locks.

Change-Id: Ibc118923f1bd520f1e524cde5d45ccfcc69aee1e
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/376025
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-09-19 17:14:52 -04:00
Ben Walker
21ea290192 nvmf: cntlid is now only unique within a subsystem
Previously we made cntlid globally unique as part of
a strategy for scaling connections that never panned
out. Now, we have a new strategy and don't need cntlid
to be globally unique, so relax the restrictions
and simplify the code.

Change-Id: I167772f5e7d37183715bf9967b0102529144bb2b
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/376250
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-09-19 17:14:52 -04:00
Cunyin Chang
13ecee44a4 blob: Add support for crc of metadata pages.
This patch add support crc for metadata pages, we will also
add crc for supper block, used md and used clusters bitmask
pages in the following patches.

Change-Id: Ie36fcc16b39296d06721f1f8eb5689260194c558
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
Reviewed-on: https://review.gerrithub.io/377901
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-09-15 17:13:14 -04:00
Cunyin Chang
2d18887fbd blobfs: Make the behaviour of "delete file" as unlink.
Mark the file as deleted in the function spdk_fs_delete_file()
when the referance is not 0, and delete the file when it is closed,
make the behaviour as "unlink".

Change-Id: Ia934bb73c82c48fdbab79dbe4b56296a73abc01e
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
Reviewed-on: https://review.gerrithub.io/374944
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-09-15 17:13:14 -04:00
Dariusz Stojaczyk
a8599cd4f0 vhost: sync controller creation with g_spdk_vhost_mutex
Controller creation RPC can't be done on controller's reactor
(as there's obviously no controller yet...), so a special
set of vhost_mutex_lock/unlock() functions to has been added
to synchronise controller creation with the rest of
ctrlr-enumerating code.

Change-Id: Ib6e4b894a85ff1f70ebd047832c5a3568a00f1a7
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/377651
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-09-15 14:18:46 -04:00
Dariusz Stojaczyk
1fc1068049 vhost_scsi: vhost_scsi_dev_add_dev now takes vhost_dev param
Continuation of patch 94afad5a [1].
That function could be called from outside of the vhost reactor,
causing data races and possible segfaults.

Now, after this patch, all ctrlr-changing functions take spdk_vhost_dev
parameter, meaning they should be called via external event API [1],
which soon will be the only way of obtaining spdk_vhost_dev pointer.

[1] 94afad5a ("vhost: added external API to call spdk_events on vdev reactor")

Change-Id: I40ea66ad09fb5c433dd897a4e22aedeb423f9b4b
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/371013
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2017-09-15 14:18:46 -04:00
Dariusz Stojaczyk
2670503d46 vhost: readded return codes for dpdk callbacks
Added spdk_vhost_dev_backend_event_done function
that sets the return code for the callback and
transparently calls sem_post.

Change-Id: Iba27af780cd1753056c1607177c945e13c95c712
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/377585
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-09-15 14:18:46 -04:00
Tomasz Zawadzki
27f44662ac lvol: Logical volume implementation
Change-Id: Ia96ae78ff9530d953181ac5f7255a38f3c8ec430
Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Reviewed-on: https://review.gerrithub.io/375392
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-09-14 19:30:54 -04:00
Daniel Verkamp
0caab4e1da nvmf: add Write Zeroes support
Change-Id: I743f5e4d1c24ad5ef9f1fef4c2678e347b179a9f
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/377260
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-09-14 17:41:52 -04:00
Daniel Verkamp
5eb129647d nvmf/bdev: refactor read/write into separate funcs
This makes it easier to unit test the individual functions and also
easier to follow the logic.

These helpers will also be used in the upcoming Write Zeroes function.

Also cleans up the variable names to be consistent with the rest of the
code.

Change-Id: I69847b6a052fb7baff058ed8e5b79904ddf2ec6d
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/377259
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-09-14 17:41:52 -04:00
Tomasz Zawadzki
5f6306ea24 bdev/gpt: free base bdev_part in gpt after examining
Currently GPT keeps the bdev it is examining open, even after determining there is no GPT on it.
It is due to spdk_gpt_base_free() not notifying bdev layer to free base bdev_part.

Additionally release of bdev module for that bdev was moved to bdev_part_free,
as the module is not claimed until bdev_part on base bdev are created.

Functional tests added to verify the changes.

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Id75f88259267847e8ec476d19750dc1e2690f11a
Reviewed-on: https://review.gerrithub.io/378621
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-09-14 13:39:29 -04:00
Dariusz Stojaczyk
6d1bcaafbb test/bdevio: support 4kb blocksize
bdevio used to do I/O at hardcoded offset 2048.
This obviously fails for any blocksize > 2048.
All 2048 offsets has been changed to 8192.

Change-Id: I70c057b8de539718175a8d29aa91422ba3fba70e
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/378298
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-09-14 12:29:50 -04:00
Daniel Verkamp
4454df7006 blobfs/fuse: remove -ldl from linker args
This is already included in ENV_LINKER_ARGS when necessary.

Fixes GitHub issue #193 (Compile error for fuse.c on FreeBSD).

Change-Id: I30fce30b709d73c2c01b6782a9b1f3c39d823d42
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/378210
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-09-13 15:35:57 -04:00
Daniel Verkamp
34e3bf9c86 test: move subsystem_ut to unit test directory
Change-Id: I22c4273812922e1a2f7bb7ec0d3e8353e74780a3
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/377822
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-09-12 21:00:07 -04:00
Young Tack Jin
ef1437b313 nvme: support meta data on vendor specific commands
spdk_nvme_ctrlr_cmd_io_raw_with_md() will be verified
on Cosmos+ OpenSSD as soon as it will support meta data.

Change-Id: Ib5f3f1f1eba66d0147a566804395bfa5ec959c2f
Signed-off-by: Young Tack Jin <youngtack.jin@circuitblvd.com>
Reviewed-on: https://review.gerrithub.io/377428
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-09-12 16:14:11 -04:00
Jim Harris
0491b3cbc6 bdevperf: use blocks API
This is a better performing API since it avoids
unnecessary bytes-to-blocks conversions.

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

Reviewed-on: https://review.gerrithub.io/377798
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-09-12 11:16:50 -04:00
Jim Harris
85cc223946 bdev: add common partition helper functions
split, gpt and error all have a lot of similar code, and
are based on the presumption of one or more "partition" bdevs
on a "base" bdev.  This results in quite a bit of duplicated
code between these three bdev modules.  The error bdev
module does follow this same model - it just always has only
a one-to-one mapping between the error bdev and its base bdev.

As all of the modules move to allocating their own bdev_io
rather than allowing for adjusting an existing bdev_io and
resubmitting it, there will be even more duplicated code
between these modules.

So this patch adds a set of helper functions in the common
bdev library to eliminate all of this duplicated code.

This patch also moves the split module to use it - future
patches will also convert gpt and error.

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

Reviewed-on: https://review.gerrithub.io/376423
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-09-12 11:16:50 -04:00
Cunyin Chang
e87808c4fb blobstore: sync super block after set the "clean" as 0.
The system could crash anytime, we need sync the "clean" flag
into disk as soon as we load the blobstore. Then if the system crashed,
we will find the blobstore is not clean shutdown next time when we load
the blobstore, and we could run the recover process then.

Change-Id: I6189678e970ffe979a224e02be6cede0ee44dde8
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
Reviewed-on: https://review.gerrithub.io/376276
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
2017-09-11 15:44:38 -04:00
Karol Latecki
26a40ff914 test/vhost: lower fio job iodepth
Temporarily lower iodepth to avoid random test pool
failures while running vhost blk fio tests.

Reenable old iodepth value once 'too high' vhost blk performance
is solved.

Change-Id: I385ff3151b4433b331807be6ce0f3103980bae7c
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/377697
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-09-08 17:16:54 -04:00
Jim Harris
018e488cbc test/vhost: disable scsi resets
This is still causing a lot of random failures in the test
pool.  Disable this for now.  There are a series of patches
coming up which will improve reset handling significantly -
let's wait to re-enable this until that is in place.

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

Reviewed-on: https://review.gerrithub.io/375651
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-09-07 17:52:18 -04:00
Dariusz Stojaczyk
e28f3397c5 vhost: added spdk_vhost_event_fn
The next step towards fixing synchronization issues between RPC and
vhost controller reactor.

This patch makes changes to already present vhost timed event API
to conform it to the upcoming external spdk_events API. The timed_event
API shall be removed from headers in future. See next patch for details.

Change-Id: I31b0d7c383b39c32326daa750663ebdeb4edd562
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/377584
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-09-07 14:34:01 -04:00
Pawel Niedzwiecki
3dfd4a7c71 ut/vhost: add UT coverage for vhost_blk.c
Change-Id: I933baf8294926eae63bc7392c51e4b24e6173def
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/376651
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-09-06 18:14:15 -04:00
Paul Luse
9b99f2c0f3 log: add new parm to spdk_trace_dump()
Allows called to specify something other than stderr such as
stdout. Existing callers updated to use stderr.

Change-Id: I48a703e1474a45952878121a83c19fef1c43d630
Signed-off-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/377420
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-09-06 17:33:03 -04:00
Daniel Verkamp
1578b5b59b nvmf: convert to bdev _blocks APIs
Change-Id: I46dea98bf762967d49867e428f8ce6b3ec881072
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/376257
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-09-06 17:19:26 -04:00
Daniel Verkamp
e83f976743 bdev: introduce APIs with block units
Add new versions of all of the I/O calls that take parameters in blocks
instead of bytes.  These are intended to replace the old APIs, but
we'll keep them for now to preserve compatibility.

Change-Id: I85ab665c653e8c697016c628837d49aa0c3bfcd0
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/376255
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: John Kariuki <John.K.Kariuki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
2017-09-06 13:01:13 -04:00
Daniel Verkamp
7987a7b243 ut/vhost_scsi: fix formatting
Caught by astyle 3.0.

Change-Id: Ie175f354526fbae01513e47228eb7dad249c081a
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/377248
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-09-05 19:07:45 -04:00
Daniel Verkamp
75574cb898 ut/vhost_scsi: fix build
This new vhost_scsi_ut code was merged after changes to the vhost
timed_event functions and didn't get rebased correctly.

Change-Id: Ia92936a19a668a0f1113518097b20b818f39986c
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/377246
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-09-05 18:42:03 -04:00
Pawel Niedzwiecki
b6653164c9 ut/vhost: add UT coverage for vhost_scsi.c
Change-Id: I7616613eac6a6b8047f8d505018cc3887adb4fcb
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/375943
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-09-05 17:58:25 -04:00
Lukasz Galka
3d738d4569 test/vhost: move fiotest functions to common directory
Move files from test/vhost/fiotest to test/vhost/common.
Scripts and functions from fio tests will be re-used in
any new test scripts.

Change-Id: I2423d636d41dcb2b2af12987769961607e969392
Signed-off-by: Lukasz Galka <lukaszx.galka@intel.com>
Reviewed-on: https://review.gerrithub.io/372545
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-09-05 13:54:47 -04:00
Daniel Verkamp
a2db49a121 nvmf: add AllowAnyHost option to subsystems
The previous behavior with an empty host NQN whitelist was to allow any
host to connect.

Change-Id: I5401e52d96642cf20afe0d50c692613e67262edf
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/376432
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-09-05 13:03:09 -04:00