Spdk/test/unit/lib
Alex Michon 2bc134eb4b bdev/nvme: Fix aborting fuse commands
When sending a fused compare and write command, we pass a callback
bdev_nvme_comparev_and_writev_done that we expect to be called twice
before marking the io as completed. In order to detect if a call to
bdev_nvme_comparev_and_writev_done is the first or the second one, we
currently rely on the opcode in cdw0. However, cdw0 may be set to 0,
especially when aborting the command. This may cause use-after-free
issues and this may call the user callbacks twice instead of once.
Use a bit in the nvme_bdev_io instead to keep track of the number of
calls to bdev_nvme_comparev_and_writev_done.

Signed-off-by: Alex Michon <amichon@kalrayinc.com>
Change-Id: I0474329e87648e44b08998d0552b2a9dd5d34ac2
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12180
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-04-26 07:47:09 +00:00
..
accel accel: cleanup by getting rid of capabilties enum 2022-04-14 08:32:50 +00:00
bdev bdev/nvme: Fix aborting fuse commands 2022-04-26 07:47:09 +00:00
blob blob_ut: bs_opts initialized with wrong size 2022-02-02 08:25:02 +00:00
blobfs test: optimize unit test .gitignore files 2021-08-20 07:29:57 +00:00
dma dma: Update memory domain context structure 2021-10-20 22:55:52 +00:00
env_dpdk test: optimize unit test .gitignore files 2021-08-20 07:29:57 +00:00
event event: Add a user option to change the size of spdk_msg_mempool 2022-03-09 08:00:28 +00:00
ftl spelling: test 2021-12-03 08:13:22 +00:00
idxd idxd: Make many internal idxd_user functions take an idxd_user object 2022-04-20 08:20:45 +00:00
init spelling: test 2021-12-03 08:13:22 +00:00
ioat test: optimize unit test .gitignore files 2021-08-20 07:29:57 +00:00
iscsi ut: Use unit/lib/json_mock.c for stubs 2022-01-31 09:44:28 +00:00
json spelling: test 2021-12-03 08:13:22 +00:00
jsonrpc spelling: test 2021-12-03 08:13:22 +00:00
log test: optimize unit test .gitignore files 2021-08-20 07:29:57 +00:00
lvol lvol: lvol_get_xattr_value failure undetectable 2022-01-31 09:44:16 +00:00
notify test: optimize unit test .gitignore files 2021-08-20 07:29:57 +00:00
nvme nvme_rdma: Wait until lingering qpair becomes quiet before completing disconnection 2022-04-18 18:35:29 +00:00
nvmf nvmf/tcp: delay qpair destruction 2022-04-25 07:36:05 +00:00
reduce lib/reduce: Copy user's buffers if SGL is not supported 2022-03-31 09:34:52 +00:00
rpc ut: Use unit/lib/json_mock.c for stubs 2022-01-31 09:44:28 +00:00
scsi Lib/iSCSI: add the LUN Resize support 2022-01-20 07:56:23 +00:00
sock lib/sock: provide a hint to picking optimal poll group 2022-04-01 12:41:26 +00:00
thread event: Add a user option to change the size of spdk_msg_mempool 2022-03-09 08:00:28 +00:00
util dif: enhance copy API to support block-aligned bounce_iov 2022-04-01 08:29:12 +00:00
vhost lib/vhost: move vhost_user related fields from spdk_vhost_dev 2022-04-15 07:49:32 +00:00
json_mock.c ut/json_mock: Add stubs for json_write_uint8 and _uint16 2022-01-31 09:44:28 +00:00
Makefile unittest/rpc: add rpc unittest 2021-09-06 09:55:33 +00:00