Spdk/module
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
..
accel accel: Don't query the channel queue depth. Rely on -EBUSY 2022-06-30 13:32:31 -04:00
bdev bdev/nvme: Fix aborting fuse commands 2022-06-30 13:32:32 -04:00
blob blob: use uint64_t for unmap and write_zeroes lba count 2022-06-30 13:32:26 -04:00
blobfs blobfs: check return value of strdup in blobfs_fuse_start() 2021-06-16 08:53:21 +00:00
env_dpdk so_ver: increase all major versions 2021-02-05 14:43:47 +00:00
event nvmf: Destroy subsystems before destroying poll groups 2022-06-30 13:32:31 -04:00
scheduler gscheduler: use current tsc for decision. 2022-06-30 13:32:29 -04:00
sock sock/posix: Add MSG_NOSIGNAL to prevent SIGPIPE for a socket that may be closed 2022-06-30 13:32:31 -04:00
Makefile scheduler: create public API and subsystem for scheduler/governor 2021-09-07 07:33:03 +00:00