Commit Graph

5300 Commits

Author SHA1 Message Date
Ben Walker
a83f91c29a thread: Replace #include of io_channel.h with thread.h
Change-Id: I6babd4cf990bf19b510db88bdfb0ca81e29d9252
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/414700
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Madhu Pai <mpai@netapp.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-06-12 15:24:07 +00:00
Ben Walker
c1dc8cd584 thread: Rename io_channel.h to thread.h
Leave io_channel.h in the repository and make it simply
include thread.h for backward compatibility.

Change-Id: I5320fb8e9e5bc6e39ee9ce44cd79570194a8b841
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/414699
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Madhu Pai <mpai@netapp.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-06-12 15:24:07 +00:00
Ben Walker
02d75f6237 thread: Move threading abstraction code out of util
This makes more sense as a first class library.

Change-Id: Ibd5c578f8708bd8c7d83fe1629e97c9a3316b56b
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/414698
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: Madhu Pai <mpai@netapp.com>
2018-06-12 15:24:07 +00:00
Ziye Yang
9f697e0fe2 nvmf: change judgement to assert
Reason: It should never fail, which should
comply with the logic in nvmf_tgt_destroy_poll_group.

For the current case, if the judement fails,
we still add the g_active_poll_groups, the logic
is not correct. And according to the analysis,
the poll group creation should not fail.

Change-Id: I408ee1e8099f709330b8a6ffd26cf27d6a549bed
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/414565
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-06-12 01:32:35 +00:00
Daniel Verkamp
7352fd62d8 blob: mark internal function static
_spdk_blob_insert_cluster_on_md_thread() is defined and used in the same
file, so it doesn't need to be exposed outside of the compilation unit.

Change-Id: Ifc327a3d80cae47b28fa2a9ba77471a9b80c83e0
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/414702
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-06-11 23:37:49 +00:00
Daniel Verkamp
aafa745388 app: reword -t option help string
Avoid mentioning "trace"; the -t flag controls SPDK_DEBUGLOG output,
which used to be called TRACELOG, but now the mention of "trace" is just
misleading and causes confusion with tracepoints.

Change-Id: I537d08d8ca216be0240b318918aa22127f9d636d
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/414701
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-06-11 23:37:11 +00:00
Jim Harris
f007d46c5a test: disable RBD and PMDK tests if not installed
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Id3152f911a9a1fb4b3ac9d8be56570a665c079f1
Reviewed-on: https://review.gerrithub.io/414281
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: Ben Walker <benjamin.walker@intel.com>
2018-06-11 23:25:55 +00:00
Vishal Verma
48738e383d event: Remove timer poll count checks
This removes checks for timer poll iterations
within a reactor.

Change-Id: Id8eea26dab201064123575998b3b24e1f609ac5a
Signed-off-by: Vishal Verma <vishal4.verma@intel.com>
Reviewed-on: https://review.gerrithub.io/412694
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-06-11 22:26:21 +00:00
Shuhei Matsumoto
919252ce5e iscsi: Use TAILQ_FOREACH_SAFE instead of TAILQ_EMPTY + FIRST
This will simplify remove operation a little.

Besides a few unnecessary blank lines are deleted.

Change-Id: Ifd312e5a94ba0668d884dd5baf1ef1f2ebd4417c
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/414562
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: Jim Harris <james.r.harris@intel.com>
2018-06-11 22:23:55 +00:00
Shuhei Matsumoto
03a52d0d32 iscsi: Factor out copy scsi status when it is not good
Change-Id: I5042df8c25a2d2f6591a2a922e22407904b04bab
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/414561
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: Jim Harris <james.r.harris@intel.com>
2018-06-11 22:23:55 +00:00
Shuhei Matsumoto
d817d6a766 iscsi: Change malloc to calloc and remove 0 fill by memset
Change-Id: I9ceb1d4c4a7df43b4259fb860c9cc73a3084f06d
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/414363
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: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-06-11 22:23:55 +00:00
Shuhei Matsumoto
f71aa70005 iscsi: remove unnecessary mutex
target->mutex doesn't guard any data structure.

Change-Id: I07d75b43d0b016e3c6b56baab4b1707887ab019d
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/414362
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-06-11 22:23:55 +00:00
Shuhei Matsumoto
feb7f2b3fc iscsi: simplify nesting and order in iscsi_conn_read_data()
Try to make the logic of the function a little clearer.

Change-Id: Ic78bed73feef94d94487f0a4240019789be8d2bc
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/414353
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: Jim Harris <james.r.harris@intel.com>
2018-06-11 22:23:55 +00:00
Shuhei Matsumoto
edf924824e scsi: Unify the name of functions and variables about hot remove
Change the name of hot plug to hot remove not to confuse.

Change-Id: Ifc8de3452de72a08eba0e9ea942217e5342b2ef4
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/414352
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: Jim Harris <james.r.harris@intel.com>
2018-06-11 22:23:55 +00:00
Daniel Verkamp
f9117f050e Remove executable permissions on source files
A couple of files were accidentally marked as executable.

Change-Id: I89ff0bc037fba1b5d073ceea55c78fb5d9cb19b2
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/414675
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-06-11 20:35:02 +00:00
Jim Harris
0309bd5192 rocksdb: use SYS_LIBS during link
We need -lrt as well as -luuid.  I'm not exactly sure how
this worked previously - but updating my dev box to
Ubuntu 18.04 LTS hit this problem.  Any linking done
in the SPDK repository always uses SYS_LIBS which
includes uuid and rt so we should use it for linking
RocksDB db_bench as well.

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

Reviewed-on: https://review.gerrithub.io/414478
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-06-11 17:39:56 +00:00
Jim Harris
a2b5c37ac9 event/app: add spdk_app_usage
This allows applications to trigger printing of the
default SPDK command line option usage messages if
needed.  This could be useful in cases where the
app expects the user to specify a parameter and
finds the parameter was not specified after
spdk_app_parse_args() is finished.

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

Reviewed-on: https://review.gerrithub.io/414472
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-06-11 17:39:56 +00:00
Ziye Yang
d39e7f22b1 iscsi: check the task_pool size
It will also help the debug for the memory leak of
iSCSI tasks.

Change-Id: I524962ae1e3278aaf6aca12cc85a5e0f616c3001
Signed-off-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-on: https://review.gerrithub.io/414623
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>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-06-11 16:39:57 +00:00
Ziye Yang
336fb2c018 iscsi: Remove this SPDK_MAX_POLLERS_PER_CORE MACRO
This is not needed since now we have group iSCSI
poller

Change-Id: I99127a62fc84cee5088b16c908edd78876d0fcfb
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.gerrithub.io/414620
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-06-11 16:39:57 +00:00
Daniel Verkamp
57ae6bf646 nvmf: allow overriding namespace UUID in RPCs
The default is still to retrieve the bdev UUID, but now the end user may
also specify their own UUID if desired when adding NVMe-oF target
namespaces via construct_nvmf_subsystem or nvmf_subsystem_add_ns.

Change-Id: I950eb84b9fdecbc2eae8ca39d9acd6acabe8d31d
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/414269
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-06-11 07:41:39 +00:00
Piotr Pelplinski
69fa57cdf0 blobstore: freeze I/O during resize
Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Change-Id: I23c34d4dcb542aa9ab3fa8cb734cf9cc0e0fc5da

Reviewed-on: https://review.gerrithub.io/409144
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-06-08 19:32:25 +00:00
Karol Latecki
0af5182e19 test/vhost: move negative tests to separate file
fiotest/autotest.sh is a I/O integrity test, so negative cases
should belond to a separate script file

Change-Id: Ie0728ce1eadba9687d1f40b3fdfb26c50ab34055
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/413643
Reviewed-by: Paweł Niedźwiecki <pawelx.niedzwiecki@intel.com>
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-06-08 19:32:07 +00:00
Yanbo Zhou
4404da7cea include/blob.h: add comments for callback functions
Change-Id: I984b70c47d4ec465775994945ea6ba588a0aed2b
Signed-off-by: Yanbo Zhou <yanbo.zhou@intel.com>
Reviewed-on: https://review.gerrithub.io/407684
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>
2018-06-08 19:31:28 +00:00
Pawel Wodkowski
01a9118d0c jsonrpc: fix closed connection hadling
The spdk_jsonrpc_server_conn_remove() was just swapping last connection
with that is being removed. This was fine but not for BSD queues which
rely on its own address.

Simple fix would be to add STAILQ_INIT and STAILQ_SWAP for queued
requests but we can hit the same nasty and easy to overlook bug in
future. Instead convert connection array to linked list and move around
only pointers.

Fixes #322

Change-Id: Ibb359d281f6164bcd17df37ba9d31ffdb46c2e0a
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/414257
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: Ben Walker <benjamin.walker@intel.com>
2018-06-08 18:11:18 +00:00
Changpeng Liu
967339f3e5 nvme: factor out qpair destruction function
Factor qpair destruction function so that we can put common
resource release together in future.

Change-Id: I44139947820c2a384b745ae2673799f1b736369c
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/412604
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-06-08 00:26:05 +00:00
Jim Harris
1fd0107026 bdevperf: print error message and exit when no bdevs found
While here, don't print out empty performance data if the
test run failed (for example, if no bdevs were found).  Also
remove superfluous "done" message at the end of main - it
really serves no purpose and looks silly especially if the
test failed.

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

Reviewed-on: https://review.gerrithub.io/414064
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2018-06-07 17:46:02 +00:00
Jim Harris
8cb3341e83 bdev/nvme: print error message when PCIe SSD not found
This includes when the SSD's BDF is valid, but not attached to UIO/VFIO.

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

Reviewed-on: https://review.gerrithub.io/414063
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-06-07 17:46:02 +00:00
Ben Walker
8c9508f9b3 nvmf: Correctly unregister nvmf tgt as an I/O device
Change-Id: I9552354d620986c2a3d6b071f32b587e9e683198
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/413861
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-06-07 16:07:38 +00:00
Ben Walker
f4f839ecd3 nvmf: Eliminate num_qpairs counter in controller struct
The qpair mask can be used instead.

Change-Id: I9063e656c7c44663dc96adfd5ef52a5a1065d2ba
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/413860
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-06-07 16:07:38 +00:00
Ben Walker
f08cea7169 nvmf: Perform QID validation using a bit mask
Instead of scanning a list of all qpairs, use a bit
mask to determine if the requested QID is unique.

This is not for performance reasons, but because
eventually the ctrlr's list of qpairs is going to
need to go away.

Change-Id: Ic25ee60e4f9cd9d596815719760d5be892f29d0c
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/413286
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-06-07 16:07:38 +00:00
Daniel Verkamp
5eb33f0a5f nbd: return path to /dev/nbd* in start_nbd_disk
This will allow us to make the start_nbd_disk method choose an available
/dev/nbd* node automatically in an upcoming commit.

Change-Id: I3c6eb67e7e0c513212eba17139fd0cc96bf9b6dd
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/413847
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-06-07 16:05:59 +00:00
Daniel Verkamp
8b158aaacd nvme: factor out request timeout checking
This will be used in other transports as well.

Change-Id: I05026b0dfea2647d61a173379aca368ca48a2f52
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/413864
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-06-07 15:46:50 +00:00
Daniel Verkamp
cdb3a594a8 nvme: ignore requests submitted before timeout set
If requests are in flight at the time a timeout callback is configured,
we can't retroactively get the submission time of those requests; treat
them as not having a timeout.

Change-Id: Ic589e874a0f2c8c7f4ce352afa7c3aea33b01fae
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/413863
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>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-06-07 15:46:50 +00:00
Daniel Verkamp
e7b29a14c0 nvme: move timeout information to nvme_request
This is the first step toward timeout handling for other transports.

Change-Id: I386dd990f667d449e94ba4bcedaa3435743755fd
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/413862
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>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2018-06-07 15:46:50 +00:00
Daniel Verkamp
1681a055f9 nvme/pcie: restore timeout checking on admin queue
This was partially fixed in commit ddeaeeec19 ("nvme: Only check
timeouts on requests from the same process"), but the function that
calls nvme_pcie_qpair_check_timeout() was also erroneously filtering out
the admin queue.  Restore the original behavior of checking all queue
types.

Change-Id: I26a44ff5eb772735d314ce7b8322ba9222675911
Fixes: 31bf5d795e ("nvme: make timeout function per process")
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/411628
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-06-07 15:46:50 +00:00
Chunyang Hui
3d9b3e972a bdevperf: Add flush io type
Change-Id: Ia954418cdf9423a015358d793a34722169c087ed
Signed-off-by: Chunyang Hui <Chunyang.hui@intel.com>
Reviewed-on: https://review.gerrithub.io/414082
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-06-07 15:43:59 +00:00
Young Tack Jin
f52d800864 nvme: add metadata to spdk_nvme_ns_cmd_read/writev()
verified on QEMU NVMe for OCSSD 2.0 and RFC will be shared soon

Change-Id: I01c513e30768ac1961a5c5af20de3a2490da7729
Signed-off-by: Young Tack Jin <youngtack.jin@circuitblvd.com>
Reviewed-on: https://review.gerrithub.io/413854
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: Changpeng Liu <changpeng.liu@intel.com>
2018-06-06 23:20:43 +00:00
Piotr Pelplinski
8c45ed3822 blobstore: freeze I/O during snapshoting.
Signed-off-by: Piotr Pelplinski <piotr.pelplinski@intel.com>
Change-Id: I6182eb3a77d23db7088703492d71349e3a4b6460
Reviewed-on: https://review.gerrithub.io/399366
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-06-06 22:26:04 +00:00
Changpeng Liu
4c4c8ca269 nvme: don't reset controller when processing NS mangement commands
For attach/detach command, the identify namespace data should be
updated during the namespace attribute notice event callback, while
here, in case of the driver may not set aer callback, so update the
namespace identify same with attach command.

Change-Id: Ie594b2ff646a67488d03af2771c00f9947395aba
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/412884
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-06-06 20:02:16 +00:00
Daniel Verkamp
0dc36fe97d test/nvmf: move multiconnection out of NIGHTLY_FAILING
This test is now working reliably after commit 392f3ef589 ("test/nvmf:
fix waitforblk usage in multiconnection").

Change-Id: I15c790b01df8c8204b6c389cf8d381e10ee54fc9
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/413857
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-06-06 19:32:15 +00:00
Daniel Verkamp
853770870c doc: reorganize programmer guides in index.md
Move several programmer guides into the correct section.

The blobstore programmer's guide is already linked from the Programmer
Guides section above; remove it from General Information.

Also add a link to the logical volumes documentation and rename it to
remove the "Introduction", since this doesn't fit with the naming of
other similar chapters.

Change-Id: I1eed7d2588851d67c067a2bcd568b3b071816679
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/413851
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-06-06 17:21:20 +00:00
Karol Latecki
161eb083ae test/vhost: remove config-ro Qemu option from config
Vhost-blk readonly "config-ro" option was
removed from Qemu arguments after merging
pull request f67c9b693a into Qemu master.

"config-ro" Qemu option needs to be removed
from scripts in order for tests to pass.

Nightly test for read-only feature has to be
commented out until Qemu is updated on test
servers.

Change-Id: I0cdc9c2fd3b23ef77a63b54e280e1bb9500229ee
Signed-off-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-on: https://review.gerrithub.io/413745
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-06-06 17:20:30 +00:00
Pawel Wodkowski
5d3d5a49da nbd: use req.len in NBD_CMD_TRIM
Change-Id: I2c193498ae70e2813e5447ac4375c84635f5425a
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/413808
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-06-06 17:13:15 +00:00
Ben Walker
4d58c1328a nvmf: Move QID error checks to common path
QIDs need to be validated for both I/O queues and admin
queues, so move the checking to a common path.

Change-Id: Icb2009b3fe4d70f146b741c046812d9df62cc2fb
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/413859
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-06-06 17:10:57 +00:00
Ben Walker
b95fc6fc64 nvmf: Return the correct error for out-of-range QID
This one is actually a bit tough to deduce in the specification.
The NVMe-oF spec says that QID errors detected in the RDMA
transport shall return an RDMA-specific error indicating
the problem. However, our code doesn't detect the error in
RDMA-specific code, and it isn't clear if the language is
a "must" or a "should".

The NVMe specification does clearly indicate what error
to return on invalid QID in response to a Create
I/O Queue Pair command. For now, return that while
we game plan whether we need to call into the RDMA
transport to correctly report this error.

Change-Id: I7faf37bad9b9202bc50a906214a51c17e4808fc0
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/413858
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2018-06-06 17:10:57 +00:00
Daniel Verkamp
008c111b48 nvme/pcie: only set mmio_ctrlr around actual MMIO
When the shadow doorbell feature is enabled, no actual MMIO takes place
when a shadow update is sufficient; tighten the bounds of the updates to
g_thread_mmio_ctrlr in the two doorbell update locations so that we only
need to touch the thread-local variable when actual MMIO access is
required.

Change-Id: Ida974bec33f56cbb9f7d3611f483c6975ec773ab
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/413856
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>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2018-06-06 17:10:09 +00:00
Shuhei Matsumoto
f2554ee973 scsi: Change spdk_scsi_task_alloc/free_data() from public to private
This patch does a little cleanup of SPDK SCSI layer APIs.

spdk_scsi_task_alloc_data() is only used in spdk_scsi_task_scatter_data().
spck_scsi_task_free_data() is only used in spdk_scsi_task_put().

The latter was called in UT code but this can be removed without any
degradation.

SPDK SCSI layer is relatively matured and these will not be used
out of lib/scsi/task.c.

Additionally memory leak detected by ASAN is fixed in this patch.

Change-Id: I8eff7b4dbfc307c211087734649a9b9b10555f8d
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/413872
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-06-06 17:09:22 +00:00
Chen Wang
86637cae4f doc/vhost.md: update the RPC method for remove_vhost_scsi_target
Method "remove_vhost_scsi_dev" changes to "remove_vhost_scsi_target".

Change-Id: I1e368c7cf2b16accd3431100e384c1d868e04a47
Signed-off-by: Chen Wang <chenx.wang@intel.com>
Reviewed-on: https://review.gerrithub.io/413873
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-06-06 16:20:14 +00:00
Jim Harris
c796b90747 bdev/iscsi: break out common code for completing a conn_req
Suggested-by: Ziye Yang
Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I6ca7f08aed2e12c59518269c7b277895b4817bd8

Reviewed-on: https://review.gerrithub.io/413844
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Ziye Yang <optimistyzy@gmail.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
2018-06-06 16:05:57 +00:00
Daniel Verkamp
e83a62bf09 nvme: rename quirk from LIGHTNVM to OCSSD
This is consistent with the Open Channel naming we are using elsewhere.

Change-Id: Ib088359bed29a958f8b50e41cf34143a23429f54
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/413840
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-06-06 01:45:36 +00:00