Spdk/test/unit/lib/bdev
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
..
bdev_zone.c spelling: test 2021-12-03 08:13:22 +00:00
bdev.c bdev: Add spdk_for_each_bdev/bdev_leaf for clean up and further improvements 2022-04-05 07:30:47 +00:00
compress.c bdev/compress: Verify mbuf chain if the driver doesn't suppot SGL 2022-03-31 09:34:52 +00:00
crypto.c module/bdev: Use spdk_bdev_unregister_by_name() if possible 2022-04-04 09:57:43 +00:00
gpt test: optimize unit test .gitignore files 2021-08-20 07:29:57 +00:00
mt bdev: Fix race among bdev_reset(), bdev_close(), and bdev_unregister() 2022-04-22 09:45:14 +00:00
nvme bdev/nvme: Fix aborting fuse commands 2022-04-26 07:47:09 +00:00
part.c bdev: pull/push data if bdev doesn't support 2022-04-04 09:57:56 +00:00
pmem module/bdev: Use spdk_bdev_unregister_by_name() if possible 2022-04-04 09:57:43 +00:00
raid bdev/raid: Add concat module 2022-04-05 07:39:00 +00:00
scsi_nvme.c test: optimize unit test .gitignore files 2021-08-20 07:29:57 +00:00
vbdev_lvol.c bdev/lvol: unload empty lvs during fini_start 2021-08-23 08:49:56 +00:00
vbdev_zone_block.c module/bdev: Use spdk_bdev_unregister_by_name() if possible 2022-04-04 09:57:43 +00:00
Makefile ut/bdev_ocssd: Move bdev_ocssd_ut from bdev directory to bdev/nvme directory 2021-02-09 11:29:53 +00:00