linux-yocto/drivers/nvme/host
Yu Kuai a2f02a87fe nvme: fix misaccounting of nvme-mpath inflight I/O
[ Upstream commit 71257925e8 ]

Procedures for nvme-mpath IO accounting:

 1) initialize nvme_request and clear flags;
 2) set NVME_MPATH_IO_STATS and increase inflight counter when IO
    started;
 3) check NVME_MPATH_IO_STATS and decrease inflight counter when IO is
    done;

However, for the case nvme_fail_nonready_command(), both step 1) and 2)
are skipped, and if old nvme_request set NVME_MPATH_IO_STATS and then
request is reused, step 3) will still be executed, causing inflight I/O
counter to be negative.

Fix the problem by clearing nvme_request in nvme_fail_nonready_command().

Fixes: ea5e5f42cd ("nvme-fabrics: avoid double completions in nvmf_fail_nonready_command")
Reported-by: Yi Zhang <yi.zhang@redhat.com>
Closes: https://lore.kernel.org/all/CAHj4cs_+dauobyYyP805t33WMJVzOWj=7+51p4_j9rA63D9sog@mail.gmail.com/
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-07-24 08:53:17 +02:00
..
apple.c apple-nvme: Release power domains when probe fails 2025-03-22 12:50:43 -07:00
auth.c
constants.c
core.c nvme: fix misaccounting of nvme-mpath inflight I/O 2025-07-24 08:53:17 +02:00
fabrics.c
fabrics.h
fault_inject.c
fc.c nvme-fc: rely on state transitions to handle connectivity loss 2025-03-22 12:50:50 -07:00
fc.h
hwmon.c
ioctl.c nvme: always punt polled uring_cmd end_io work to task_work 2025-07-06 11:00:16 +02:00
Kconfig
Makefile
multipath.c nvme: multipath: fix return value of nvme_available_path 2025-05-02 07:50:59 +02:00
nvme.h nvme-pci: 512 byte aligned dma pool segment quirk 2025-01-09 13:31:56 +01:00
pci.c nvme-pci: add NVME_QUIRK_NO_DEEPEST_PS quirk for SOLIDIGM P44 Pro 2025-06-04 14:42:25 +02:00
pr.c nvme: fix nvme_pr_* status code parsing 2024-06-21 14:38:29 +02:00
rdma.c nvme-rdma: unquiesce admin_q before destroy it 2025-04-25 10:45:56 +02:00
sysfs.c
tcp.c nvme-tcp: fix premature queue removal and I/O failover 2025-05-09 09:44:01 +02:00
trace.c
trace.h
zns.c