It can be useful for passing additional information about nvmf
target to a handler for new nvmf connections. Context can be
stored in globals as it is currently done in nvmf code. However
in case of multiple targets or languages where accessing global
state is challenging (i.e. Rust), this becomes inconvenient.
Change-Id: Ia6a2fdba4601531822b3e5fda7ac5ab89d46f6c5
Signed-off-by: Jan Kryl <jan.kryl@mayadata.io>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469263
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Sasha Kotchubievsky <sashakot@mellanox.com>
Enables access control to allow subsystem access on one or more FC ports.
If a subsystem definition does not have a single valid "Listen" directive,
then the subsystem will allow dynamic listen address binding. For such
subsystems,
* When a FC port comes online, FC transport will add port's address
to subsystem's listen list.
* When a FC port goes offline, FC transport will remove port's address
from subsystem's listen list.
If subsystem definition has 1 or more valid "Listen" directives then FC ports
coming online or going offline will not affect subsystem's listen address
whitelist.
Signed-off-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Change-Id: Ic7fed76e4bf8d1df0aeeae1d4fa5e6d207afccf3
Signed-off-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471025
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
SCSI command uses iSCSI task and data buffer, and will use zero copy
bdev I/O APIs.
To use zero copy bdev I/O APIs, we have to allocate iSCSI task
before allocating data buffer.
Hence we separate PDU header and payload handling for SCSI command,
include iSCSI task allocation into PDU header handling first.
Use pdu->task to pass the task allocated by the former to the latter.
In iscsi_pdu_hdr_op_scsi(), we can not expect pdu->data_segment_len
is set. So getting data segment length from PDU BHS instead.
In the updated iscsi_op_scsi(), if it sees pdu->task is NULL or
pdu->is_rejected is true, do nothing. Besides, check LUN hot plug
again to separate PDU header handling and PDU payload handling.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ic09451ab022b9714381f03c63bd3008c39fedb8e
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470290
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
We want to move iSCSI task allocation before data buffer allocation
to use zero copy APIs in iSCSI target. As a preparation, we have to
separate PDU header and payload handling. This patch makes it a little
easier.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ib7f5ec71933fd6022fd2248aff0a0bd89b7ad830
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470289
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>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Separate PDU header and payload handling for Text Request PDU.
This will clarify the header handling and payload handling.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I162af0b4bf281852bb13af5f3261dacb38dee5e0
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471451
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>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Double pointer is clever but reference to pointer is easier to understand.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I5168e08ca67942c22ba2cbdc10925e8a9fd6da6c
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471007
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>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
The subsequent patches will separate PDU header handling and PDU
payload handling. But for the PDUs which have data segment,
if PDU header is correct, we have to read data segment even if any other
error is found and the PDU is rejected.
To do that, add a flag is_rejected to pass if the PDU is rejected or
not from PDU header handling to PDU payload handling.
If PDU payload handling sees the PDU is already relected, do nothing.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ie3fe518fc0f452da9965a2fe3642568c86866480
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471005
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>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Subsequent patches will separate PDU handler into PDU header handler
and PDU payload handler.
Some PDU types will have both PDU header handler and PDU payload handler,
and command is executed in PDU payload handler.
Some PDU types will have only PDU header handler, and command is
executed in PDU header handler.
CmdSN must be updated appropriately depending on the case.
As a preparation, factor out updating CmdSN into a helper function
iscsi_update_cmdsn().
Besides, storing the passed CmdSN into PDU is duplicated and remove
the duplication in this patch.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ib5f271a1624a39e82d6271dfebcc181e3850e260
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471333
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>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
To make the code clearer,
- make the spdk_iscsi_read_pdu() private in iscsi.c and named iscsi_read_pdu(), and
- make the iscsi_conn_handle_incoming_pdus() public and named
spdk_iscsi_handle_incoming_pdus().
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I967681b8e9b86681a906b18719e91e1d387450d7
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469969
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Add PDU receive state to each connection, and each connection
transits among states during receiving incoming PDUs.
Four states, AWAIT_PDU_READY, AWAIT_PDU_HDR, AWAIT_PDU_PAYLOAD,
and ERROR are same as SPDK NVMe-TCP target.
Move clearing conn->pdu_in_progress just before putting pdu
when PDU processing completes normally to match with error case.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Id24b6d6662896b5685125a46ee20cbf216668838
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469966
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>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Correct shellcheck rule SC2013: To read lines rather than
words, pipe/redirect to a 'while read' loop.
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I01c0dcf045fc131ce0cfa672e5ede0b881a47406
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471433
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
When used mkdir with -p, -m only applies to the deepest directory.
Change-Id: Ibbc2dc47cdae82d38e3141c8a7df59ed709fe334
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468367
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Signed-off-by: Yan Wang <wangyan122@huawei.com>
Change-Id: I99269d8e6889fe08b44b32b26c667da12dd4f577
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471339
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This will result in SPDK_BDEV_IO_STATUS_FAILED when bdev_uring_reap
Signed-off-by: Yao Liu <yotta.liu@ucloud.cn>
Change-Id: I24bea544af7130b09c41156920d918200fe792e5
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471157
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Paul Luse <paul.e.luse@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>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
They now show up as hyperlinks when referred to in the documentation.
Change-Id: Iff85b050a78de82ad84d82d32f7e80177e9a9b35
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470526
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Use this function in nvmf_request_alloc_wrs and nvmf_rdma_setup_request
to eliminate code duplication
Change-Id: I771e0e899043049c90298e050d4353145e36f0d1
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Signed-off-by: Sasha Kotchubievsky <sashakot@mellanox.com>
Signed-off-by: Evgenii Kochetov <evgeniik@mellanox.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471034
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Delete a pointer to spdk_nvme_cmd as it is not used directly
Change-Id: I36a6a6d95c0707f446a0797a55a9e60c62f9503c
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Signed-off-by: Sasha Kotchubievsky <sashakot@mellanox.com>
Signed-off-by: Evgenii Kochetov <evgeniik@mellanox.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470472
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Return -1 from spdk_nvmf_rdma_request_parse_sgl in the case of -EINVAL since 0 value
returned by spdk_nvmf_rdma_request_parse_sgl is treated as no memory case
Change-Id: I536592260a3bb658a1a4bc3a79c5b37fbacd3edc
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Signed-off-by: Sasha Kotchubievsky <sashakot@mellanox.com>
Signed-off-by: Evgenii Kochetov <evgeniik@mellanox.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470471
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>
Correct shellcheck rule SC2145: Argument mixes string and
array. Use * or separate argument.
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I45102ead2e97cc1d6b11c21f269e58a235055c35
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470926
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>
Remove from shellcheck excluded SC2146: This action ignores
everything before the -o. Use \( \) to group.
This warning is not actually present in any of spdk/spdk scripts.
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I62549107516853d8394fff8bcb36584df9e39ac1
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470924
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Remove from shellcheck excluded SC1001: This \o will
be a regular 'o' in this context.
This warning is not actually present in any of spdk/spdk scripts.
Additionally clean up shellcheck exclude list.
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Ia9a9ec9383df02702397072172830fb147effe81
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470913
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Remove from shellcheck excluded SC1003: Want to escape
a single quote? echo 'This is how it'\''s done'.
This warning is not actually present in any of spdk/spdk scripts.
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Ib5175941178e4d1b46c3835a98d90d6dd427a035
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470912
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Remove from shellcheck excluded SC1113: Use #!, not just #, for the shebang.
This warning is not actually present in any of spdk/spdk scripts.
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I77cc1bd3ca6817823bf6fabf82a2991d734cd824
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470906
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Add to permanently excluded in shellcheck:
^SC2001: See if you can use ${variable//search/replace} instead.
In some cases we need more complex sed substitution than only replacing string.
For example: test_stack=$(echo "$test_stack" | sed -e 's@;[^;]*$@@')
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I3e997af5232d8b15518fd54528b2e51e75a19d8c
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470903
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>
Correct shellcheck rule SC2003: expr is antiquated.
Consider rewriting this using $((..)), ${} or .
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I98a677cce7a1ffdfa5e1cf417a128900fba64124
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470902
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Correct shellcheck rule SC2044: For loops over find output
are fragile. Use find -exec or a while read loop.
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I3fd84ab60daab7c6971769ff4dee8a24d5d3e1bb
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470746
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Leaving these on the stack outstanding list can cause unnecessary
buildup. If we fail to post the request to ibv, then the upper layer
request will be freed immediately for reuse, but we will keep that
request in the outstanding queue at the RDMA layer.
Change-Id: Ib422dc9fcb50344ce7c01749f3e20ea9310fd5cb
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470255
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Package ip address parsing code into a separate function. This change
is the first patch in the series to enable FC listen address support.
Signed-off-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Change-Id: Ia86c61d001a091dfb9f825b68f76cdaf94537303
Signed-off-by: Anil Veerabhadrappa <anil.veerabhadrappa@broadcom.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471024
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
After successful completion the test now returns with zero status code.
Change-Id: Id0ede49d3c7b6bdbcc0603dd65e98f0bad004219
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470663
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
The config had a 'verify=1' which doesn't make sense as the verify
option requires the type of verification to be set (e.g. md5, crc32c).
Change-Id: I0ace5bce86ce3e78d0f58a74edeb314e5d38bdc6
Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470662
Reviewed-by: Wojciech Malikowski <wojciech.malikowski@intel.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>
It was previously impossible to get back to the group
from the socket. This will be needed later.
Change-Id: I7b72c1b3bb9f5f4fda7e94475636e103df409316
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470522
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This is useful for detecting sockets that have been disconnected
by the other end without reading data.
Change-Id: Ieb6529984d282d48373766d9f5555cf11720f19b
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470513
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This reverts commit bc4e31d6b2.
This change was accidentally merged after it was decided to go with a
different architecture.
Change-Id: Ifc9d8b08bd1fcbc4ace8dd6fb4bd0014330916ed
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471144
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>
Add DEPDIR in module Makefile for blobfs.
Avoid compiling blobfs_bdev before blob_bdev.
This is to fix issue: #982
Change-Id: I7f7bd35ec56cb5a7d0545d9966aaeb7249ffb4f4
Signed-off-by: yidong0635 <dongx.yi@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471019
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: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
The patch of this purpose is to exclude the CPU cores
occupied by the DPDK thread. To mitigate the corner
case, we only do it when the number of online CPU cores
is larger than then DPDK thread occupied cpu cores.
The purpose is uset to improve the performance and avoid the
contention between DPDK thread and user's own thread.
Change-Id: I1a4a28074df97c55ac531440aea41059a75543f6
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471000
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: JinYu <jin.yu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
1. Remove created dir name with "/".
2. Compatible with upper version of ceph-authtool without --set-uid, let it run as default.
3. Fix error on ceph 12.*.*
This is to fix issue #980 which blocks by ceph-authtool.
If there's still other issue, should append fix.
Change-Id: Icd7fb4177a75a731ae3d4d5fc51cef16eeab282f
Signed-off-by: yidong0635 <dongx.yi@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/470915
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Quote to prevent word splitting/globbing,
or split robustly with mapfile or read -a.
Change-Id: I8d971216056580921ce07baa24e6ceaceffcceae
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467679
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Prefer mapfile or read -a to split
command output (or quote to avoid splitting).
We know the behaviour of commands that break the SC2207 rule.
They shouldn't invoke the shell's sloppy word splitting and glob expansion.
E.g. Code: stats=($(cat /sys/block/$dev/stat))
according to SC2207 rule could look like:
IFS=" " read -r -a stats <<< "$(cat /sys/block/$dev/stat))"
Stat file contains one simple line with entries separated by commas
so present code is enough to define statistics for dev.
Change-Id: Ia929d76461c9fcff425f69d2faf4405631e60239
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/467325
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
There was no occurrences in code that doesn't meet this rule
SC2231: Quote expansions in this for loop glob
to prevent wordsplitting, e.g. "$dir"/*.txt .
Change-Id: I9293459dd6bea401f675a7af379db25f48664f25
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469106
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This rule won't be used in bash scripts and will be added to exception list.
SC2223 - This default assignment may cause DoS due to globbing. Quote it.
Change-Id: I0d4b0bc697e42bb4bc1d77db5b28a469cdb887ec
Signed-off-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/466836
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Karol Latecki <karol.latecki@intel.com>
Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This RPC method will mount blobfs on bdev to one host
path through FUSE. Then on the host path, user can
directly do some file operations which will be mapped
to blobfs.
Note:
* The FUSE mount of blobfs can be umounted directly by
SHELL umount or fusermount command.
Change-Id: I7c322d978b39bbc7255fced345a749ad5bfa7077
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468777
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>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
FUSE operations in blobfs_fuse.c are extracted from
test/blobfs/fuse/fuse.c to blobfs_fuse.c in module blobfs_bdev.
And it is extended to create one new thread dedicatedly for one
FUSE mountpoint to handle FUSE requests by blobfs sync API.
spdk_blobfs_bdev_mount is implemented as the export API. So
related code can be utilized by other modules/apps.
Now test/blobfs/fuse/fuse.c is much simplified with function
spdk_blobfs_bdev_mount.
Change-Id: Iefa16977fabbae2008c8f65fe1b69d650b6fd18d
Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469347
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>
If PDU header digest error is detected, it indicates that the length
field of the header may have been corrupted. Hence it's may not be
possible to identify the location of the beginning of a later PDU.
So move checking header digest before handling payload and then
close the connection if header digest error is detected.
Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I56f6bc082dc0b244e71ad996b4da08e0203f8cdd
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/471014
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>