nvmet-tcp: complete command on H2C protocol errors
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest1 patch 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/1 | nvmet-tcp: complete command on H2C protocol errorsdrivers/ | +16 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH v1 0/1] nvmet-tcp: complete command on H2C protocol errors
Hi,
This series fixes the H2C Data PDU error path in nvmet-tcp.
When nvmet_tcp_handle_h2c_data_pdu() hits err_proto it used to return -EPROTO without completing the associated command (there is even a FIXME in that path). The host often only sees the connection drop. Complete commands that already have a valid transfer tag with nvmet_req_complete() before returning -EPROTO. Skip completion when req->sq is unset (pre-connect placeholder).
Tested: make M=drivers/nvme/target on linux-next; nvmet TCP target with null-blk backend; nvme connect -t tcp loopback read smoke test; malformed H2C Data PDU before Fabrics Connect and on an active Write without kernel oops.
Thanks,
Xixin Liu
---
Xixin Liu (1):
nvmet-tcp: complete command on H2C protocol errors
drivers/nvme/target/tcp.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-)
Signature · 1 line
2.43.0