Spdk/module/bdev
Alex Michon 980d507e9b 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.

BACKPORTING NOTE:
I had to change the nvme_qpair1 name to ctrlr_ch1, because some
of the changes to multipath are not introduced to LTS version.
-Krzysztof Karas

Signed-off-by: Alex Michon <amichon@kalrayinc.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12180 (master)

(cherry picked from commit 2bc134eb4b)
Change-Id: I0474329e87648e44b08998d0552b2a9dd5d34ac2
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12489
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2022-06-30 13:32:32 -04:00
..
aio aio: add aio bdev rescan feature 2022-06-30 13:32:31 -04:00
compress vbdev_compress: reduce MAX_NUM_QP 2022-06-30 13:32:31 -04:00
crypto vbdev_crypto: skip handling QAT_ASYM devices 2022-06-30 13:32:31 -04:00
delay bdev/delay: zero-copy support 2022-06-30 13:32:30 -04:00
error bdev/error: properly initialize value of num for inject_error RPC 2021-04-15 21:41:05 +00:00
ftl spelling: module 2022-06-30 13:32:28 -04:00
gpt spelling: module 2022-06-30 13:32:28 -04:00
iscsi Lib/iSCSI: add the LUN Resize support 2022-06-30 13:32:31 -04:00
longhorn Cleanup log messages. 2022-04-05 17:41:49 -04:00
lvol bdev/lvol: asserting lvol ptr before dereference 2021-08-24 07:18:54 +00:00
malloc bdev_malloc: exit early in case of no acceleration task 2022-06-30 13:32:30 -04:00
null bdev/null: call spdk_bdev_module_fini_done() even if not registered 2022-06-30 13:32:31 -04:00
nvme bdev/nvme: Fix aborting fuse commands 2022-06-30 13:32:32 -04:00
ocf bdev/ocf: Improve OCF mpools 2022-06-30 13:32:31 -04:00
passthru bdev: Add API to get SPDK memory domains used by bdev 2021-08-20 07:26:10 +00:00
pmem lib/bdev: added spdk_bdev_module_fini_done() 2021-08-23 08:49:56 +00:00
raid spelling: module 2022-06-30 13:32:28 -04:00
rbd bdev/rbd: Support config_param and config_file simultaneously for rbd_register_cluster 2022-06-30 13:32:30 -04:00
split splite/vbdev_split: Free base part bdev on the error path. 2021-03-02 08:02:58 +00:00
uring so_ver: increase all major versions 2021-02-05 14:43:47 +00:00
virtio lib/bdev: added spdk_bdev_module_fini_done() 2021-08-23 08:49:56 +00:00
zone_block spelling: module 2022-06-30 13:32:28 -04:00
Makefile Initial changes. 2022-02-08 15:51:30 -05:00