Commit Graph

4463 Commits

Author SHA1 Message Date
Stephen Bates
b94155c853 docs: Add documentation for peer-2-peer
In 35a331a9 we added a new API that enables peer-2-peer (P2P) copies
between NVMe SSDs using Controller Memory Buffers (CMBs) that support
DMA operations. Add documentation for the API, the example application
(cmb_copy) and for P2P setup and operation.

Note that this new API is currently marked experimental.

Change-Id: Ifeedb86d5b72b3aa7a6803b87c4d4709c54108f8
Signed-off-by: Stephen Bates <sbates@raithlin.com>
Reviewed-on: https://review.gerrithub.io/401961
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-03-02 13:47:46 -05:00
param
c5cd53cce0 Support for Commands Supported and Effects Log Page
Change-Id: If28662585887b613e3510a8fd8414caeca9ba99b
Signed-off-by: param <kumaraparamesh92@gmail.com>
Reviewed-on: https://review.gerrithub.io/401314
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-02 13:45:35 -05:00
Pawel Kaminski
2114019360 test/vhost: Blk hot remove tests
Change-Id: Ibae9dfcb29fc94c38f48c788ae83477b2719b9fa
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/392454
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>
2018-03-02 13:43:03 -05:00
Pawel Niedzwiecki
77b40b64db test/virtio: Adds vhost block controllers to virtio tests
Change-Id: Idebfe94ecd54ea281018136c3cd8a5ae1c019dc6
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/401185
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-03-02 13:41:38 -05:00
Dariusz Stojaczyk
17d55c9fd4 bdev/virtio: added vhost-blk initiator
Briefly tested with SPDK target via bdevio
through both vhost-user and QEMU's virtio-pci.

vhost-blk driver is not mentioned in any doc yet.
A virtio-blk bdev can be created as following:

`construct_virtio_user_blk_bdev /tmp/virtio.0 MyVirtioBlk0 --vq-count 16`
`construct_virtio_pci_blk_bdev 0000:01:00.0 MyVirtioBlk1`

or

```
[VirtioUser0]
  Path /tmp/vhost.0
  Type Blk
  Queues 16

[VirtioPci]
  Enable Yes
```

If `Type` field is not present, the VirtioUser
section will be parsed as a SCSI one, preserving
backward compatibility.

Change-Id: I3eae9f3b90570fbb0177df4951e5eed86fe07c66
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/393056
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-03-02 13:41:38 -05:00
Changpeng Liu
d9321520ce nvmf: add Namespace deletion RPC support
Change-Id: I1c5adcce861b8a1fc8f8c96a3a237c4c2dae61af
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/401559
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-03-02 13:39:23 -05:00
Ziye Yang
51029af4d7 lib/iscsi: Add a check for poll_group
If this polling group is not initialized, we do not
need to destroy the polling group.

Change-Id: I5a94412d7f42b05d4a457c8652e2f465190fbe6e
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/401362
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-02 13:33:54 -05:00
Lance Hartmann
9364bee419 lib: Return instead of exit in net
Alters internal spdk_process_new_interface_msg() function
such that it returns a failure instead of exit()'ing.

Change-Id: I31c5dd9db43449f81dbb0f581258476a58aa8000
Signed-off-by: Lance Hartmann <lance.hartmann@oracle.com>
Reviewed-on: https://review.gerrithub.io/402165
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-02 13:33:03 -05:00
Stephen Bates
627bee96a4 nvme_pci: Correct bug in CMB allocation
There was a bug reported by Cunyin Chang with regards to how the
cmb_current_offset was calculated when the CMB offset into the CMB BAR
is non-zero. This patch fixes this issue and also fixes the problem
that the last valid offset into the BAR *may* differ if registration
is utilized or not (due to the 2MiB alignment and length requirements
for registered memory).

Change-Id: Id08d6a5a40b828338f6a66599171cc8dd59768a3
Signed-off-by: Stephen Bates <sbates@raithlin.com>
Reviewed-on: https://review.gerrithub.io/401832
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-02 13:31:48 -05:00
Changpeng Liu
736f6937f6 test/part_ut: remove VTUNE dependency for this unit test
Change-Id: If19c263d184c1eaab12950ba0baa05e7f3aea6e0
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/401729
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-03-02 13:31:03 -05:00
Yanbo Zhou
cc579c5e41 include/event.h: add comments for public APIs
Change-Id: I277fe7b239b9757c8c5565437ae8aa1a2665b31b
Signed-off-by: Yanbo Zhou <yanbo.zhou@intel.com>
Reviewed-on: https://review.gerrithub.io/392916
Reviewed-by: GangCao <gang.cao@intel.com>
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-03-02 13:30:27 -05:00
Dariusz Stojaczyk
55241750a6 setup.sh: print hugepage distribution status in setup.sh status
Current output looks as follows:

$ ./scripts/setup.sh status
Hugepages
node     hugesize     free /    num
node0   1048576kB        7 /      9
node0      2048kB     6144 /   6144
node1   1048576kB        0 /      0
node1      2048kB        0 /  15360
NVMe devices
BDF             Numa Node       Driver name             Device name
0000:0a:00.0    0               nvme                    nvme0
[...]

Change-Id: I8cf019f2b4eaa966633427dd8c3759c979ba456c
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/402281
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-03-02 13:29:34 -05:00
Seth Howell
d1f9da828a autotest.sh: create cleanup function
This function consolidates cleanup behaviors that the pool should follow
in the event of a failure.

Change-Id: I8623f065146292b29a38eb199dcbeac5787723e7
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/401857
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-03-02 13:28:24 -05:00
Yanbo Zhou
4dbff01ba3 include/io_channel.h: add comments for public APIs
Change-Id: I85dfac522eb77e5d53fb2fc9c5bb8a75463f1480
Signed-off-by: Yanbo Zhou <yanbo.zhou@intel.com>
Reviewed-on: https://review.gerrithub.io/392919
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-03-02 13:26:59 -05:00
Daniel Verkamp
63d09e11cb scripts/ceph: remove unused variable 'fsid'
Change-Id: I37f7b76828c74b07292a06ede6e50de05e565d00
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/401658
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-03-02 12:56:22 -05:00
Daniel Verkamp
d51ea8deb4 scripts/ceph: remove subshell and cd
The Ceph scripts can now be run from any directory; they don't depend on
their $PWD being the script location anymore.

Change-Id: Iff883a3e9b8ba2d0a6193e2f5c047eb9d7d423fd
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/401657
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-03-02 12:56:22 -05:00
Ziye Yang
650e9ed56e lib/iscsi: rename spdk_iscsi_conn_execute
Change-Id: Ic11e65c07738017a2534fbff58101957a8381fc4
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/401976
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>
2018-03-02 12:53:01 -05:00
Ziye Yang
38fb230249 lib/iscsi: move location of spdk_iscsi_conn_handle_queued_datain_tasks
The better location is to put this function in
the end of process_read_task_completion which can match
the the same function call in spdk_iscsi_op_scsi_read.

Change-Id: I7dbfb23e2c469e0be22e148299643a99b93c8018
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/401985
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>
2018-03-02 12:32:06 -05:00
chenlo2x
f697ca088e test/iscsi_tgt: remove almost repeated lines from digests.sh
Change-Id: I781c1ffcde45c4d9dd08188b5c5ca4351ab2b3e9
Signed-off-by: chenlo2x <longx.o.chen@intel.com>
Reviewed-on: https://review.gerrithub.io/401785
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>
2018-03-02 11:50:56 -05:00
Daniel Verkamp
e23fe2fc80 travis: disable astyle download/build
We don't normally accept pull requests via GitHub anymore, and the
astyle download has been failing intermittently due to SourceForge
availability issues, so just remove the check from the Travis script.

Change-Id: I2aca07622126045e4605f93f4780b6bb55bb678a
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/402166
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>
2018-03-02 11:49:25 -05:00
Ziye Yang
8642813403 lib/iscsi: add a check in spdk_iscsi_conn_sock_cb
Since we have two pollers for each iSCSI polling group,
so it could be possible that the nop_poller to set
iSCSI connection in existed or existing state.
So add a check here, which means the incoming data
is too late.

Change-Id: I94e5090b005c35c9eb5d7eedbd7acdae67327f94
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/402039
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-03-02 11:43:40 -05:00
Jim Harris
068b6fb34d bdev/fio_plugin: flush any remaining events after done
In some cases, an io_channel will be put (freed) as part
of the last execution of a poller.  Previously, the
callback would set done=1 and would not continue
executing events meaning the deferred put_io_channel
events would not get executed.

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

Reviewed-on: https://review.gerrithub.io/402139
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-03-02 11:43:11 -05:00
Seth Howell
a562812dcf autotest: add test completion tracking
Change-Id: I1ca0578a010db2ff8535505bfd981cd1c368e403
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/392240
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-03-01 17:13:41 -05:00
Chen Wang
431b25ec25 test/lvol: use python decorators to show the case message
Use python decorators to replace the header
and footer functions.
It's more convenient for printing the message
When add new case only need to use the @case_message
before the def test_casex(self):
Don't need add the header() and footer() functions in test_casex()
function and don't need pass the number.

Change-Id: Ic8f1e2e9342d06409c088d6ef011a87c7ee98950
Signed-off-by: Chen Wang <chenx.wang@intel.com>
Reviewed-on: https://review.gerrithub.io/401289
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-03-01 13:52:17 -05:00
Dariusz Stojaczyk
252d418c40 setup.sh: do not use lsblk -o SUBSYSTEMS
It's apparently unavailable on some systems.
We used it to grep all Virtio-PCI block devices
before matching them against our desired PCI bdf
in get_virtio_names_from_bdf(). If we were unbinding
a Virtio-PCI device and lsblk failed, the script
assumed there were no block devices and hence no
active mountpoints for that Virtio device. The initial
grep is not necessary and, since it's causing us
troubles, is now being removed.

Change-Id: I5a621391dc4772b2bd67eaa832e318d9a0d25948
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/401780
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>
2018-03-01 13:48:54 -05:00
Ziye Yang
6140f2d147 lib/iscsi: Refactor spdk_iscsi_conn_execute
Purpose: To make the logic clear.

Change-Id: I6176f359a23816b316e92b63ee2e5d5175ae7e7b
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/401772
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-02-28 23:23:09 -05:00
Ziye Yang
1a907f11fd lib/iscsi: Add nop_poller for iscsi polling group.
Change-Id: I7f0f64845a5b980632991e7b6d130e4be60ffa20
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/401749
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-02-28 23:23:09 -05:00
Seth Howell
7cf455c8e0 ceph/start.sh: remove /var/tmp/ceph at start.
This is a check to make sure it was properly removed after the last
build.

Change-Id: I2e425e81b88116190034f181e8aaa0e0a17ddb77
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/401860
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Liang Yan <liang.z.yan@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-02-28 21:59:53 -05:00
Daniel Verkamp
08ad304011 sock: set IPv6_V6ONLY on IPv6 sockets
This allows listening on the same port on IPv4 and IPv6 simultaneously;
otherwise, the second listen call would fail with an "address in use"
error.

Change-Id: I75010a2d1ec6559653e0bda40517dc13d8f5b9a5
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/401718
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-02-28 10:17:13 -05:00
Daniel Verkamp
ad14da9eab scripts/ceph: move all temp files to /var/tmp/ceph
The current test scripts created a lot of data inside the SPDK repo;
move this to /var/tmp/ceph (where the image is already created) to avoid
polluting the repo working copy.

Change-Id: If895baecfa7fef80733f0d629f091a479a634a52
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/401647
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>
2018-02-28 10:06:27 -05:00
Ziye Yang
f370026edc test/nvmf: Enable the multicore test.
Purpose: This test will be helpful to find more
issues when running nvmf_tgt with multiple core
configuration.

Change-Id: I06b6bec7a258084a30677356cdf89eb7f61c4ed8
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/401543
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: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-02-28 10:05:59 -05:00
Seth Howell
c9e5d2a6d0 autotest_common.sh: move to test/common
This is the first step in reorganizing the spdk test heirarchy.

Change-Id: I83467653af2da2a53251649092bed6902d6cb86e
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/401707
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-02-27 20:37:27 -05:00
Jim Harris
d1165a6539 blobfs: use new blobstore iter_cb_fn option
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I5f9a999e63231f54ba2a2116ec2d6403d9587a3d

Reviewed-on: https://review.gerrithub.io/400185
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-02-27 17:40:38 -05:00
Jim Harris
7560f2b2a3 blob: add option to iterate all blobs during spdk_bs_load
blobfs and lvol can now use this to automatically iterate
all existing blobs during spdk_bs_load.  Changes to blobfs
and lvol will come in future patches.

This will also be used in some upcoming patches which need
to iterate through blobs during load to determine
snapshot/clone relationships.

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

Reviewed-on: https://review.gerrithub.io/400177
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-02-27 17:40:38 -05:00
Daniel Verkamp
5c2952ab9d nvmf: implement NS Identification Descriptor list
Currently, this just reports the EUI64 and NGUID types, which are
already available in the Identify Namespace data, but this sets up the
framework for reporting a Namespace UUID (which doesn't have a
corresponding field in Identify Namespace) in the future.

Change-Id: I758e6d402ff874d65eca3f1db98d92c1a3f7a11f
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/400893
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>
2018-02-27 13:01:28 -05:00
Ziye Yang
cc5e5b9e50 iscsi: Enable the sock fd group polling mechanism
This patch is used to implement the sock fd event group
polling mechanism if there are incoming data from network
(read event in SPDK iSCSI target side) , thus we can awake
many connections one time, and it can reduce the system call
overhead.

Change-Id: I76c26a89ef9365d7e1ccec616985e7435253896b
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/399796
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-02-27 12:56:04 -05:00
Daniel Verkamp
a9cc710d16 bdev/nvme: use new json_write_named functions
This simplifies the code and eliminates the possibility of accidentally
inserting other items in between a key and its value.

Change-Id: Ic3bf7d0a85e9475171fe00cbcac6fe3ede731e69
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/401046
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-02-27 12:37:25 -05:00
Daniel Verkamp
3559bec4f9 bdev: move part helper code into its own file
Change-Id: I05505c469cac96a5e4812f2f65a7342ceec0a28c
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/401511
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-02-27 12:36:26 -05:00
Ziye Yang
7346be69e7 nvmf: Make the ctrlr create/remove in subsystem in an asynchronous way
Ctrlrs list maintanined by the subsystem structure should be operated
by the thread which creates the subsystem. And this will make the
operations correct.

Change-Id: I7f881a77b1846658b3acd4270b74f86816e87803
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/401541
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-02-27 12:35:08 -05:00
Ziye Yang
6d4c78eaf4 lib/nvmf: reorder the order of the functions
Purpose: To make the nvmf subsystem management correct
in next patch.

Change-Id: Ie5433f3a7d47f05c5949dfc723aba73465623f88
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/401540
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-02-27 12:35:08 -05:00
Jim Harris
494c252abd test/blob: make bs_dev_common.c asynchronous
Unit tests that use this will still immediately execute
the messages by default.  But upcoming changes to
queue persists will need to leverage testing asynchronous
behavior so these changes enable that.

While here, fix some bugs where _bs_flush_scheduler()
did not fully flush the queue of scheduled ops.

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

Reviewed-on: https://review.gerrithub.io/401256
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-02-27 12:31:50 -05:00
Jim Harris
ee8af4e9f3 blob: fix _spdk_bs_load_ctx_fail ordering
Finish the sequence first, before calling _spdk_bs_free().
Otherwise synchronous bs_devs (like we use in the unit
tests) cause the sequence memory to get freed via
_spdk_bs_free() and then we try to finish the sequence.

This eliminates the need for g_scheduler_delay and
_bs_flush_scheduler() in the blob unit tests.  But don't
remove them - they will be useful in upcoming unit tests
for queued persist operations.

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

Reviewed-on: https://review.gerrithub.io/401267
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-02-27 10:58:29 -05:00
Jim Harris
758a42f692 blob: add _spdk_blob_persist_start
No functional change - this just separates out the
code that creates the persist ctx from the code that
actually performs the persist operation.

Part of series to enable queuing persist operations -
this will be useful for starting a previously queued
persist operation.

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

Reviewed-on: https://review.gerrithub.io/401255
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-02-27 10:58:29 -05:00
Jim Harris
d5adb95226 blob: use _spdk_blob_persist_complete for all persist error paths
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Iaef32731b05a53ac0707524d78086eedc89d6af6

Reviewed-on: https://review.gerrithub.io/401254
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-02-27 10:58:29 -05:00
Jim Harris
cb42aa1dce blob: clean up some blob->state checks
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I096fb24dd2fe2fc4dd97d80c957c328d960fb867
Reviewed-on: https://review.gerrithub.io/401073
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-02-27 10:58:29 -05:00
Jim Harris
4661f2aef3 blob: always use _spdk_blob_persist to check for CLEAN state
spdk_blob_close() and spdk_blob_sync_md() currently do their
own CLEAN state.  To consolidate the state checking code,
have both functions rely on the check in _spdk_blob_persist()
instead.

This will reduce code but more importantly is needed for
some upcoming changes for queuing persist operations.

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

Reviewed-on: https://review.gerrithub.io/401065
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-02-27 10:58:29 -05:00
Jim Harris
4f6096fa10 blob: add _spdk_blob_verify_md_op
These are common functions that can be called from
any function that reads or modifies a blob's metadata to
perform necessary asserts.

This will also fix several places where blob metadata
functions were asserting the calling thread context,
but not the current state of the blob.

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

Reviewed-on: https://review.gerrithub.io/401053
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-02-27 10:58:29 -05:00
Jim Harris
7d4705a257 blob: remove SPDK_BLOB_STATE_SYNCING
All metadata operations are now done on the metadata
thread, so we no longer have to worry about one thread
updating in-memory metadata structures while another
thread is transferring the in-memory structures to
on-disk structures.

This does not protect against multiple sync operations
outstanding at once - that will be coming in an
upcoming path.

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

Reviewed-on: https://review.gerrithub.io/401056
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-02-27 10:58:29 -05:00
Jim Harris
0928d63d20 blob: add asserts for md operations on md thread
The md (metadata) thread is always the thread that
initialize/loaded the blobstore.  Metadata operations may
only be performed from this thread.  This patch adds some
more asserts in metadata functions that were previously
missed.

While here, also update some of the blobstore documentation
related to this.

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

Reviewed-on: https://review.gerrithub.io/400885
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-02-27 10:58:29 -05:00
Chen Wang
05db56d7d8 test/vhost: change the common.sh position in readonly.sh
vhost nightly readonly issue
get_vhost_dir function in the common.sh script.

Change-Id: Ic2ceee4cf8d8486715b908791d79e421269742bf
Signed-off-by: Chen Wang <chenx.wang@intel.com>
Reviewed-on: https://review.gerrithub.io/401100
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-02-26 15:50:30 -05:00