Commit Graph

5155 Commits

Author SHA1 Message Date
Daniel Verkamp
4a534344ee scripts/rpc.py: pass named args to app.py
Also add docstrings to all app.py methods.

Change-Id: Ib234014630e8b47c55f8d96bede509952fe653c5
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/411940
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>
2018-05-24 05:10:36 +00:00
Pawel Wodkowski
1b2cf0976a scripts/rpc: filter methods in load_config by allowed methods
Change-Id: Ie3966bd19e37e83a77e8781aac5f08e87b6f21ba
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/411133
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-05-23 21:49:19 +00:00
Jim Harris
8021da8ba6 setup.sh: do not unload/reload contigmem.ko on FreeBSD
When running "setup.sh config" (or setup.sh without
specify a mode - which defaults to config), do not
unload the contigmem driver and then reload it.  Over
time, memory can get fragmented and contigmem will fail,
crashing the system.

But still check if the requested HUGEMEM matches what was
previously specified.  If a different amount was requested,
unload contigmem as before and then reload with the new
amount.

This patch brings FreeBSD behavior in line with Linux.  On
Linux, we do not release all of the hugepages and then
reallocate them.

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

Reviewed-on: https://review.gerrithub.io/412238
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>
2018-05-23 18:24:22 +00:00
Pawel Kaminski
a34a1aa255 test/lvol: Inflate test.
Change-Id: Icd0c08b5e95fded65394838e1c2e5e0abb8d3c75
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/408675
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-05-23 18:12:52 +00:00
Maciej Szwed
fda8596e0d lvol: add lvol inflate RPC call
Change-Id: I15d6d89bc6fabd87b458113c777a66e3bf1dcecc
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.gerrithub.io/408699
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>
2018-05-23 18:12:52 +00:00
Maciej Szwed
6ce7a73912 lvol: add lvol inflate function
Change-Id: Ib999d3f082f5d632cb1aaf089504d0cd48e77539
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Reviewed-on: https://review.gerrithub.io/408696
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-05-23 18:12:52 +00:00
Yanbo Zhou
64ccd4b95b bdev: a new public function to get the I/O statistics of bdev
Add a new function and its RPC caller. By using it, we can
get the statistics of all the bdevs or the specified bdev.

Meanwhile, with this patch, the open source tool 'sysstat/iostat'
can support for SPDK. The 'iostat' tool can call this function to
get the statistics of all the SPDK managed devices via the rpc
interface.

Change-Id: I135a7bbd49d923014bdf93720f78dd5a588d7afa
Signed-off-by: Yanbo Zhou <yanbo.zhou@intel.com>
Reviewed-on: https://review.gerrithub.io/393130
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-05-23 17:49:21 +00:00
Dariusz Stojaczyk
3949140b2e bdev/virtio_blk: fix double free on init failure
virtio_blk bdevs inherit the name string from their virtio
devices. The string is always freed on virtio device destroy, so
trying to free it as a part of bdev cleanup would always result
in a double free.

Change-Id: I47d20748ec12d9be201b9cd4f72bf89a61e80170
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/412073
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>
2018-05-22 23:08:40 +00:00
Daniel Verkamp
475165dffe bdev/lvol: inherit need_aligned_buffer of base bdev
Logical volume store bdevs should report the same buffer alignment
requirements as the base bdev of the logical volume store.  For example,
a lvolstore on a Linux AIO bdev should require aligned buffers.

Fixes #307.

Change-Id: I8e40dd428db882d18546caf678d1d4ef4462e2b4
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/412064
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-05-22 23:08:11 +00:00
Daniel Verkamp
e95f0bb756 nbd/rpc: make get_nbd_disks nbd_device param optional
Change-Id: Ie56d5908af306eec75a360a7ce6078ba93bb2f4f
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/411746
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>
2018-05-22 23:03:30 +00:00
Daniel Verkamp
75896c2510 bdev/rpc: make get_bdevs/config "name" params optional
The whole params object is already optional, but making the parameter
optional as well allows the specification of an empty object for params
to work.

Some JSON-RPC clients make it more difficult to omit the params object
entirely; see issue #303.

Change-Id: If0ac4ebfba33fd2c85f729d2f1109e4d0e47aa3b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/411740
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>
2018-05-22 23:03:30 +00:00
Ben Walker
aac1f5f934 bdev: Make the QoS channel use a regular channel
This makes a number of things much simpler and eliminates
the need for upcoming proposed reset handling.

Change-Id: I23a6badd0873f6dcf38ba1e55bf18d846c2843df
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/407357
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-05-22 21:54:46 +00:00
Ben Walker
f0191857a5 nvmf/rdma: Update handling of RDMA_CM_EVENTS
Make sure every event has a handler. No new code
to actually handle events yet.

Change-Id: I4d63898e9bd7fcaa7dc3486c07f42d75b4d48da0
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/412074
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>
2018-05-22 21:48:04 +00:00
Yanbo Zhou
b31330acaa include/lvol.h: add comments for public APIs
Change-Id: I1f3947a4d666c0b96a60a3014ac1bfb9f77ce813
Signed-off-by: Yanbo Zhou <yanbo.zhou@intel.com>
Reviewed-on: https://review.gerrithub.io/411217
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>
2018-05-22 21:12:52 +00:00
Daniel Verkamp
3d22c5088e scripts/pkgdep.sh: fix astyle package name on RH
We don't need the astyle-devel package (this includes astyle.h and
libastyle.so, neither of which we use); astyle is sufficient.

This also fixes pkgdep on CentOS 6, which only has astyle, not
astyle-devel.

Change-Id: Idaf34b1727da4f7202c324788e6ae1a3397226b6
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/411642
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>
2018-05-22 21:06:37 +00:00
Daniel Verkamp
aa67900a2e jsonrpc: make "jsonrpc" request field optional
The "jsonrpc" field, per spec, is meant to contain the exact string
"2.0" to indicate the version of the JSON-RPC specification implemented
by the client.  We don't do anything useful with this information except
to drop requests for (theoretical) other versions, so it should be safe
to allow the parameter to be optional.  If the version is specified, we
will still validate that it is 2.0.

This enables interoperability with a Go JSON-RPC client, as mentioned in
issue #303: https://godoc.org/github.com/mafredri/cdp/rpcc

Change-Id: Ifde32b3f47a5d7942f4ab74b4d6029dd0168efa8
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/411742
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>
2018-05-22 21:05:17 +00:00
Daniel Verkamp
700477897a test/vm_setup.sh: update nvml-tools -> pmempool
This package has been renamed to reflect the new upstream project name.

Change-Id: I71f6bfaf36fb1fe7dc4cb050e3d7faad1097994e
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/411781
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>
2018-05-22 21:04:10 +00:00
Daniel Verkamp
955b295a58 nvme: make AER callback per-process
For the same reason as commit 31bf5d795e ("nvme: make timeout function
per process"), the AER callback also needs to be stored in the
per-process controller data structure.

Change-Id: I41425d81a2ab16c06ef9b900bef6a6128117fcb0
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/410953
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>
2018-05-22 18:17:43 +00:00
Dariusz Stojaczyk
267318d671 bdev/virtio: fix memleak in construct_virtio_user_blk_bdev
Fixes #305

Change-Id: I70843e63c74761e71cbe39369249cfa1123a4275
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/411959
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-05-22 17:00:00 +00:00
Daniel Verkamp
b0cfbb4fc0 dpdk: update submodule to latest spdk-18.02 branch
Pull in commit b354dddee3fc ("RHEL 6.4 support - use previous
'deprecated' attibute API").

Change-Id: I0e8c81dbbe49ceaced38f30493cd9012aecca47a
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/411729
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-05-22 16:59:25 +00:00
Liang Yan
04ad0ad9f1 test/rpc: add multiple NVMe bdev support in the rpc_config.py
Change-Id: I923c808affabdb97a5237b76f9f5534d6fb41601
Signed-off-by: Liang Yan <liang.z.yan@intel.com>
Reviewed-on: https://review.gerrithub.io/411048
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-05-22 16:52:02 +00:00
Daniel Verkamp
3148c48079 nvme/rdma: create per-process controller struct
The RDMA transport was not correctly registering new controllers on
creation.  RDMA doesn't support multi-process, but it still needs a
single per-process structure for the owning process.

Change-Id: I337ab9d00b468671e7c7a21175682beed4cfdd2e
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/410958
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>
2018-05-21 23:19:54 +00:00
Daniel Verkamp
571a4615c3 bdev/passthru: remove trailing space in config dump
Change-Id: I1b9a4aa5d71009ca9ca14748c520a8a492bfc039
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/410944
Reviewed-by: Jim Harris <james.r.harris@intel.com>
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>
2018-05-21 19:44:30 +00:00
Daniel Verkamp
2ecf7fdbf4 bdev/passthru: clarify hot remove callback name
The hot remove callback is registered when we open the bdev in the
examine callback, but it's not used just during examine; change the name
of the callback to more accurately reflect what it is for.

Change-Id: Ie3e425e2e512f212d0dea40be12186c00e7a1091
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/410943
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>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-05-21 19:44:30 +00:00
Ziye Yang
582d8f86a2 nvmf: move outstandling req list in spdk_nvmf_qpair
Purpose: To make the reqs recycle more flexible.

Change-Id: Ied37397a10dada22a7aee6bb5a316da6a0583073
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/410866
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-05-21 18:34:38 +00:00
Daniel Verkamp
943c7c69c3 nvme: hold ctrlr_lock when setting timeout callback
The per-process controller data may only be touched while holding the
ctrlr_lock.

Change-Id: I18c8c4e43db4d58e6b86f0c0fd222f6d30830b85
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/410952
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-05-21 18:22:50 +00:00
Daniel Verkamp
cbd9c241dc nvme: factor out process lookup into a function
Change-Id: I7598222db5d76c1a1578fbb5935d4348f7c62f54
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/410951
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2018-05-21 18:22:50 +00:00
Seth Howell
27d7bac9a0 test/common: Make common pmap call more generic
This is to support older versions of pmap (specifically procps v 3.2.8
which ships with centOS 6) which don't support the -p and -X options.

Change-Id: Ic8d4b94985c165e8bf224204af48b5d856aa2403
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/411755
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>
2018-05-21 17:09:23 +00:00
Seth Howell
3c2044e9aa test/iscsi_tgt: make rpc config.py python3 compatible
Change print statement syntax and subprocess calls as well as some list
comprehension syntax.

Change-Id: Iebdea5f06be963e7f04af4df352aacef9b31a8eb
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/410957
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-05-18 22:12:19 +00:00
Daniel Verkamp
f750c4ebb5 nvme: apply Identify CNS quirk to NS ID Descriptor
Avoid sending CNS values other than 0 and 1 to controllers with the
Identify CNS quirk added in commit 6442451b10 ("nvme: add a quirk for
identify 0x2").

This probably doesn't affect either of the controllers with the quirk in
practice, since this command is already only sent to controllers that
report NVMe version 1.3 or newer, but let's add the check anyway for
consistency.

Change-Id: I858c28ab7d43714c501dd22d6797259054f0f0a8
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/410941
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>
2018-05-17 23:11:35 +00:00
Chen Wang
d6d097a18d test/vhost: add vhost_nvme.c unit test framework
Add a simple example for spdk_vhost_nvme_controller_construct
and spdk_vhost_nvme_dev_construct functions.

Change-Id: I38415a7f4b28faf071a74e9b87d141da78e43368
Signed-off-by: Chen Wang <chenx.wang@intel.com>
Reviewed-on: https://review.gerrithub.io/410532
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-05-17 23:07:58 +00:00
Shuhei Matsumoto
a3dd8df8cd rpc/python: Add abbreviated '-f' option to load_config
save_config has '-f' as option and it is easier to use than '--filename'.

Change-Id: I553480d03431c65612e9df296f202572522d6aca
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/410864
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>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
2018-05-17 23:06:11 +00:00
Shuhei Matsumoto
718440bc6b iscsi: Fix two bugs of JSON config dump
Missed to add object_begin to dump for portal group.
key of lun in luns is different between dump and load.

Change-Id: I16b95596478e0e4430c7186aa077bd107e375a93
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/410863
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>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-05-17 23:06:11 +00:00
Yanbo Zhou
19354d966c include/string.h: add comments for public APIs
Change-Id: I56488b61ff000070c430851c9627fa23c164fb18
Signed-off-by: Yanbo Zhou <yanbo.zhou@intel.com>
Reviewed-on: https://review.gerrithub.io/406924
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>
2018-05-17 23:01:00 +00:00
Pawel Wodkowski
4e012722ef bdev/split: free req in destruct_split_vbdev RPC call
Change-Id: Ia322d630481adab7dc9fdb28a8c90cd869a8f300
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/411085
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-05-17 17:38:02 +00:00
Pawel Wodkowski
cc9c772379 spdk_tgt: fix parsing vhost arguments
'S' and 'f' was not ported from vhost target app.

Change-Id: I1a450b83e969fc3ede1d9b5c2478acd350bbd601
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/410091
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-05-17 17:14:14 +00:00
Pawel Wodkowski
eac02a4ace conf: don't strdup name if section already exist
Change-Id: I43eb66e9bc9498dbb47d26ea68a952cf56b65321
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/411411
Reviewed-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-05-17 17:13:19 +00:00
Pawel Wodkowski
c099f120cc bdev/iscsi: save initiator iqn name
This was omitted in one of previous commits.

Change-Id: I93ed4bae671bb36bf2b714ff6649b1f33a692647
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/410094
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>
2018-05-17 17:11:59 +00:00
Pawel Wodkowski
19e207dbcc bdev/iscsi: set target name during connection
Change-Id: I6143bc32331d2eea6d9b524816c9a7f0041e00aa
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/410093
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>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-05-17 17:11:59 +00:00
Pawel Wodkowski
5f2ad2620b bdev/iscsi: save string url rather than struct iscsi_url
iscsi_url is not need after bdev creation. Also implementing get_config
RPC call in next patches is quite problematic as information how bdev is
created using iSCSI URL is lost (eg username).

Change-Id: I8b097617c09bd4636c28531ca20a59919b2b4f84
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/407769
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>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
2018-05-17 17:11:59 +00:00
Pawel Wodkowski
81866c26d8 bdev/iscsi: move libiscsi code from initialize to create function
Change-Id: I75876cca6a35b366ce7d52cbd0eda0df4b6d9817
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/410890
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>
2018-05-17 17:11:59 +00:00
Pawel Wodkowski
d2bd0a77a3 bdev/iscsi: add ERRLOG in iscsi_connect_cb
Change-Id: I05ea1cb5c3b331338623dea1c6d113f2bb7388ca
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/410092
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>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-05-17 17:11:59 +00:00
Seth Howell
b484547f57 scripts: amend scheduler option in fio.py
The 4.16 Linux Kernel does not appear to have a noop scheduler for block
devices. Instead, it supplies a none option to turn off the scheduler
entirely.

Change-Id: I2dfb75b845cfff2ce2cabcfd86183b01432ad898
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/410954
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-05-17 17:10:42 +00:00
Seth Howell
d0b7400c08 scripts: Make fio.py python3 compatible
Fix deprecated print statements and properly encode strings for file and
process communications.

Change-Id: I896c9dd7b9b15be8684af267066dae8ca8df4f62
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/410949
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-05-17 17:10:42 +00:00
Seth Howell
61770b52e3 test/lvol: Remove python2 syntax from test cases
Python3 does not support the "except Exception, name:" syntax used in
test_cases.py

Change-Id: Ie90888d715c97c94c7686b797d955df2ead61915
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/410937
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>
2018-05-17 17:10:42 +00:00
Jim Harris
4d8c6a8440 env_dpdk: handle RTE_BAD_IOVA correctly in vtophys_get_paddr_pagemap
We've had cases (especially with vhost) in the past where we have
a valid vaddr but the backing page was not assigned yet.  DPDK used
to return 0 as the phys addr in these cases but now it returns
RTE_BAD_IOVA.  Unfortunately we don't have any tests currently
in the test pool that hit this condition, but at least one user
has an environment which hits it and this patch fixes their
problem.

Make sure we still work with older versions of DPDK as well.

Fixes issue #260.

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

Reviewed-on: https://review.gerrithub.io/410071
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-05-17 17:07:44 +00:00
Daniel Verkamp
08daa4477e blob: remove deprecated bs_io_*_blob functions
These were marked as deprecated in v18.04 and scheduled for removal in
v18.07.

Change-Id: I2587bcaf89cdcc757ad902ac42ccd9adce9c8f92
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/410727
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>
2018-05-11 23:58:48 +00:00
Dariusz Stojaczyk
cc8bb51b24 bdev: rename bdev_module_channel to bdev_shared_resource
It doesn't represent an io_channel, so lets
rename it to something less confusing.

Change-Id: I730eb0ff0eb7737a59c190812a25b327ccd8fc14
Suggested-by: Ben Walker <benjamin.walker@intel.com>
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/409998
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>
2018-05-11 17:32:30 +00:00
Daniel Verkamp
2c200379f2 scripts/check_format.sh: ban use of strcat()
Change-Id: I44d93da4c5ce51dc12c385bb8c1d56bf1336d526
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/410499
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>
2018-05-11 17:24:43 +00:00
Piotr Pelplinski
ede6d97e3c blobstore: add inflate call
Inflate call can be used on thin provisioned blob or clones.

Function allocates all unallocated clusters on specified blob and:
 - For clones, copies data from backing blob.
 - For thin provisioned blobs, clusters are zeroed.

After this call all dependency from specified blob is removed
what allows deletion i.e. snapshots.

Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Change-Id: Ibff569e45b12068b2fb46557156be348b36c252b
Reviewed-on: https://review.gerrithub.io/399367
Tested-by: SPDK Automated Test System <sys_sgsw@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>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-05-11 17:22:00 +00:00