+13
−2
Loading
Nvmf is counting in-flight IOs in per-subsys array, where NSID-1 is used as index. Susbystem in passthru mode overwrites NSID of IO command with NSID of underlying device. Currently - if susbsytem has passthru enabled - IO counter is increased for original NSID, but since the completion is returned with underlying NSID, it decresed for the wrong one. It happens if nvmf's NSID is not matching underlying bdev's NSID. For example - if there are two NS in one passthru subsys, or single NS is added with not matching NSID. Add recovering of original NSID to the request in the completion path, so the in-flight IO counter is inc/dec for same NSID. Add assert to make spoting such issue easier in debug build. Change-Id: Ia007ead694592b62af9e60b5065e103806355721 Signed-off-by:Pawel Baldysiak <pawel.baldysiak@dell.com> Reviewed-on: https://review.spdk.io/c/spdk/spdk/+/25832 Reviewed-by:
Ankit Kumar <ankit.kumar@samsung.com> Reviewed-by:
Jim Harris <jim.harris@nvidia.com> Reviewed-by:
Jacek Kalwas <jacek.kalwas@nutanix.com> Reviewed-by:
Changpeng Liu <changpeliu@tencent.com> Tested-by:
SPDK Automated Test System <spdkbot@gmail.com>