14535253f1
Previously, if an I/O qpair is disconnected, we tried reconnecting the qpair. However, this reconnect operation was very likely to fail and will not match the upcoming asynchronous connect/reconnect operation. We need an extra callback to make this reconnect operation asynchronous, but we do not want to have it. Hence if an I/O qpair is disconnected, we free the I/O qpair and then reset the corresponding nvme_ctrlr immediately. If the admin qpair is also disconnected, the nvme_ctrlr is reset immediately. However this event may never happen. So we do not wait for the error of the admin qpair. The NVMf host may disconnect connections by itself intentionally. In this case, resetting the nvme_ctrlr will surely fail. But resetting the nvme_ctrlr frees all I/O qpairs of the nvme_ctrlr and these I/O qpairs are not created again until resetting the nvme_ctrlr succeeds. Resetting the nvme_ctrlr once at most is more efficient than repeating reconnecting the I/O qpair. So this change is valuable even for such intentional disconnection. However, it is helpful to know the event that I/O qpair is disconnected. Hence change DEBUGLOG to NOTICELOG in the disconnected callback. The disconnected callback is not repeated, and we do not need to worry about NOTICELOG flooding. Refine the unit test case to verify this change. Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: I376b749c2f55d010692bf916370e8bb4249b795f Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/9515 Community-CI: Mellanox Build Bot Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> |
||
---|---|---|
.. | ||
accel_engine | ||
app | ||
bdev | ||
blobfs | ||
blobstore | ||
common | ||
compress | ||
config_converter | ||
cpp_headers | ||
dd | ||
dpdk_memory_utility | ||
env | ||
event | ||
external_code | ||
ftl | ||
fuzz | ||
interrupt | ||
ioat | ||
iscsi_tgt | ||
json_config | ||
lvol | ||
make | ||
nvme | ||
nvmf | ||
ocf | ||
openstack | ||
pmem | ||
rpc | ||
rpc_client | ||
rpc_plugins | ||
scheduler | ||
setup | ||
spdkcli | ||
thread | ||
unit | ||
vhost | ||
vmd | ||
Makefile | ||
spdk_cunit.h |