numam-spdk/lib
Shuhei Matsumoto 299fce881a nvme/pcie: Dequeue request from outstanding list before calling completion
Each request has a callback context as cb_arg, and the callback to
nvme_complete_request() for the completed request may reuse the context
to the new request.

On the other hand, nvme_pcie_qpair_complete_tracker() dequeues tr from
pqpair->outstanding_tr after calling nvme_complete_request() for the
request pointed by tr.

Hence while nvme_complete_request() is executed, pqpair->outstanding_tr
may have two requests which has the same callback context, the
completed request and the new submitted request.

The upcoming patch will search all requests whose cb_arg matches to
abort them. In the above case, the search may find two requests by
mistake.

To avoid such error, change nvme_pcie_qpair_complete_tracker() to
dequeue tr from pqpair->outstanding_tr before calling nvme_complete_request().

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ie9efc200d06d02d8ee2be3cb8e9fd64591bc210d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2861
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
2020-06-24 08:19:43 +00:00
..
accel lib/accel: minor cleanup: remove extra stack variable in functions 2020-06-17 07:21:05 +00:00
bdev lib/bdev: Use not SPDK thread count but core count for mempool cache size 2020-06-08 09:33:50 +00:00
blob lib/blob: remove spdk_ prefix from bs_batch_read_bs_dev 2020-06-01 09:21:14 +00:00
blobfs Blobfs: update the display string 2020-05-27 07:36:50 +00:00
conf mk/lib: add a check that major and minor version is set for libs. 2020-05-21 09:19:00 +00:00
env_dpdk env_dpdk: expose base virtaddr as an option 2020-06-16 07:45:07 +00:00
env_ocf lib/ocf_env: fix incorrect value for free memory estimate 2020-04-29 06:42:33 +00:00
event log: remove backtrace printing 2020-06-03 07:39:08 +00:00
ftl lib/ftl: Evict valid cache entries when destroying io channel 2020-06-22 15:48:47 +00:00
idxd lib/idxd: clean up some casting and type issues 2020-06-17 07:21:05 +00:00
ioat mk/lib: add a check that major and minor version is set for libs. 2020-05-21 09:19:00 +00:00
iscsi iscsi: Add DataSequenceInOrder in discovery_ignored_param 2020-06-11 19:51:04 +00:00
json lib: json-nbd remove spdk prefix from static functions. 2020-05-21 09:19:00 +00:00
jsonrpc rpc: don't allow starting RPC server on a TCP port 2020-06-08 09:35:16 +00:00
log log: remove backtrace printing 2020-06-03 07:39:08 +00:00
log_rpc lib: json-nbd remove spdk prefix from static functions. 2020-05-21 09:19:00 +00:00
lvol all: Fix warnings found by gcc 9.3.0 and 9.3.1 2020-06-02 09:51:57 +00:00
nbd lib/nbd: Remove inclusion of SPDK event library 2020-06-01 09:20:41 +00:00
net lib: net, notify, nvme, rocksdb remove spdk_ prefix. 2020-05-21 09:19:00 +00:00
notify lib: net, notify, nvme, rocksdb remove spdk_ prefix. 2020-05-21 09:19:00 +00:00
nvme nvme/pcie: Dequeue request from outstanding list before calling completion 2020-06-24 08:19:43 +00:00
nvmf lib/nvme: Fix Abort Command Limit to process as 0's based value 2020-06-24 08:19:43 +00:00
rdma rdma: Add new API spdk_rdma_qp_accept 2020-06-18 07:28:04 +00:00
reduce mk/lib: add a check that major and minor version is set for libs. 2020-05-21 09:19:00 +00:00
rocksdb lib: net, notify, nvme, rocksdb remove spdk_ prefix. 2020-05-21 09:19:00 +00:00
rpc rpc: don't allow starting RPC server on a TCP port 2020-06-08 09:35:16 +00:00
rte_vhost read_fd_message: distinguish prints of log message 2020-05-25 09:08:00 +00:00
scsi lib/scsi: Remove inclusion of SPDK event library 2020-06-01 09:20:41 +00:00
sock sock/net_framework: Adding a static inline function to get next framework. 2020-06-17 07:21:28 +00:00
thread thread: add info logs 2020-06-12 15:40:31 +00:00
trace mk/lib: add a check that major and minor version is set for libs. 2020-05-21 09:19:00 +00:00
ut_mock mk/lib: add a check that major and minor version is set for libs. 2020-05-21 09:19:00 +00:00
util lib/util: remove _spdk prefix from functions. 2020-06-01 13:07:30 +00:00
vhost vhost: fix vhost_blk_destroy issue 2020-06-19 07:19:20 +00:00
virtio lib/makefile: move vhost_user.c into lib/virtio directory 2020-06-09 07:37:43 +00:00
vmd mk/lib: add a check that major and minor version is set for libs. 2020-05-21 09:19:00 +00:00
Makefile rdma: Intorduce RDMA providers 2020-05-20 12:03:50 +00:00