Commit Graph

2658 Commits

Author SHA1 Message Date
GangCao
f07ed6efa7 example/nvme_manage: add the shm_id parameter for multiprocess
Change-Id: Ifdae15e36d7330b4e72f4a08b263c9de7303caeb
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/371830
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-08-01 13:41:46 -04:00
Paul Luse
2f2dc36f1d makefiles: remove DPDK_INC cflags, no longer needed
Change-Id: I2b388aa50bf6da3341c74ba4ea414939c91e22e1
Signed-off-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/371791
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-08-01 13:41:26 -04:00
Daniel Verkamp
f7cfd3a434 bdev/gpt: compare the correct MBR entry start LBA
The protective MBR entry may not be the first one.  This is already
handled correctly when comparing the total size field, but the start LBA
field was always looking at the first entry.

Change-Id: Ie54e424b2e9cb546b1ed04192662936e04e08b6b
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/370747
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-08-01 12:47:57 -04:00
Daniel Verkamp
94174eec71 bdev/gpt: remove unused gpt->mbr field
Change-Id: If3cd7ee8251b5e311d5e1e9210085f8c2cbc83e1
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/370746
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-08-01 12:47:57 -04:00
Daniel Verkamp
13a622a591 bdev/gpt: clean up #includes
Remove unnecessary headers and order the remaining #includes correctly.

Change-Id: I6b331aa1514e55e7bf56a07be23f630e4ae3fcdb
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/370731
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-08-01 12:47:57 -04:00
Daniel Verkamp
d695182200 bdev/gpt: fix MBR start_lba endian conversion
The message printed when start_lba doesn't match the expected value
would print byte-swapped values on big-endian architectures.  On
little-endian architectures, the problem would not be noticeable, since
the conversion doesn't do anything.

Change-Id: I9e8d4485b5710f4333d04bb006bc204416c689cd
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/370730
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-08-01 12:47:57 -04:00
Daniel Verkamp
e5f5d9803e version: 17.10-pre
Change-Id: Ia1a3560ec51c82f17f694ed3b5e5aa4d1fd1e2bd
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/372017
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-08-01 12:41:38 -04:00
Daniel Verkamp
c0ed45ab5e SPDK 17.07
Change-Id: I3dc71f95f24db0280a79a0ca25ad7eff7d163598
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/371987
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-07-31 20:22:45 -04:00
Daniel Verkamp
e820b2d198 doc/vhost: note buggy Windows virtio-blk driver
Change-Id: I74daf6c649d39954f8f4cbead8849e589d39a5aa
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/372011
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-07-31 20:07:42 -04:00
Cunyin Chang
23659578df doc: List known issue for hotplug of iscsi.
Change-Id: Icd37d8a0f31c1fd4e8e84ea02a919833b161a49d
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
Reviewed-on: https://review.gerrithub.io/370217
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>
2017-07-31 15:36:01 -04:00
Jim Harris
0b33e77e4c nvme: fix _nvme_ns_cmd_split_sgl_request for last SGE not page aligned
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I2b6a22591d0a5f7435d9fd9dd8d6a1c854da3d89

Reviewed-on: https://review.gerrithub.io/371978
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Paweł Niedźwiecki <pawelx.niedzwiecki@intel.com>
2017-07-31 13:10:52 -04:00
Jim Harris
bab34df6ca vhost: split iovs which span hugepage boundaries
A virtio descriptor may specify a buffer that spans
a huge page boundary or even a vhost memory region.
So modify spdk_vhost_vring_desc_to_iov() to take this
into account.

While here, also change spdk_vhost_vring_desc_to_iov
to return int instead of bool.  int return with -1 is
most standard to indicate failure.

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

Reviewed-on: https://review.gerrithub.io/371756
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Piotr Pelpliński <piotr.pelplinski@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
2017-07-31 13:10:52 -04:00
Jim Harris
c41338ce70 vhost: add unit test framework
While here, add a new DEFINE_STUB_V for void stubs.

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

Reviewed-on: https://review.gerrithub.io/371735
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-07-31 13:10:52 -04:00
Jim Harris
1238cfb95a vhost: use SPDK_VHOST_IOVS_MAX for scsi and blk
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I19e9ea2682c75bcee096dbcdbb9447c7144427e8

Reviewed-on: https://review.gerrithub.io/371734
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: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
2017-07-31 13:10:52 -04:00
Daniel Verkamp
8b5b1abea8 nvme: clarify scatter-gather function docs
Each SGL element must be physically contiguous; this was not clearly
documented, so add an explicit requirement to the next_sge callback
documentation.

Change-Id: I165af531f8509e1b89e3562439b70d75acb23bcf
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/371729
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-07-28 17:53:41 -04:00
Pawel Wodkowski
71904d7f4d vhost: don't use interrupt suppressing hints on avail ring
Randomly we loose some interrupts. This stop IO in guest till next
request is issued which is abort

Change-Id: I1a0b6391a324cabb0df17d2704126d161b1868f7
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/370248
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>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-07-27 12:25:43 -04:00
Daniel Verkamp
bf24e1046d version: 17.07-rc2
Change-Id: I5da58262e5b38101e44c29b956bc1c29a6cec492
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/371236
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-07-25 18:36:49 -04:00
Ziye Yang
3a289a6eea test, blofs: remove the RESULTS_DIR prefix
Remove RESULTS_DIR PREFIX since we already change the folder

Change-Id: I6be0b4dda481377a96d8fdbb69d5d60a6616c7d0
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/370829
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-07-25 15:56:57 -04:00
Dariusz Stojaczyk
f84616102b bdev: allow closing descriptor from it's remove_cb
bdev could be unregistered multiple times when all it's descriptors have
been instantly closed via it's remove_cb without any deferred
event/poller

Change-Id: I128716077b0512c6334bdd113220684f8cfcbecb
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/370949
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-07-25 15:55:58 -04:00
Karol Latecki
522944bb26 test/vhost: Update test plan for vhost
Update exisitng tests with vhost blk information
Add tests for scsi/blk hot-attach, hot-detach and hot-plug

Change-Id: I95dad5986d3795430fea304712a6491dfef712d0
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/369168
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: Ben Walker <benjamin.walker@intel.com>
2017-07-25 15:48:46 -04:00
Pawel Niedzwiecki
80ff6c059e vhost_scsi: update code comments
- task_data_setup() - value of 1 is no loger returned
- task_submit() -removed outdated comment

Change-Id: I523a465eba7af93535e2dc3a583abb315950f4b3
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/371154
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: Ben Walker <benjamin.walker@intel.com>
2017-07-25 15:48:33 -04:00
Pawel Wodkowski
b368258bb3 vhost-blk: fix error reporting on bdev hot-removal
blk_iovs_setup() error code was missinterpeted and no error returned for
IO that was directed to removed bdev.

Change-Id: Iec5ebef20734cca07f20f068b83b74b189cdcb66
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/370711
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Lukasz Galka <lukaszx.galka@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-07-25 14:25:40 -04:00
Daniel Verkamp
28918dc4d9 version: 17.07-rc1
Change-Id: Iad8554bdfae53f36a09bb0bd5e4280ec2e3d6698
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/370574
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-07-20 16:58:27 -04:00
Daniel Verkamp
054c533862 changelog: fill out release summary line
Change-Id: Id038a1ba5c050ac4aa3fe5b621fe2f5968bd74c5
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/369912
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-07-20 16:58:27 -04:00
Dariusz Stojaczyk
73358c99e1 util/nvme: added io_device unregister callback
Patch afe860ae deferred freeing the io_device. However, for nvme, the
io_device context (spdk_nvme_ctrlr) is still being destructed before
io_channels are destroyed, causing segfaults on hotremove.

This patch defers io_device context destruction and fixes nvme
hotremove.

Fixes: afe860aeb1 ("channel: Correctly defer unregisters if channels exist")
Fixes: 5533c3d208 ("util: defer put_io_channel")

Change-Id: I7af699174cac0c6c6a6faa2cc65418c47347eb9a
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/370459
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-07-20 16:07:02 -04:00
Dariusz Stojaczyk
542b541588 vhost_scsi: implemented abstract vhost event layer
Implemented abstract vhost event layer on top of virtio eventq.
This allows us to defer virtio-event-related actions to be called from
the vhost poller thread. This is required for hot-attach, for which
io_channels have to be created on the I/O thread.

This adds full support for hot-attaching and hot-detaching vhost scsi
devices. They can be now attached to a controller via RPC at any time.

Change-Id: Icf353bfcf69c83ef16b8fc771ea4c487002094f9
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/370016
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>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-07-20 13:19:26 -04:00
Cunyin Chang
40b74cd343 iscsi: optimization of large read process.
This patch move the spdk_iscsi_conn_handle_queued_tasks() to the main
loop of connection poller, make the logic more clear, it will also fix
one issue of hotplug:
for large read command, it has the potential risk:
one task will be split into N subtaks, when primary task return error and
try to send data in pdu, it will call spdk_iscsi_conn_handle_queued_tasks(),
the primary task is pending now, and all the subtasks will return error from
lun layer synchronous, this make the primary task return from the function
spdk_iscsi_transfer_in() after all the other subtaks, but when the N - 1 subtask
return from function spdk_iscsi_transfer_in(), it meet the condition:
primary->bytes_completed == primary->scsi.transfer_len
then it will send response pdu, after this, the primary task return from
spdk_iscsi_transfer_in(), it also meet the condition, so it will also try
to send response pdu, this will make the application run into error.

Change-Id: I72206c1ce303f5fb6bd650713742d5819a88a30f
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
Reviewed-on: https://review.gerrithub.io/370339
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-07-20 12:03:34 -04:00
Dariusz Stojaczyk
8c3fadc282 gpt/split: implemented hotremove
Hotremove event was detected on base bdev, but wasn't propagated to
vbdevs. This patch makes base bdev destroy all it's children once
hotremove is triggered. This fixes hotremove segfaults and adds full
support for split/gpt hotremove.

Change-Id: I7f8b0b109ef237783b6b2e33a18f68c59a8bbe72
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/367824
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>
2017-07-19 17:09:30 -04:00
Ben Walker
afe860aeb1 channel: Correctly defer unregisters if channels exist
Unregistering a device should be deferred if I/O
channels still exist. Those I/O channels are likely
undergoing a deferred unregister themselves.

Change-Id: I67186232a58f212b867f6ef894c3d37aae2a4d53
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/370351
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-07-19 14:42:44 -04:00
Ziye Yang
59d6f04758 nbd: fix bdev alignment issue
When using AIO as the real device of /dev/nbd, we
fail the test due to the alignment issue

Change-Id: I608dfdad1e0cac0beaf438c7a1f115c2d1a9f943
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/370233
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-07-19 13:54:38 -04:00
GangCao
b98569fd4f doc: add the documentation for nvme-cli support
Change-Id: Ifd662c6bf6f7d337149c25bb72a9471713db0420
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/369517
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-07-19 13:52:14 -04:00
Daniel Verkamp
ce4fcbce71 nvme: add I/O qpair creation options
Add a new struct spdk_nvme_io_qpair_opts to allow the user to override
controller options on a per-I/O qpair basis.

Existing callers with qprio == 0 can be updated to:

  ... = spdk_nvme_ctrlr_alloc_io_qpair(ctrlr, NULL, 0);

Callers that need to specify a non-default qprio should be updated to:

  struct spdk_nvme_io_qpair_opts opts;
  spdk_nvme_ctrlr_get_default_io_qpair_opts(ctrlr, &opts, sizeof(opts));
  opts.qprio = SPDK_NVME_QPRIO_...;
  ... = spdk_nvme_ctrlr_alloc_io_qpair(ctrlr, &opts, sizeof(opts));

Change-Id: I8ac3ea369535cfde759abbe75e1d974b6450a800
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/369676
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-07-18 18:33:20 -04:00
Dariusz Stojaczyk
6a0e8d7ae9 gpt: fixed error-handling path for initializing gpt module
This patch also releases bdev module and closes claiming descriptor on
regular split base destruction.

These problems must've been overlooked in patches 26d6770f and be9a3b9f.

Fixes: 26d6770f1c ("GPT: add GPT bdev support")
Fixes: be9a3b9f69 ("bdev: pass descriptors for I/O operations")

Change-Id: Ib47e2c4d3b99c6d3f2dbe7ef01be81ca3dd97341
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/370181
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-07-18 17:57:45 -04:00
Dariusz Stojaczyk
02a4d6cb41 split: close descriptor and release bdev module when freeing split base
This was probably overlooked in patch be9a3b9f.

Fixes: be9a3b9f69 ("bdev: pass descriptors for I/O operations")

Change-Id: If29ad65ac168f3dbf7e1602f26f939dfbf17599a
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/370180
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>
2017-07-18 17:57:45 -04:00
Daniel Verkamp
1153b8c5c4 jsonrpc: simplify by removing use of poll()
Change-Id: Ib756212d227fb71b9ef3d486223740e4cb152815
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/370200
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-07-18 17:00:54 -04:00
Daniel Verkamp
1be7a80c2d jsonrpc: remove pointless 'continue' statement
This was left behind in commit 122e28465 ("jsonrpc: move closed conn
handling before poll()").  It is not needed now that the closed
connection handling is in a loop by itself.

Change-Id: I09959003bc6a370f1621815aebdd428be3304e5e
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/369906
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-07-18 17:00:54 -04:00
Roman
5b53b568e4 add VTune support: spin-wait stat
Change-Id: Ie25a87c4b3f781299fa744fdcff6c9a63d473935
Signed-off-by: Roman <roman.sudarikov@intel.com>
Reviewed-on: https://review.gerrithub.io/365723
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-07-18 15:33:56 -04:00
Dariusz Stojaczyk
25499c4dba bdev: mark bdev as opened for write when claiming it
Otherwise we'd fail sanity checks when closing the claiming descriptor.
Current approach works because we never close the claiming descriptor.

Fixes: 4fc7e66614 ("bdev: add vbdev claim/release semantics")

Change-Id: I1c1f0c11450e749419726df460334ab97b43b584
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/370179
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-07-18 15:33:22 -04:00
Ziye Yang
8b6f5d54db bdev,test: move common gpt partition code to autotest_common.sh
Change-Id: I261e6ed578335ab091973f7546035e63a00dbbf4
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/369735
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>
2017-07-18 13:45:51 -04:00
Seth Howell
f03f5e7de8 iscsi: change iscsi_bhs_scsi_req variable names.
These variable names are changed to retain conformity with astyle 3.0.1. Astyle 3.0.1 recognizes 'final' as a keyword and incorrectly formats the iscsi_spec.h file breaking the build. Names were changed to avoid this case and maintain consistency within the struct.

Change-Id: I39c29d768c0ddfd459a9e9212c29cf564dad1963
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/369905
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-07-18 13:14:16 -04:00
Dariusz Stojaczyk
32f86a5f34 bdev: don't call recursively desc->remove_cb on bdev removal
When device has more than one open descriptor, remove_cbs of particular
descriptors could be called more than once.

Consider the following scenario:
bdev X with 2 open descriptors A and B.
X is removed (hotremoved for instance)
bdev_unregister(X) is called
  * bdev->status = REMOVING
  * A->remove_cb is called
    * some poller is started
  * B->remove_cb is called
    * another poller started

* poller from A->remove_cb finishes it's work and closes the desc:
  * bdev_close(A)
    * A is removed from bdev->open_descs list
    * bdev->status is REMOVING, so bdev_unregister(X) is called again!
      * B->remove cb is called again!
        * another poller starts? segfault?

Fixes: 57d174ff67 ("bdev: add spdk_bdev_open/close")

Change-Id: I0a898ec0aee521d0b2a1168fe7d469cc41a8ef4f
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/369727
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-07-17 19:06:42 -04:00
Dariusz Stojaczyk
ebaa8ff7f9 util: updated doc of spdk_put_io_channel
Patch 5533c3d2 changed spdk_put_io_channel behavior without updating the
docs. This patch fixes that.

Fixes: 5533c3d208 ("util: defer put_io_channel")

Change-Id: I587ce13f3caa4caa9d39e4ab85a197beea883f94
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/369720
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-07-17 19:06:42 -04:00
Ben Walker
5177ed40c4 blobfs: Handle request alloc failure during init/load
If the spdk_filesystem object is created but the initial
request allocation fails, correctly clean up. This
addresses a static analysis failure.

Change-Id: If47a380d8804a279ec92d2aee3de7d86bb5c67fa
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/369901
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-07-17 18:56:37 -04:00
Liang Yan
fe84b2eb02 test/blobfs: test file creation in async mode
Change-Id: I155d956b0492120bf1b0194d0e7303d781bcdb25
Signed-off-by: Liang Yan <liang.z.yan@intel.com>
Reviewed-on: https://review.gerrithub.io/365106
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: GangCao <gang.cao@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-07-17 18:20:25 -04:00
Daniel Verkamp
7538196f30 nvme/rdma: print getaddrinfo() error if it fails
gai_strerror() is documented as thread-safe, so this should be safe to
use from a library.

Change-Id: Ia0ec0b5c387db8993dd1ba3a3029562f25cc210d
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/369642
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-07-17 17:58:55 -04:00
Daniel Verkamp
7ae3fcd02a gpt: fix naming of CRC32 polynomial #define
GPT uses the standard IEEE CRC-32 polynomial, not CRC-32C.

Change-Id: I94dae01ec7b31cb3c3efc735d9dfa4e0cfea9ce4
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/369306
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2017-07-17 17:58:19 -04:00
Dariusz Stojaczyk
931e3d51d9 util: call for_each_channel completion in original thread
As specified in the doc of spdk_for_each_channel:
```
Once 'fn' has been called on each channel, 'cpl' will be called
on the thread that spdk_for_each_channel was initially called from.
```

Fixes: ff87d29cc3 ("io_channel: Add mechanism to call a function on
each channel")

Change-Id: Ic60b061ec402672f510d99697943e96ff9a73417
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/369719
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2017-07-17 15:20:10 -04:00
Daniel Verkamp
740e5dc50b iscsi: refactor and simplify digest calculations
Factor out the common PDU header and data digest calculations into
helper functions in iscsi.c.  This eliminates the need for the crc32c.c
iSCSI-specific padding functions spdk_fixup_crc32c() and spdk_crc32c(),
so remove them.

Change-Id: I8cbf269c43177d7483f1df2e7ce9ce83776e7169
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/369312
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-07-17 14:18:07 -04:00
Dariusz Stojaczyk
30c42b9b32 vhost: added option to save pid to file
Usage:
./vhost -f path/to/pidfile
A text file containing single pid number will be created

Change-Id: Ia7762ce3085400a47740c9a5f44b56d63c9fafc6
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/368518
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-07-17 12:49:20 -04:00
Daniel Verkamp
0d9842813f test/iscsi: remove gen_nvme from FIO test
The iscsi_tgt fio test script called gen_nvme, but it never actually
used any NVMe bdevs, only Malloc.

Change-Id: I1a4eb16a4aa48f7f5de7a292c2e06a7a1711e181
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/369495
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-07-14 19:35:44 -04:00