Commit Graph

1921 Commits

Author SHA1 Message Date
Ben Walker
d827cfbde6 blob: Handle allocation failures in set xattr
Change-Id: Ida9361066e8b3117d1022379d75e290b11f86b52
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-03-27 13:54:54 -07:00
Ziye Yang
21ce0f4030 examples/nvme: replace sprintf with snprintf
Change-Id: I08c594e26df9e1cdae67596e92db646c92701f85
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-03-27 13:54:49 -07:00
Cunyin Chang
01922c74d1 bdev/nvme: Make sure the bdev/nvme increment by 1 for new inserted device.
Change-Id: I691bb567c9fbfdb7e41f5602fe58645f232a0ee8
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2017-03-27 13:26:38 -07:00
Ziye Yang
fcc2eec870 nvme_manage: Rely on fgets to NULL terminate string
fgets guarantees that strings returned are NULL terminated,
so delete logic that attempts to insert a NULL terminator.

Change-Id: Ibeadcda9af431091b04daff41596d5738419b43f
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-03-27 12:55:04 -07:00
Ziye Yang
ef91841763 (i)scsi: check strlen before copy
Make sure that we have space for termination char '\0'

Change-Id: Iaebdad3b4278ee322bd78247acc7f0997c3f4b44
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-03-27 11:37:15 -07:00
Ziye Yang
2abea9da4e lib, vhost: check the numbers of reqs
Change-Id: I567b9a330aa284f08dd16993686200dd1dd7990f
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-03-27 10:45:56 -07:00
Daniel Verkamp
3e8ae4674b autotest: print stacktrace and abort on UBSan errors
Change-Id: I10523ad93b5cf4dcbed3578e4ee388a65ad63b72
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-27 10:27:52 -07:00
Ziye Yang
e439020961 vhost: check the strlen of basename
Change-Id: I0f0eb7edbec71609754a4cda80c578b75c84c87f
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-03-27 10:26:43 -07:00
Changpeng Liu
fa9d3466aa scsi/bdev: assert on failed data buffer malloc
Change-Id: I4f698d7c35e3315c86a6dc15b930c349ba6b105f
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
2017-03-27 10:08:12 -07:00
Ziye Yang
a1ed48c970 test, nvme: correct the parameter for spdk_nvme_ns_cmd_reservation_report
Change-Id: Idec799800bb8eaaad0191125410acbaa6e423cff
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-03-27 09:53:34 -07:00
Ziye Yang
76604c3294 test/blob: Change one NULL pointer check to a fatal assert
Change-Id: I99d95123b4c0c4a5040ba27799a1f9c5e2104e76
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-03-27 09:50:22 -07:00
Daniel Verkamp
c3f109f91e trace: Increase the size of trace name
According to the analysis, the largest name size is
24 not including '\0' (NVMF_RDMA_WRITE_COMPLETE),
so change the the size of name. Also add a check
to avoid the str exceeding our defined name size.

Change-Id: Iddf2cb52a3f5358306a59fc66bb997fa8098cde0
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-03-27 09:50:09 -07:00
Jim Harris
7fc640b296 test/blobfs/cache_ut: assert calloc returns a buffer
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I9d605fb844c2f11bc12b0200ca9fd1cac6c5f95d
2017-03-24 16:21:05 -07:00
Daniel Verkamp
42eade49cc doc: update CSS layout to match spdk.io
Change-Id: I2c42fd3d626854fcdb0e70fdcc7d1b4ccb257c8c
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-24 16:12:22 -07:00
Jim Harris
2e667dc351 test/blobfs: assert that some callocs succeed
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I5ad2a93a2fc4b21522745718d1399c1b432710c5
2017-03-24 16:06:37 -07:00
Jim Harris
38f91be52b blobfs: cache_insert_buffer() - check count before allocating buffer
This avoids corner case where a buffer gets allocated on the 100th
try.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: If65053d539d458d9a53c8850bbb4cbe4ee84f604
2017-03-24 16:06:37 -07:00
Jim Harris
7079a18f21 blobfs: add assert in fs_open_blob_create_cb to satisfy static checker
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Ia67d8a42825f7287c48729ec4d88d94a9efe430e
2017-03-24 16:06:37 -07:00
Jim Harris
f2e4d641a5 blobfs: fix use after free in init failure path
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I7709c08abc103023363bede99e06bf07984c04ca
2017-03-24 16:06:37 -07:00
Cunyin Chang
e5b62c126a bdev/nvme: assign names to hot-inserted devices.
this patch fix the potential possibility of coredump when
we have NVMe device hot inserted.

Change-Id: Idac255f25f42b4746c2d3ae6dfc57a19b7001160
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2017-03-24 15:50:40 -07:00
Karol Latecki
0488fd84b8 vhost_test: update vhost ext4test for spdk vhost
- Renamed to integrity filesystem test
- Add detecting if qemu is installed
- Default vhost.conf using NVMe; ramdisk may be too small
  for copying & building both dpdk and spdk
- Use kernel source (present on VM) for running test compilation
- rename to integrity test

Change-Id: Id369a5aac3008700cffbc51a5197b72f10645a1b
Signed-off-by: Karol Latecki <karolx.latecki@intel.com>
2017-03-24 14:23:12 -07:00
Jim Harris
1edd9bf3e4 blobfs: Add a lightweight filesystem built on the blobstore
This is the initial commit for "blobfs", a lightweight
filesystem built on top of the SPDK blobstore.

Also included in this patch:

1) a shim for using SPDK bdevs as the backing store for
   SPDK blobstore/blobfs
2) documentation for using blobfs as the storage engine
   with RocksDB
3) scripts for running a set of workloads and collecting
   profiling data with RocksDB and blobfs

See doc/blobfs/getting_started.md included in this commit
for more details on blobfs, including some of the current
limitations.


Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I2a6d3d4b87236730051228ed62c0c04e04c42c73
2017-03-24 14:15:45 -07:00
Daniel Verkamp
e00bb0e984 ioat/kperf: replace sprintf() with snprintf()
Change-Id: Ifb3170a49cc388da30a080c9e6df293bf945c81a
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-24 14:04:19 -07:00
Daniel Verkamp
d540f448b4 iscsi_top: replace sprintf() with snprintf()
Change-Id: Idcd9f088f07026be45ba5ba9e6e4f16454ba9acd
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-24 14:04:11 -07:00
Ziye Yang
dc1a2f814e bdev,nvme: check the return value of spdk_nvme_ctrlr_get_ns
Change-Id: Icae49d87562b07e80099622681cdf83fa6930b30
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-03-24 12:18:51 -07:00
Changpeng Liu
34369a1243 nvme: fix potential null dereference of spdk_nvme_ctrlr_get_ns
Change-Id: Ibe353e61020caa264cb9b4ad38a091f46ecccfb1
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
2017-03-24 12:18:37 -07:00
Daniel Verkamp
07295a8155 Revert "travis: disable vhost build on Travis-CI"
As of commit 6e2d7be8a1 ("vhost: add copy
of virtio headers"), we bundle the appropriate headers that were causing
the Travis-CI build to fail, so re-enable vhost in the Travis build.

This reverts commit 2d0246da83.

Change-Id: Ib52f66c91264aee138e420606ae1f16824aa3c10
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-24 10:53:23 -07:00
Daniel Verkamp
0d752e42f8 scsi: ensure LUN name is null terminated
Change-Id: I2c0d0d9dd4f4b852401f21b65142ee85c29f3c62
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-24 10:52:48 -07:00
Daniel Verkamp
2b0b705fb1 reactor: make sure socket_count isn't zero
Avoid division by zero in the event mempool cache size calculation.

Change-Id: Ic117ef2dc3a798fb0a57572f1178233e83e73849
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-24 10:52:28 -07:00
Ziye Yang
31b81b0dd6 bdev, split: check the memory allocaton of spilt_base
Change-Id: I4cc3d6e5397143b0b98d4a222c01a76128093191
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-03-24 10:52:05 -07:00
Cunyin Chang
b6671531ad event: Verify log_facility is not NULL before using it.
Change-Id: Ia20d8764c2c91c200d06b7017ed06060e40cc2ed
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2017-03-24 12:33:00 +08:00
Ziye Yang
fea78497a1 lib/vhost: Handle realloc failure
Change-Id: I47157e33e306205fa261e65e4b99fa13c1f1148d
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-03-23 16:04:27 -07:00
Cunyin Chang
1bbb43c544 nvme: Replace some strcpy with snprintf
Change-Id: If80ae64fa672ae6b847ad985be6862e5d2b3729b
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2017-03-23 15:26:07 -07:00
Changpeng Liu
c3ec79faee examples/perf: update usage information
Change-Id: I427075ead5fcdc15f03e6086d55d59b6b1030b26
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
2017-03-23 15:04:03 -07:00
Dariusz Stojaczyk
0e2ea8797f bdev/nvme: remove dangling pointer from g_nvme_bdevs list on bdev_nvme destruction
It was causing segfaults and infinite looping.

Change-Id: I4c19b5d3af1ba1360250cd5f6aa573a27003409f
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
2017-03-23 14:40:35 -07:00
Cunyin Chang
118c08154e lib/env_dpdk: exit if allocating dpdk_args fails
Change-Id: Ib7268d679ed73e73b5bc20f08dc381315ee4fd9d
Signed-off-by: Cunyin Chang <cunyin.chang@intel.com>
2017-03-23 14:33:10 -07:00
Daniel Verkamp
48ee3eba39 autotest: look for core.* in process_core
Match the default FreeBSD core file location as well as the Linux one.

Change-Id: I4c9803d314e89dc7982682c145a83e41dc9027e4
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-23 13:53:58 -07:00
Daniel Verkamp
6e2d7be8a1 vhost: add copy of virtio headers
This enables the vhost library to build on systems missing the (fairly
recent) linux/virtio_scsi.h header.

Change-Id: I680863b26961ec3cbe4ad4e575555454f6461bbf
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-23 13:51:04 -07:00
Ziye Yang
74da2fade4 Replace sprintf with snprintf in several files
Change-Id: I2a46433e81e605e57df4b2a1a9c1c27097333d0c
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-03-23 13:33:21 -07:00
Ziye Yang
228a81f1bc lib/net: Replace sprintf with snprintf
Change-Id: I86999b8f8ad4363e163c7e3f8d46dd49fb7c848c
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-03-23 13:30:09 -07:00
Ziye Yang
0c0582d3ce event: Verify lcore is valid when registering poller
If we do not do a bounds check, this can run off the end
of an array.

Change-Id: I43cc4848fca7d68218e507db20e33823f8b550e4
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-03-23 13:30:04 -07:00
Daniel Verkamp
4b887a8cbc nvmf: start even if no transports are available
Attempting to add a listen address for an unavailable transport will
fail with a better error message.

Change-Id: If4cf5b66c16dadcb6e0f0b28cea4aa510ba6a9fc
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-23 13:17:52 -07:00
Daniel Verkamp
7035c39136 nvmf: print error if transport name isn't found
Rather than failing silently, let the user know why the listen address
failed.

Change-Id: I41c2a51c6071ee739b282a1a39198a2887a73c4d
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-23 13:17:52 -07:00
Daniel Verkamp
9412e60062 nvmf: check spdk_nvmf_tgt_listen() return value
spdk_nvmf_tgt_listen() can fail due to invalid user input (e.g. from a
config file), so we can't just assert() that it worked.

Change-Id: Iea2d4ab2c82d79f6eada24e6082456489bf304b8
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-23 13:17:52 -07:00
Ziye Yang
532de4d9df test/nvmf: free the allocated subsystem
Change-Id: I1a0977c626facaa739c8c0c26a302bcc0c1aeafe
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-03-23 13:11:12 -07:00
Ziye Yang
774a544bd4 test/scsi/lun: Verify lun is not NULL
Change-Id: I9bedc80ffb1b82f198b88f40012520062fd2d54a
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-03-23 11:30:15 -07:00
Ziye Yang
1a1a8e89a9 test/scsi: Assert callocs do not return NULL
Change-Id: I4cf2027c5fbb09e8c451d4c9c40ccee2f55973f2
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
2017-03-23 09:19:41 -07:00
Changpeng Liu
4ed8870958 vhost: add gitignore the vhost application
Change-Id: I9f73fa558f104eeb4295074ec0000d0eab94dd2d
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
2017-03-23 10:15:22 +08:00
Daniel Verkamp
ab061a717a build: replace DPDK_INC with ENV_CFLAGS
A few instances of DPDK_INC were added after the env library abstraction
was introduced; replace them with the correct ENV_CFLAGS variable
defined by env.mk.

Change-Id: I54ab2b2360a72506049fee549491f6614601a148
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-21 15:41:13 -07:00
Daniel Verkamp
2563429809 nvme: convert uevent failure message to TRACELOG
The message about the uevent socket is not a fatal error; it just means
that hotplug monitoring will not work.

Change-Id: I29f6a253e96a86420c0fde9e19135f9f1d229bb9
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-03-21 15:39:21 -07:00
Ben Walker
d89352a95c blob: Add a persistent, power-fail safe block allocator
This is the initial commit for the "blobstore", a lightweight,
highly parallel, persistent, power-fail safe block allocator.

Documentation will be added in future patches.

Change-Id: I20a4daf899f1215d396f7931c3ec9a2e2bb269d0
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
2017-03-21 14:21:21 -07:00