Uninitialized namespace struct will be all zeros.
Some drive might have multiple namespaces but not initialized.
nvme_manage will get to segment fault when this happens. This
patch is to fix this.
Change-Id: I8ea5bf3d7c29cf876fbea3d1bee22b95748d3b8a
Signed-off-by: Chunyang Hui <chunyang.hui@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447414
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Persist through power loss feature is not supported for now.
Change-Id: Id2a5088389dc28b9d28d88c04ff819d20ea11902
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/436940
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
For number of registered controllers field in Reservation
Status Data Structure, we caculate all the controllers
in the subsystem which Host Identifier are same with
existing registrants.
Change-Id: Ib4de22c7020dbd8294f448f23c0c5c8c142629dd
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/436939
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
The possible issue could be following if you shutdown NVMe-oF target
with TCP transport as an example,
=================================================================
==61022==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 560 byte(s) in 1 object(s) allocated from:
#0 0x7ffff6efcfe0 in calloc (/lib64/libasan.so.3+0xc6fe0)
#1 0x4c6216 in spdk_nvmf_tcp_listen /home/ziyeyang/spdk/lib/nvmf/tcp.c:680
Indirect leak of 48 byte(s) in 1 object(s) allocated from:
#0 0x7ffff6efcfe0 in calloc (/lib64/libasan.so.3+0xc6fe0)
#1 0x4a77b8 in spdk_posix_sock_create /home/ziyeyang/spdk/lib/sock/posix/posix.c:291
After checking the issue, it seems that we did not call
spdk_nvmf_transport_stop_listen when removing the subsystem listener.
And this patch can solve this issue.
Change-Id: Ic75d99cb0c6a3ba1c47ac79a2d8e3887b0f6b012
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447020
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: yidong0635 <dongx.yi@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Currently we only include the dir just above ISA-L which allows
the isal.h file includes to be found however DPDK can't find
isa-l.h at that location because its one level deeper.
By adding a symlink in the isa-l subdir we can redirect DPDK to
find the isa-l header files.
Change-Id: Ieeabd4273bade0241db5581764b2169103f9770f
Signed-off-by: paul luse <paul.e.luse@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/445767
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This patch extends existing ISA-L support for NVMe/SCSI T10 CRC-16
protection check (PI). The choice of which algorithm to use is set
via an existing configure parameter. The default for x86 systems with
appropriate CPU instructions is to us ISA-L.
Testing shows that PI checking/generation will run at device speed using
ISA-L. The table-based algorithm is much faster than the original algorithm
and is provided to speed up calculations on non-x86 systems.
This patch also fixes one issue in a false configure error if nasm
is at a higher version than currently checked (i.e. 2.13.03)
Local performance testing yeilds these results:
Original - 15 mbit/sec. (code removed)
Table - 400 mbit/sec. (27 times faster than original)
ISA-L - 3,400 mbit/sec. (227 times faster than original)
Signed-off-by: James Bergsten <jamesx.bergsten@intel.com>
Change-Id: Idc7f1d97252644d839621ffe9fa995edd922da52
Signed-off-by: James Bergsten <jamesx.bergsten@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/443646
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Functions moved in this patch may be used in future by
other NVMe based bdevs.
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I975b61b7f78855e67d65ab7d9fd9f5dd859ac570
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/443753
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Renaming functions to make it clear they are not part
of the public API.
Signed-off-by: Maciej Szwed <maciej.szwed@intel.com>
Change-Id: I9a283143a11090032b74684611403637bc6605a3
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447056
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
The reservation holder may release the reservation on
a namespace, release notification feature is supported
in comming patches.
Change-Id: If5d3158e691fcc782f7cf0b67a326bf62edf0531
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/436938
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
For API spdk_nvme_connect(), users can only use NULL or
struct spdk_nvme_ctrlr_opts for their own driver options,
so parameter opts_size doesn't take effect here. Since
some applications outside SPDK's git repository are using
such API, so we only remove the internal data structure
for now.
Change-Id: Ia727d2950d56abba637214ad17ecfa3eeab71d38
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/445656
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Free the probe context after the controllers in the probe
context list become READY. Then users don't need to free
the context which is allocated by SPDK driver.
Change-Id: I2dcb76bacf26a401b5b559c4326764a4ddb97e83
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446820
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
If multiple numjobs and filename were used in fio tests, one thread may
have a list of queue pairs, so we should store the queue pair when
submitting a new request.
Change-Id: I585cd40ea4295b94c8766f9adfa5a7344cb0bc3c
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447272
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This isn't required anymore because spdk_subsystem_init
is now always called after an event has been executed, so it
always runs after the framework has initialized.
Change-Id: I05e1a4dd605f27247b6d43f5234173e07d9b9dd2
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446996
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Just use a function pointer and a context.
Change-Id: I2d41ed2572d892f3328aadf7f22d8696816bf4d1
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446995
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Now that the boot strap event exists, this is not
necessary.
Change-Id: I277179fbc15ebe140fd22be1b67847cf23c6153e
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446994
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
It just takes a function pointer and a context instead.
Change-Id: Id8cdc968ddbc3776f60ad73e9aa09983ca03fa3f
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446993
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
The match file is hardcoded to $(FP)G. If using xxTB volume NVMe
SSD, this test case will fail. So using $(S) to cover larger
volume NVMe SSD.
Change-Id: Id046cadfbc5236cd8f480981fa337d2ee9a68bf4
Signed-off-by: Liang Yan <liang.z.yan@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/447130
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Ths patch adds an API spdk_iscsi_get_dif_ctx().
When opcode of BHS is SCSI command, spdk_iscsi_get_dif_ctx() extracts
CDB and LUN ID from BHS. When opcode of BHS is Data Out or Data In,
spdk_iscsi_get_dif_ctx() extracts TTT and get R2T task corresponding
to TTT, and gets CDB and LUN ID from the task.
Then spdk_iscsi_get_dif_ctx() gets LUN by using LUN ID and calls
spdk_scsi_lun_get_dif_ctx().
Additionally spdk_iscsi_get_dif_ctx() checks the state of the connection
and the type of the session is valid before starting decode operation
because contents of PDU is not reliable when the state of the connection
is invalid. The necessity of the check was found by the Calsoft test tool.
Checks and test cases are not matched yet but copying existing checks
from spdk_iscsi_conn_execute, spdk_iscsi_op_scsi, and spdk_iscsi_op_data
will be enough. The check added for Data Out is not necessary for Data In
but it will not be harmful for Data In.
Change-Id: Iba09e0ac3e760aa1c5b582a120596c49b9e9d51e
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446231
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This patch adds an API spdk_scsi_bdev_get_dif_ctx().
spdk_scsi_bdev_get_dif_ctx() decodes opcode in CDB, and if opcode
is read or write block commands, it gets LBA and use the lower
32bits of LBA as Reference Tag. It gets DIF information from
specified bdev next. Then it sets all to DIF context and return.
spdk_scsi_bdev_get_dif_ctx() is exported to iSCSI through
spdk_scsi_lun_get_dif_ctx().
Change-Id: Id8aac164c48e9e9d4ff7cfc9fa81bb5090f3e187
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446224
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Upcoming patches will store larger data in the data buffer than
iSCSI Initiator transfers, and size of metadata is not known until
asking to SCSI layer. This addition will be used to avoid overflow
in them.
Change-Id: I43e15d0cfbfddcf01342325b134d90e3d7dae038
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446378
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This patch adds spdk_iscsi_conn_readv_data() to read PDU data
from network socket by using spdk_sock_readv().
Additionally, this patch changes the existing spdk_iscsi_conn_read_data()
to call spdk_iscsi_conn_readv_data() by creating a single struct
iovec.
Change-Id: Ied487bb71bd4261ad53c9f3744ae272e65f98d7a
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446377
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Add an new API spdk_sock_readv(sock, iov, iovcnt) to the sock
library. This will be used in SPDK iSCSI target first.
Implementation was done based on vcom_socket_readv in VPP.
Change-Id: I88a8f2af4856b1035165b78d76b4a4f4587b265d
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446343
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This is already done for JSON info dump. In addition, the
spdk_vhost_scsi_dev_get_tgt function might implement additional logic to
no return SCSI targets under removal process.
Change-Id: I21d6f660926091dfd34da553705116926f27b30d
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446910
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This automates the process of probing some RDMA capable Chelsio NICs
Change-Id: I1ef52ffd899d4cbd1ace65037c8acf0be099adae
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446968
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Add the option to test with intel X722 NICs
Change-Id: Icb439e43768eb397dac881c6cb6979b3426fa62e
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446660
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This makes it so we only have to check one variable when determining if
we want to load Soft-RoCE NICs.
Change-Id: I5ba615e26252041023ec8615a00c1777bee6cb12
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446966
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This helps us simplify the detection of Mellanox NICS and paves the way
for a more modular detection scheme for PCIe connected NICs.
Change-Id: I93f16f469c569977c43d6e20fd4616299fa8c723
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446965
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Add a check if the number of blocks of read I/O is not larger
than allowed. This is a preparation to the subsequent patches that
support DIF in NULL bdev.
Change-Id: I82d4c835788d2f347fd5fdef82e1def313dd49a1
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446052
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: wuzhouhui <wuzhouhui@kingsoft.com>
Reviewed-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This patch adds an API spdk_dif_set_md_interleave_iovs().
This function is used to leave a space for metadata for each block
when the network socket reads data, or to make the network socket
ignore a space for metadata for each block when the network socket
writes data. This function removes the necessity of data copy in
the SPDK application during DIF insertion and strip.
Change-Id: I018efd77bdadcaec4679eea4dc1e404f155b0879
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446216
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: wuzhouhui <wuzhouhui@kingsoft.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
SPDK iSCSI and SCSI target don't expose any metadata and DIF settings
to the corresponding iSCSI and SCSI initiator.
Even when SPDK iSCSI and SCSI target allocate any bdev formatted
with DIF, SCSI commands sent from iSCSI and SCSI initiator don't
have any metadata and DIF information.
For that case, iSCSI target inserts and strips DIF on behalf of
iSCSI and SCSI initiator.
Hence SPDK SCSI target has to use data block size not including
metadata to process SCSI commands correctly.
This patch replaces spdk_bdev_get_block_size by
spdk_bdev_get_data_block_size in necessary places.
Change-Id: I264c8e532d1d1b016f6d8774c8ec03389528044f
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/445083
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
iSCSI target will need to get data block size except for metadata.
Other SPDK application may need to get the same information
future. Hence this patch adds an new API spdk_bdev_get_data_block_size
to bdev layer. In the header file, spdk_bdev_get_data_block_size
is located next to spdk_bdev_is_md_interleaved to avoid confusion
by new users.
Change-Id: I0fd2a6d0bcf6a4c18c583f70d96cc5035fc57fe9
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/445082
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: wuzhouhui <wuzhouhui@kingsoft.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Adding two NVMe Specification data structures for near future use.
Change-Id: Ic492dc35846239dd771c6a5e210b4f3978cdd03c
Signed-off-by: James Bergsten <jamesx.bergsten@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/444292
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Unregistering by a host may cause a reservation held by the host
to be released. If a host is the last remaining reservation holder
or is the only reservation holder, then the reservation is released
when the host unregisters. This may occur with Acquire/preempt
and Register/unregister commands.
Change-Id: If59fe2fdaa69c8ad70f364618d6c281494ad6245
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446821
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
A registrant can obtain a reservation on a namespace by executing
acquire command. Acquire command is associated with specific namespace.
For now only Acquire and Preempt reservation acquire action is
supported, Preempt And Abort will be supported in future.
Change-Id: Ifcbb6b414827393ffc266ceada5982b743716321
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/436937
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reservations can be used by two or more hosts to coordinate
acccess to a shared namespace, host must register to a namespace
prior to establishing a reservation. Unregistering by a host
may cause a reservation release, this feature will be supported
after reservation acquire patch.
Change-Id: Id44aa1f82f30d9ecc5999a2a9a7c20b2af77774a
Signed-off-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/436936
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Borrow the ideas from iSCSI and optimize
the nvme_tcp_build_iovecs function.
Change-Id: I19b165b5f6dc34b4bf655157170dec5c2ce3e19a
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446836
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
New API added for upper level to get controllers'
supported flags.
Change-Id: I51e9d0e57c355fa37f092602a94f4c08deb8898c
Signed-off-by: Chunyang Hui <chunyang.hui@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446091
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Take a callback and an argument instead.
Change-Id: I9edda1a9bd506e12f309e52e520e97c0d705d6a2
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446992
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Now that there is always one event to bootstrap,
we don't need an event here.
Change-Id: Ic87501461a608f5b15745a50b6e15f0f28aa55c2
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446991
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
These can now be delayed. Next they'll be converted to thread
operations instead of events.
Change-Id: Id8c183621fb88594a9fd508eff064b4a1557a5b6
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446989
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
- locks moved from ocf to adapter code,
- 'data object' renamed to 'volume',
- context and volume API reorganized.
Change-Id: Id4670ddfcb8eda9aefabc273497498c5bd3db1d5
Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/444092
Reviewed-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Robert Bałdyga <r.baldyga@hackerion.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This will make it easier to convert these operations to
spdk_thread_send_msg.
Change-Id: I4c975c22f3967a7197e69ccd230a14bdb97ba332
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/446988
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>